Rest/Spread Properties S4
- Stage: Stage 4
- Status: Finished
- ECMAScript edition: ES2018
- Synchronized: Aug 28, 2026
- 中文译文 · Source repository
This proposal extends destructuring and object literal syntax to support rest properties and spread properties, mirroring array rest and spread. It addresses the need to easily extract remaining properties from an object or merge objects.
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.
Object Rest/Spread Properties for ECMAScript
ECMAScript 6 introduces rest elements for array destructuring assignment and spread elements for array literals.
This proposal introduces analogous rest properties for object destructuring assignment and spread properties for object literals.
Specification
Rest Properties
Rest properties collect the remaining own enumerable property keys that are not already picked off by the destructuring pattern. Those keys and their values are copied onto a new object.
Spread Properties
Spread properties in object initializers copies own enumerable properties from a provided object onto the newly created object.
Transpilers
Status of this Proposal
It is a Stage 4 proposal for ECMAScript.
Known Issues
This proposal only iterates over own properties. See why this matters.