44 lines
680 B
Text
44 lines
680 B
Text
|
=== tests/cases/compiler/arrayBindingPattern.ts ===
|
||
|
|
||
|
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
|
||
|
}
|