tsafe
Search
K
📉

UnpackPromise

Deprecated. Extract the packed type of a Promise
In TypeScript 4.5 have been introduced the Awaited type that does just what UnpackPromise does.
declare const prStr: Promise<string>;
//str is of type string
declare const str: UnpackPromise<typeof pr>;
Last modified 1yr ago