TypeScript · Middle · Question 8 of 75

What does Awaited<Promise<Promise<number>>> return?

Explanation

Awaited recursively unwraps promises and thenables, mirroring the behavior of await. Handy for an async function's result type: Awaited<ReturnType<typeof fetchUser>>.

Further reading

Problem with a question

TypeScript · Middle · question 8

Test yourself

Take the TypeScript · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz