TypeScript/tests/baselines/reference/declarationEmitDestructuring3.types
2015-04-13 14:29:37 -07:00

18 lines
863 B
Plaintext

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