-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Expand file tree
/
Copy pathdeclarationEmitNestedBindingPattern.js
More file actions
142 lines (129 loc) · 2.81 KB
/
declarationEmitNestedBindingPattern.js
File metadata and controls
142 lines (129 loc) · 2.81 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
//// [tests/cases/compiler/declarationEmitNestedBindingPattern.ts] ////
//// [declarationEmitNestedBindingPattern.ts]
// Nested array binding pattern
export class C1 {
constructor(public [[x]]: any[]) {}
}
// Nested object binding pattern
export class C2 {
constructor(public [{y}]: any[]) {}
}
// Multiple levels of array nesting
export class C3 {
constructor(public [[[z]]]: any[]) {}
}
// Mixed array and object nesting
export class C4 {
constructor(public [{a: [b]}]: any[]) {}
}
// Object with nested array
export class C5 {
constructor(public {prop: [c]}: any) {}
}
// Object with multiple nested levels
export class C6 {
constructor(public {prop: {nested: [d]}}: any) {}
}
// Multiple parameters with nested patterns
export class C7 {
constructor(
public [[e]]: any[],
public [{f}]: any[]
) {}
}
// Nested pattern with rest element
export class C8 {
constructor(public [[g, ...rest]]: any[]) {}
}
// Complex nested pattern
export class C9 {
constructor(public [[h, i], {j, k: [l]}]: any) {}
}
//// [declarationEmitNestedBindingPattern.js]
// Nested array binding pattern
export class C1 {
constructor([[x]]) {
}
}
// Nested object binding pattern
export class C2 {
constructor([{ y }]) {
}
}
// Multiple levels of array nesting
export class C3 {
constructor([[[z]]]) {
}
}
// Mixed array and object nesting
export class C4 {
constructor([{ a: [b] }]) {
}
}
// Object with nested array
export class C5 {
constructor({ prop: [c] }) {
}
}
// Object with multiple nested levels
export class C6 {
constructor({ prop: { nested: [d] } }) {
}
}
// Multiple parameters with nested patterns
export class C7 {
constructor([[e]], [{ f }]) {
}
}
// Nested pattern with rest element
export class C8 {
constructor([[g, ...rest]]) {
}
}
// Complex nested pattern
export class C9 {
constructor([[h, i], { j, k: [l] }]) {
}
}
//// [declarationEmitNestedBindingPattern.d.ts]
export declare class C1 {
x: any;
constructor([[x]]: any[]);
}
export declare class C2 {
y: any;
constructor([{ y }]: any[]);
}
export declare class C3 {
z: any;
constructor([[[z]]]: any[]);
}
export declare class C4 {
b: any;
constructor([{ a: [b] }]: any[]);
}
export declare class C5 {
c: any;
constructor({ prop: [c] }: any);
}
export declare class C6 {
d: any;
constructor({ prop: { nested: [d] } }: any);
}
export declare class C7 {
e: any;
f: any;
constructor([[e]]: any[], [{ f }]: any[]);
}
export declare class C8 {
g: any;
rest: any;
constructor([[g, ...rest]]: any[]);
}
export declare class C9 {
h: any;
i: any;
j: any;
l: any;
constructor([[h, i], { j, k: [l] }]: any);
}