File: objectLiteralFreshnessWithSpread.errors.txt

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (11 lines) | stat: -rw-r--r-- 794 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
tests/cases/compiler/objectLiteralFreshnessWithSpread.ts(2,35): error TS2322: Type '{ z: number; b: number; extra: number; a: number; }' is not assignable to type '{ a: any; b: any; }'.
  Object literal may only specify known properties, and 'z' does not exist in type '{ a: any; b: any; }'.


==== tests/cases/compiler/objectLiteralFreshnessWithSpread.ts (1 errors) ====
    let x = { b: 1, extra: 2 }
    let xx: { a, b }  = { a: 1, ...x, z: 3 } // error for 'z', no error for 'extra'
                                      ~~~~
!!! error TS2322: Type '{ z: number; b: number; extra: number; a: number; }' is not assignable to type '{ a: any; b: any; }'.
!!! error TS2322:   Object literal may only specify known properties, and 'z' does not exist in type '{ a: any; b: any; }'.