Kagami Sascha Rosylight 3ae5e79ec8 Differentiate object spread and non-spread properties (#9341)
* add isSpread field

* use argument

* t.booleanLiteral

* fix typo

* push empty-argument object

* .object

* .value

* object field should be an expression

* lint

* update outputs

* isSpread for the second argument is redundant

* add test

* alternating spread
2019-01-21 22:04:47 +01:00

10 lines
169 B
JavaScript

({ x, ...y, a, ...b, c });
({ ...Object.prototype });
({ ...{ foo: 'bar' } });
({ ...{ foo: 'bar' }, ...{ bar: 'baz' } });
({ ...{ get foo () { return 'foo' } } });