6 lines
168 B
TypeScript
6 lines
168 B
TypeScript
export type PromiseType<P extends Promise<any>> = P extends Promise<infer T>
|
|
? T
|
|
: never;
|
|
|
|
export type FunctionReturningPromise = (...args: any[]) => Promise<any>;
|