2018-09-02 00:30:56 +00: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 22:00:39 +00:00
|
|
|
type EmptyObject = Record<string | number | symbol, never>;
|
|
|
|
|
2019-05-26 17:51:58 +00: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 12:25:39 +00: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;
|