2018-09-01 17:30:56 -07:00
|
|
|
interface Dictionary<T> {
|
|
|
|
[key: string]: T;
|
2018-11-02 14:17:58 +00:00
|
|
|
}
|
2018-12-12 15:27:15 +00:00
|
|
|
|
2024-02-29 19:00:39 -03:00
|
|
|
type EmptyObject = Record<string | number | symbol, never>;
|
|
|
|
|
2019-05-26 18:51:58 +01:00
|
|
|
type Callback<T> = (err?: Error, res?: T) => void;
|
2019-01-21 11:18:41 +00:00
|
|
|
|
|
|
|
type Nullable<T> = T | null | undefined;
|
2020-01-16 19:23:54 +00:00
|
|
|
type Resolvable<T> = T | Promise<T>;
|
2019-12-18 15:52:42 +00:00
|
|
|
|
2020-08-13 13:25:39 +01:00
|
|
|
type UnwrappedPromise<T> = T extends PromiseLike<infer U> ? U : T;
|
2019-12-18 15:52:42 +00:00
|
|
|
|
|
|
|
type DeepPartial<T> = T extends object
|
|
|
|
? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
|
|
: T;
|