We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for the spread syntax, which allows the direct insertion of arrays or objects into other arrays or objects.
Examples:
var arr1: Array<num> = [1, 2, 3]; var arr2: Array<num> = [4, 5, 6]; var newArray: Array<num> = [...arr1, ...arr2, 7, 8, 9]; // -> [1, 2, 3, 4, 5, 6, 7, 8, 9]
var obj1 = { x: 1, y: 2, }; var obj2 = { z: 3, } var newObj = { ...obj1, ...obj2, };
spreadArr
spreadObj
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Is there an existing proposal for this?
This feature does not exist in the latest version
Proposal
Add support for the spread syntax, which allows the direct insertion of arrays or objects into other arrays or objects.
Examples:
Exact behaviour / changes you want
spreadArr
andspreadObj
, which implement the underlying functionality.The text was updated successfully, but these errors were encountered: