TypeScript Utility Types
Awaited<T> — recursively unwrap fulfillment types
Awaited describes the eventual value obtained by awaiting a type, recursively following the fulfillment parameter of a structurally recognized thenable. Non-thenable values remain themselves and unions are handled constituent by constituent. Null and undefined remain nullish under strict checking. A thenable with a noncallable fulfillment parameter can yield never. The type utility neither waits nor catches rejection. Example output: "12". Verified with strict TypeScript 5.8.3, ES2022 and Node.js 22.16.0. This utility affects static typing; no runtime validation or transformation is supplied by the type itself.
Formal Syntax & Structure
typescript syntaxtypescript
Awaited<T>Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| T | type parameter | Value, Promise or thenable type to model after awaiting. |
Working Example
Example Snippettypescript
async function read(): Promise<number> { return 12; }async function main(): Promise<void> { const result: Awaited<ReturnType<typeof read>> = await read(); console.log(result);}void main();