33 lines
821 B
Text
33 lines
821 B
Text
|
=== tests/cases/compiler/declarationEmitDestructuring4.ts ===
|
||
|
function baz([]) { }
|
||
|
>baz : ([]: any[]) => void
|
||
|
|
||
|
function baz1([] = [1,2,3]) { }
|
||
|
>baz1 : ([]?: number[]) => void
|
||
|
>[1,2,3] : number[]
|
||
|
|
||
|
function baz2([[]] = [[1,2,3]]) { }
|
||
|
>baz2 : ([[]]?: [number[]]) => void
|
||
|
>[[1,2,3]] : [number[]]
|
||
|
>[1,2,3] : number[]
|
||
|
|
||
|
function baz3({}) { }
|
||
|
>baz3 : ({}: {}) => void
|
||
|
|
||
|
function baz4({} = { x: 10 }) { }
|
||
|
>baz4 : ({}?: { x: number; }) => void
|
||
|
>{ x: 10 } : { x: number; }
|
||
|
>x : number
|
||
|
|
||
|
function baz5({} = { x: 10, y: { a: 2 }, z: [1,2] }) { }
|
||
|
>baz5 : ({}?: { x: number; y: { a: number; }; z: number[]; }) => void
|
||
|
>{ x: 10, y: { a: 2 }, z: [1,2] } : { x: number; y: { a: number; }; z: number[]; }
|
||
|
>x : number
|
||
|
>y : { a: number; }
|
||
|
>{ a: 2 } : { a: number; }
|
||
|
>a : number
|
||
|
>z : number[]
|
||
|
>[1,2] : number[]
|
||
|
|
||
|
|