File: declarationEmitDestructuring4.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 (17 lines) | stat: -rw-r--r-- 733 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
tests/cases/compiler/declarationEmitDestructuring4.ts(9,22): error TS2353: Object literal may only specify known properties, and 'x' does not exist in type '{}'.


==== tests/cases/compiler/declarationEmitDestructuring4.ts (1 errors) ====
    // For an array binding pattern with empty elements,
    // we will not make any modification and will emit
    // the similar binding pattern users' have written
    function baz([]) { }
    function baz1([] = [1,2,3]) { }
    function baz2([[]] = [[1,2,3]]) { }
    
    function baz3({}) { }
    function baz4({} = { x: 10 }) { }
                         ~
!!! error TS2353: Object literal may only specify known properties, and 'x' does not exist in type '{}'.