balena-supervisor/typings/global.d.ts

17 lines
395 B
TypeScript
Raw Normal View History

interface Dictionary<T> {
[key: string]: T;
2018-11-02 14:17:58 +00:00
}
type EmptyObject = Record<string | number | symbol, never>;
type Callback<T> = (err?: Error, res?: T) => void;
type Nullable<T> = T | null | undefined;
type Resolvable<T> = T | Promise<T>;
type UnwrappedPromise<T> = T extends PromiseLike<infer U> ? U : T;
type DeepPartial<T> = T extends object
? { [K in keyof T]?: DeepPartial<T[K]> }
: T;