Async
Awaited
What you get after awaiting — however many promises deep it was.
What it is
The one built-in on this page that recurses. It models await rather than Promise unwrapping: a promise of a promise flattens, exactly as it does at run time, and a non-promise passes through unchanged. Reading the definition is the fastest way to understand why nested promises were never a thing you had to handle.
Examples
Awaited<Promise<string>>→stringAwaited<Promise<Promise<number>>>→numberFlattened all the way, because
awaitdoes the same.Awaited<string>→stringAwaiting a non-promise is legal and does nothing, and the type says so.
Each resolved type above was printed by TypeScript 6.0.3, not written by hand.
What it does not do
- It does not unwrap anything inside an object.
Awaited<{ a: Promise<string> }>is unchanged — this followsawait, andawaitdoes not walk your properties. - It does not describe rejection. The error path has no type in TypeScript at all, which is why a caught error is
unknown.
Takeaway
Use Awaited<ReturnType<typeof fn>> for the resolved result of an async function. That pair comes up more than either does alone.

