21 lines
788 B
Text
21 lines
788 B
Text
=== tests/cases/compiler/declarationEmitDestructuring4.ts ===
|
|
// 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([]) { }
|
|
>baz : Symbol(baz, Decl(declarationEmitDestructuring4.ts, 0, 0))
|
|
|
|
function baz1([] = [1,2,3]) { }
|
|
>baz1 : Symbol(baz1, Decl(declarationEmitDestructuring4.ts, 3, 20))
|
|
|
|
function baz2([[]] = [[1,2,3]]) { }
|
|
>baz2 : Symbol(baz2, Decl(declarationEmitDestructuring4.ts, 4, 31))
|
|
|
|
function baz3({}) { }
|
|
>baz3 : Symbol(baz3, Decl(declarationEmitDestructuring4.ts, 5, 35))
|
|
|
|
function baz4({} = { x: 10 }) { }
|
|
>baz4 : Symbol(baz4, Decl(declarationEmitDestructuring4.ts, 7, 21))
|
|
>x : Symbol(x, Decl(declarationEmitDestructuring4.ts, 8, 20))
|
|
|
|
|