2015-04-07 01:24:55 +02:00
|
|
|
=== tests/cases/compiler/arrayBindingPatternOmittedExpressions.ts ===
|
2015-04-07 00:32:22 +02:00
|
|
|
|
|
|
|
var results: string[];
|
|
|
|
>results : string[]
|
|
|
|
|
|
|
|
{
|
|
|
|
let [, b, , a] = results;
|
|
|
|
>b : string
|
|
|
|
>a : string
|
|
|
|
>results : string[]
|
|
|
|
|
|
|
|
let x = {
|
|
|
|
>x : { a: string; b: string; }
|
|
|
|
>{ a, b } : { a: string; b: string; }
|
|
|
|
|
|
|
|
a,
|
|
|
|
>a : string
|
|
|
|
|
|
|
|
b
|
|
|
|
>b : string
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function f([, a, , b, , , , s, , , ] = results) {
|
|
|
|
>f : ([, a, , b, , , , s, , , ]?: string[]) => void
|
|
|
|
>a : string
|
|
|
|
>b : string
|
|
|
|
>s : string
|
|
|
|
>results : string[]
|
|
|
|
|
|
|
|
a = s[1];
|
|
|
|
>a = s[1] : string
|
|
|
|
>a : string
|
|
|
|
>s[1] : string
|
|
|
|
>s : string
|
|
|
|
|
|
|
|
b = s[2];
|
|
|
|
>b = s[2] : string
|
|
|
|
>b : string
|
|
|
|
>s[2] : string
|
|
|
|
>s : string
|
|
|
|
}
|