2015-03-24 01:58:53 +01:00
|
|
|
=== tests/cases/compiler/declarationEmitDestructuring2.ts ===
|
2015-03-23 19:30:51 +01:00
|
|
|
function f({x = 10, y: [a, b, c, d] = [1, 2, 3, 4]} = { x: 10, y: [2, 4, 6, 8] }) { }
|
|
|
|
>f : ({x = 10, y: [a, b, c, d] = [1, 2, 3, 4]}?: { x: number; y: [number, number, number, number]; }) => void
|
|
|
|
>x : number
|
|
|
|
>y : unknown
|
|
|
|
>a : number
|
|
|
|
>b : number
|
|
|
|
>c : number
|
|
|
|
>d : number
|
|
|
|
>[1, 2, 3, 4] : [number, number, number, number]
|
|
|
|
>{ x: 10, y: [2, 4, 6, 8] } : { x: number; y: [number, number, number, number]; }
|
|
|
|
>x : number
|
|
|
|
>y : [number, number, number, number]
|
|
|
|
>[2, 4, 6, 8] : [number, number, number, number]
|
|
|
|
|
|
|
|
function g([a, b, c, d] = [1, 2, 3, 4]) { }
|
|
|
|
>g : ([a, b, c, d]?: [number, number, number, number]) => void
|
|
|
|
>a : number
|
|
|
|
>b : number
|
|
|
|
>c : number
|
|
|
|
>d : number
|
|
|
|
>[1, 2, 3, 4] : [number, number, number, number]
|
|
|
|
|
|
|
|
function h([a, [b], [[c]], {x = 10, y: [a, b, c], z: {a1, b1}}]){ }
|
|
|
|
>h : ([a, [b], [[c]], {x = 10, y: [a, b, c], z: {a1, b1}}]: [any, [any], [[any]], { x?: number; y: [any, any, any]; z: { a1: any; b1: any; }; }]) => void
|
|
|
|
>a : any
|
|
|
|
>b : any
|
|
|
|
>c : any
|
|
|
|
>x : number
|
|
|
|
>y : unknown
|
|
|
|
>a : any
|
|
|
|
>b : any
|
|
|
|
>c : any
|
|
|
|
>z : unknown
|
|
|
|
>a1 : any
|
|
|
|
>b1 : any
|
|
|
|
|
|
|
|
function h1([a, [b], [[c]], {x = 10, y = [1, 2, 3], z: {a1, b1}}]){ }
|
|
|
|
>h1 : ([a, [b], [[c]], {x = 10, y = [1, 2, 3], z: {a1, b1}}]: [any, [any], [[any]], { x?: number; y?: number[]; z: { a1: any; b1: any; }; }]) => void
|
|
|
|
>a : any
|
|
|
|
>b : any
|
|
|
|
>c : any
|
|
|
|
>x : number
|
|
|
|
>y : number[]
|
|
|
|
>[1, 2, 3] : number[]
|
|
|
|
>z : unknown
|
|
|
|
>a1 : any
|
|
|
|
>b1 : any
|
|
|
|
|