TypeScript/tests/cases/conformance/es6/destructuring/destructuringSpread.ts
Andrew Branch 1236a1006c
Fix initialization error when destructuring from object literal that includes a spread assignment (#36865)
* Add test

* Fix superfluous error when destructuring from object that includes spread assignment

* Update baseline to include error case

* Remove redundant check
2020-02-19 08:28:12 -08:00

28 lines
246 B
TypeScript

const { x } = {
...{},
x: 0
};
const { y } = {
y: 0,
...{}
};
const { z, a, b } = {
z: 0,
...{ a: 0, b: 0 }
};
const { c, d, e, f, g } = {
...{
...{
...{
c: 0,
},
d: 0
},
e: 0
},
f: 0
};