17 lines
733 B
Plaintext
17 lines
733 B
Plaintext
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 '{}'.
|
|
|
|
|