File: declarationEmitDestructuringObjectLiteralPattern1.errors.txt

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (29 lines) | stat: -rw-r--r-- 2,397 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts(2,13): error TS2353: Object literal may only specify known properties, and 'x' does not exist in type '{}'.
tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts(2,19): error TS2353: Object literal may only specify known properties, and 'y' does not exist in type '{}'.
tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts(3,23): error TS2353: Object literal may only specify known properties, and 'y4' does not exist in type '{ x4: any; }'.
tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts(4,16): error TS2353: Object literal may only specify known properties, and 'x5' does not exist in type '{ y5: any; }'.
tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts(6,27): error TS2353: Object literal may only specify known properties, and 'y7' does not exist in type '{ x7: any; }'.
tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts(7,20): error TS2353: Object literal may only specify known properties, and 'x8' does not exist in type '{ y8: any; }'.


==== tests/cases/compiler/declarationEmitDestructuringObjectLiteralPattern1.ts (6 errors) ====
    
    var { } = { x: 5, y: "hello" };
                ~
!!! error TS2353: Object literal may only specify known properties, and 'x' does not exist in type '{}'.
                      ~
!!! error TS2353: Object literal may only specify known properties, and 'y' does not exist in type '{}'.
    var { x4 } = { x4: 5, y4: "hello" };
                          ~~
!!! error TS2353: Object literal may only specify known properties, and 'y4' does not exist in type '{ x4: any; }'.
    var { y5 } = { x5: 5, y5: "hello" };
                   ~~
!!! error TS2353: Object literal may only specify known properties, and 'x5' does not exist in type '{ y5: any; }'.
    var { x6, y6 } = { x6: 5, y6: "hello" };
    var { x7: a1 } = { x7: 5, y7: "hello" };
                              ~~
!!! error TS2353: Object literal may only specify known properties, and 'y7' does not exist in type '{ x7: any; }'.
    var { y8: b1 } = { x8: 5, y8: "hello" };
                       ~~
!!! error TS2353: Object literal may only specify known properties, and 'x8' does not exist in type '{ y8: any; }'.
    var { x9: a2, y9: b2 } = { x9: 5, y9: "hello" };