Async functions S4
- Stage: Stage 4
- Status: Finished
- ECMAScript edition: ES2017
- Synchronized: Aug 28, 2026
- 中文译文 · Source repository
This proposal introduces async functions to ECMAScript, aiming to simplify writing asynchronous code by combining Promises and Generators. It provides a language-level model for async operations, with an implementation in regenerator for compiling async/await code to ES5. The proposal has a complete spec text and is implemented in regenerator, indicating a mature stage.
The README below comes from the upstream repository and may contain outdated stage or status metadata. Use the proposal details above as the current source of truth.
Async Functions for ECMAScript
The introduction of Promises and Generators in ECMAScript presents an opportunity to dramatically improve the language-level model for writing asynchronous code in ECMAScript. The spec text can be found here.
This proposal is implemented in a regenerator which can compile ES5 code containing async and await down to vanilla ES5 to run in existing browsers and runtimes.
This repo contains a complete example using a large number of the features of the proposal. To run this example: