Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jan 25, 2022. It is now read-only.

Rest/Spread Properties for ECMAScript

NotificationsYou must be signed in to change notification settings

tc39/proposal-object-rest-spread

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ECMAScript 6 introducesrest elements for array destructuring assignment andspread elements for array literals.

This proposal introduces analogousrest properties for object destructuring assignment andspread properties for object literals.

Specification

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.

let{ x, y, ...z}={x:1,y:2,a:3,b:4};x;// 1y;// 2z;// { a: 3, b: 4 }

Spread properties in object initializers copies own enumerable properties from a provided object onto the newly created object.

letn={ x, y, ...z};n;// { x: 1, y: 2, a: 3, b: 4 }

Transpilers

Babel

Bublé

JSTransform

TypeScript

It is a Stage 4 proposal for ECMAScript.

This proposal only iterates overown properties.See why this matters.

About

Rest/Spread Properties for ECMAScript

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors16


[8]ページ先頭

©2009-2025 Movatter.jp