Problem Statement
Given f, to get its resolved promise value type:
Explanation
`ReturnType` gets the promise type; `Awaited<…>` unwraps it to the value inside. Think: ReturnType first, then Awaited.
Code Solution
SolutionRead Only
declare function f(): Promise<string>; type T = Awaited<ReturnType<typeof f>>; // string