Generator arrow functions ?
- Stage: Unstaged
- Status: Withdrawn
- ECMAScript edition: —
- Synchronized: Aug 28, 2026
- 中文译文 · Source repository
This proposal aims to provide a concise syntax for generator arrow functions, which are currently not supported. It discusses several syntax options, such as () =>* and a new generator keyword.
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.
ECMAScript proposal: Generator Arrow Functions
Authors: Sergey Rubanov
Champion: Hemanth HM, Brendan Eich (?)
Stage: Stage 1 of the TC39 process.
Motivation
Experience so far has been that people love arrow functions and generators and want a generator arrow. — Brendan Eich
Both arrow functions and generators are available since ES2015. Often people want to use generator arrow and this proposal (which was raised years ago) should solve their needs.
Use cases
- 3 years old React example
- need more use-cases
Possible solutions
Discussion of future syntax: https://github.com/tc39/proposal-generator-arrow-functions/issues/2
Arrow function syntax
Introduce new generator keyword for both function and arrow function
TC39 meeting notes
Prior discussions
- https://esdiscuss.org/topic/why-do-generator-expressions-return-generators
- https://esdiscuss.org/topic/generator-arrow-functions
Implementations
- none yet