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

3 lines
128 B
TypeScript

var [...a, x] = [1, 2, 3]; // Error, rest must be last element
[...a, x] = [1, 2, 3]; // Error, rest must be last element