mirror of
https://github.com/Snigdha-OS/documentation.git
synced 2025-09-11 20:04:55 +02:00
8 lines
353 B
TypeScript
8 lines
353 B
TypeScript
declare type UnwrapPromise<P extends unknown> = P extends PromiseLike<infer V> ? V : P;
|
|
declare type Input = Record<string | number | symbol, unknown>;
|
|
declare type Result<Obj extends Input> = {
|
|
[P in keyof Obj]: UnwrapPromise<Obj[P]>;
|
|
};
|
|
export default function combinePromises<Obj extends Input>(obj: Obj): Promise<Result<Obj>>;
|
|
export {};
|