TypeScript/tests/baselines/reference/declarationEmitDestructuring3.types
2015-04-15 16:44:20 -07:00

18 lines
454 B
Plaintext

=== tests/cases/compiler/declarationEmitDestructuring3.ts ===
function bar([x, z, ...w]) { }
>bar : ([x, z, ...w]: any[]) => void
>x : any
>z : any
>w : any[]
function foo([x, ...y] = [1, "string", true]) { }
>foo : ([x, ...y]?: (string | number | boolean)[]) => void
>x : string | number | boolean
>y : (string | number | boolean)[]
>[1, "string", true] : (string | number | boolean)[]
>1 : number
>"string" : string
>true : boolean