25. implement UnwrapPromise<T>
Share
- accepted / - tried
Implement UnwrapPromise<T>
to return the resolved type of a promise.
type A = UnwrapPromise<Promise<string>> // stringtype B = UnwrapPromise<Promise<null>> // nulltype C = UnwrapPromise<null> // Error