File: objectRestPropertyMustBeLast.errors.txt

package info (click to toggle)
node-typescript 5.0.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 459,140 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (21 lines) | stat: -rw-r--r-- 1,333 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
tests/cases/conformance/types/rest/objectRestPropertyMustBeLast.ts(1,9): error TS2462: A rest element must be last in a destructuring pattern.
tests/cases/conformance/types/rest/objectRestPropertyMustBeLast.ts(2,3): error TS2462: A rest element must be last in a destructuring pattern.
tests/cases/conformance/types/rest/objectRestPropertyMustBeLast.ts(4,9): error TS2462: A rest element must be last in a destructuring pattern.
tests/cases/conformance/types/rest/objectRestPropertyMustBeLast.ts(5,3): error TS2462: A rest element must be last in a destructuring pattern.


==== tests/cases/conformance/types/rest/objectRestPropertyMustBeLast.ts (4 errors) ====
    var {...a, x } = { x: 1 };    // Error, rest must be last property
            ~
!!! error TS2462: A rest element must be last in a destructuring pattern.
    ({...a, x } = { x: 1 });      // Error, rest must be last property
      ~~~~
!!! error TS2462: A rest element must be last in a destructuring pattern.
    
    var {...a, x, ...b } = { x: 1 };    // Error, rest must be last property
            ~
!!! error TS2462: A rest element must be last in a destructuring pattern.
    ({...a, x, ...b } = { x: 1 });      // Error, rest must be last property
      ~~~~
!!! error TS2462: A rest element must be last in a destructuring pattern.