ecmascript 6 - What is the name of that ES6 feature where you use the spread syntax in object literals? -
i think valid es6:
o = { a: 1, b: 2 }; p = { ...o, // <--- c: 3 }; // p == {a: 1, b: 2, c: 3}
as seems feature not included in babel's es2015
preset. investigating further, trying find out under conditions babel's env
preset include it.
this requires me locate feature in es6 compatibility table, cannot find it. name?
rest/spread properties name of specification proposal.
the reason can't find in es6 table because stage 3 proposal , not part of es6 spec. need in next section:
http://kangax.github.io/compat-table/esnext/#test-object_rest/spread_properties
Comments
Post a Comment