swc/crates/swc_ecma_parser/tests/tsc/objectRestPropertyMustBeLast.ts

6 lines
281 B
TypeScript

var {...a, x } = { x: 1 }; // Error, rest must be last property
({...a, x } = { x: 1 }); // Error, rest must be last property
var {...a, x, ...b } = { x: 1 }; // Error, rest must be last property
({...a, x, ...b } = { x: 1 }); // Error, rest must be last property