forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeclarationEmitDestructuring5.types
More file actions
45 lines (39 loc) · 1.11 KB
/
declarationEmitDestructuring5.types
File metadata and controls
45 lines (39 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//// [tests/cases/compiler/declarationEmitDestructuring5.ts] ////
=== declarationEmitDestructuring5.ts ===
function baz([, z, , ]) { }
>baz : ([, z, ,]: [any, any, any?]) => void
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>z : any
> : ^^^
function foo([, b, ]: [any, any]): void { }
>foo : ([, b,]: [any, any]) => void
> : ^ ^^ ^^^^^
>b : any
> : ^^^
function bar([z, , , ]) { }
>bar : ([z, , ,]: [any, any?, any?]) => void
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>z : any
> : ^^^
function bar1([z, , , ] = [1, 3, 4, 6, 7]) { }
>bar1 : ([z, , ,]?: [number, number, number, number, number]) => void
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>z : number
> : ^^^^^^
>[1, 3, 4, 6, 7] : [number, number, number, number, number]
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>1 : 1
> : ^
>3 : 3
> : ^
>4 : 4
> : ^
>6 : 6
> : ^
>7 : 7
> : ^
function bar2([,,z, , , ]) { }
>bar2 : ([, , z, , ,]: [any, any, any, any?, any?]) => void
> : ^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>z : any
> : ^^^