@oxc-project/types 0.48.2 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/types.d.ts +249 -577
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -1,57 +1,11 @@
|
|
|
1
1
|
// Auto-generated code, DO NOT EDIT DIRECTLY!
|
|
2
2
|
// To edit this generated file you have to edit `tasks/ast_tools/src/generators/typescript.rs`
|
|
3
3
|
|
|
4
|
-
export interface BooleanLiteral extends Span {
|
|
5
|
-
type: 'Literal';
|
|
6
|
-
value: boolean;
|
|
7
|
-
raw: string | null;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface NullLiteral extends Span {
|
|
11
|
-
type: 'Literal';
|
|
12
|
-
value: null;
|
|
13
|
-
raw: 'null' | null;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export interface NumericLiteral extends Span {
|
|
17
|
-
type: 'Literal';
|
|
18
|
-
value: number;
|
|
19
|
-
raw: string | null;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export interface StringLiteral extends Span {
|
|
23
|
-
type: 'Literal';
|
|
24
|
-
value: string;
|
|
25
|
-
raw: string | null;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface BigIntLiteral extends Span {
|
|
29
|
-
type: 'Literal';
|
|
30
|
-
raw: string | null;
|
|
31
|
-
value: null;
|
|
32
|
-
bigint: string;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export interface RegExpLiteral extends Span {
|
|
36
|
-
type: 'Literal';
|
|
37
|
-
raw: string | null;
|
|
38
|
-
value: {} | null;
|
|
39
|
-
regex: { pattern: string; flags: string };
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface RegExp {
|
|
43
|
-
pattern: RegExpPattern;
|
|
44
|
-
flags: RegExpFlags;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export type RegExpPattern = string | string | Pattern;
|
|
48
|
-
|
|
49
4
|
export interface Program extends Span {
|
|
50
5
|
type: 'Program';
|
|
51
|
-
sourceType:
|
|
6
|
+
sourceType: ModuleKind;
|
|
52
7
|
hashbang: Hashbang | null;
|
|
53
|
-
|
|
54
|
-
body: Array<Statement>;
|
|
8
|
+
body: Array<Directive | Statement>;
|
|
55
9
|
}
|
|
56
10
|
|
|
57
11
|
export type Expression =
|
|
@@ -94,9 +48,7 @@ export type Expression =
|
|
|
94
48
|
| TSTypeAssertion
|
|
95
49
|
| TSNonNullExpression
|
|
96
50
|
| TSInstantiationExpression
|
|
97
|
-
|
|
|
98
|
-
| StaticMemberExpression
|
|
99
|
-
| PrivateFieldExpression;
|
|
51
|
+
| MemberExpression;
|
|
100
52
|
|
|
101
53
|
export interface IdentifierName extends Span {
|
|
102
54
|
type: 'Identifier';
|
|
@@ -124,9 +76,11 @@ export interface ThisExpression extends Span {
|
|
|
124
76
|
|
|
125
77
|
export interface ArrayExpression extends Span {
|
|
126
78
|
type: 'ArrayExpression';
|
|
127
|
-
elements: Array<
|
|
79
|
+
elements: Array<ArrayExpressionElement>;
|
|
128
80
|
}
|
|
129
81
|
|
|
82
|
+
export type ArrayExpressionElement = SpreadElement | null | Expression;
|
|
83
|
+
|
|
130
84
|
export interface ObjectExpression extends Span {
|
|
131
85
|
type: 'ObjectExpression';
|
|
132
86
|
properties: Array<ObjectPropertyKind>;
|
|
@@ -135,7 +89,7 @@ export interface ObjectExpression extends Span {
|
|
|
135
89
|
export type ObjectPropertyKind = ObjectProperty | SpreadElement;
|
|
136
90
|
|
|
137
91
|
export interface ObjectProperty extends Span {
|
|
138
|
-
type: '
|
|
92
|
+
type: 'Property';
|
|
139
93
|
kind: PropertyKind;
|
|
140
94
|
key: PropertyKey;
|
|
141
95
|
value: Expression;
|
|
@@ -144,51 +98,7 @@ export interface ObjectProperty extends Span {
|
|
|
144
98
|
computed: boolean;
|
|
145
99
|
}
|
|
146
100
|
|
|
147
|
-
export type PropertyKey =
|
|
148
|
-
| IdentifierName
|
|
149
|
-
| PrivateIdentifier
|
|
150
|
-
| BooleanLiteral
|
|
151
|
-
| NullLiteral
|
|
152
|
-
| NumericLiteral
|
|
153
|
-
| BigIntLiteral
|
|
154
|
-
| RegExpLiteral
|
|
155
|
-
| StringLiteral
|
|
156
|
-
| TemplateLiteral
|
|
157
|
-
| IdentifierReference
|
|
158
|
-
| MetaProperty
|
|
159
|
-
| Super
|
|
160
|
-
| ArrayExpression
|
|
161
|
-
| ArrowFunctionExpression
|
|
162
|
-
| AssignmentExpression
|
|
163
|
-
| AwaitExpression
|
|
164
|
-
| BinaryExpression
|
|
165
|
-
| CallExpression
|
|
166
|
-
| ChainExpression
|
|
167
|
-
| Class
|
|
168
|
-
| ConditionalExpression
|
|
169
|
-
| Function
|
|
170
|
-
| ImportExpression
|
|
171
|
-
| LogicalExpression
|
|
172
|
-
| NewExpression
|
|
173
|
-
| ObjectExpression
|
|
174
|
-
| ParenthesizedExpression
|
|
175
|
-
| SequenceExpression
|
|
176
|
-
| TaggedTemplateExpression
|
|
177
|
-
| ThisExpression
|
|
178
|
-
| UnaryExpression
|
|
179
|
-
| UpdateExpression
|
|
180
|
-
| YieldExpression
|
|
181
|
-
| PrivateInExpression
|
|
182
|
-
| JSXElement
|
|
183
|
-
| JSXFragment
|
|
184
|
-
| TSAsExpression
|
|
185
|
-
| TSSatisfiesExpression
|
|
186
|
-
| TSTypeAssertion
|
|
187
|
-
| TSNonNullExpression
|
|
188
|
-
| TSInstantiationExpression
|
|
189
|
-
| ComputedMemberExpression
|
|
190
|
-
| StaticMemberExpression
|
|
191
|
-
| PrivateFieldExpression;
|
|
101
|
+
export type PropertyKey = IdentifierName | PrivateIdentifier | Expression;
|
|
192
102
|
|
|
193
103
|
export type PropertyKind = 'init' | 'get' | 'set';
|
|
194
104
|
|
|
@@ -219,24 +129,27 @@ export interface TemplateElementValue {
|
|
|
219
129
|
export type MemberExpression = ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression;
|
|
220
130
|
|
|
221
131
|
export interface ComputedMemberExpression extends Span {
|
|
222
|
-
type: '
|
|
132
|
+
type: 'MemberExpression';
|
|
223
133
|
object: Expression;
|
|
224
|
-
|
|
134
|
+
property: Expression;
|
|
225
135
|
optional: boolean;
|
|
136
|
+
computed: true;
|
|
226
137
|
}
|
|
227
138
|
|
|
228
139
|
export interface StaticMemberExpression extends Span {
|
|
229
|
-
type: '
|
|
140
|
+
type: 'MemberExpression';
|
|
230
141
|
object: Expression;
|
|
231
142
|
property: IdentifierName;
|
|
232
143
|
optional: boolean;
|
|
144
|
+
computed: false;
|
|
233
145
|
}
|
|
234
146
|
|
|
235
147
|
export interface PrivateFieldExpression extends Span {
|
|
236
|
-
type: '
|
|
148
|
+
type: 'MemberExpression';
|
|
237
149
|
object: Expression;
|
|
238
|
-
|
|
150
|
+
property: PrivateIdentifier;
|
|
239
151
|
optional: boolean;
|
|
152
|
+
computed: false;
|
|
240
153
|
}
|
|
241
154
|
|
|
242
155
|
export interface CallExpression extends Span {
|
|
@@ -265,50 +178,7 @@ export interface SpreadElement extends Span {
|
|
|
265
178
|
argument: Expression;
|
|
266
179
|
}
|
|
267
180
|
|
|
268
|
-
export type Argument =
|
|
269
|
-
| SpreadElement
|
|
270
|
-
| BooleanLiteral
|
|
271
|
-
| NullLiteral
|
|
272
|
-
| NumericLiteral
|
|
273
|
-
| BigIntLiteral
|
|
274
|
-
| RegExpLiteral
|
|
275
|
-
| StringLiteral
|
|
276
|
-
| TemplateLiteral
|
|
277
|
-
| IdentifierReference
|
|
278
|
-
| MetaProperty
|
|
279
|
-
| Super
|
|
280
|
-
| ArrayExpression
|
|
281
|
-
| ArrowFunctionExpression
|
|
282
|
-
| AssignmentExpression
|
|
283
|
-
| AwaitExpression
|
|
284
|
-
| BinaryExpression
|
|
285
|
-
| CallExpression
|
|
286
|
-
| ChainExpression
|
|
287
|
-
| Class
|
|
288
|
-
| ConditionalExpression
|
|
289
|
-
| Function
|
|
290
|
-
| ImportExpression
|
|
291
|
-
| LogicalExpression
|
|
292
|
-
| NewExpression
|
|
293
|
-
| ObjectExpression
|
|
294
|
-
| ParenthesizedExpression
|
|
295
|
-
| SequenceExpression
|
|
296
|
-
| TaggedTemplateExpression
|
|
297
|
-
| ThisExpression
|
|
298
|
-
| UnaryExpression
|
|
299
|
-
| UpdateExpression
|
|
300
|
-
| YieldExpression
|
|
301
|
-
| PrivateInExpression
|
|
302
|
-
| JSXElement
|
|
303
|
-
| JSXFragment
|
|
304
|
-
| TSAsExpression
|
|
305
|
-
| TSSatisfiesExpression
|
|
306
|
-
| TSTypeAssertion
|
|
307
|
-
| TSNonNullExpression
|
|
308
|
-
| TSInstantiationExpression
|
|
309
|
-
| ComputedMemberExpression
|
|
310
|
-
| StaticMemberExpression
|
|
311
|
-
| PrivateFieldExpression;
|
|
181
|
+
export type Argument = SpreadElement | Expression;
|
|
312
182
|
|
|
313
183
|
export interface UpdateExpression extends Span {
|
|
314
184
|
type: 'UpdateExpression';
|
|
@@ -321,6 +191,7 @@ export interface UnaryExpression extends Span {
|
|
|
321
191
|
type: 'UnaryExpression';
|
|
322
192
|
operator: UnaryOperator;
|
|
323
193
|
argument: Expression;
|
|
194
|
+
prefix: true;
|
|
324
195
|
}
|
|
325
196
|
|
|
326
197
|
export interface BinaryExpression extends Span {
|
|
@@ -331,10 +202,10 @@ export interface BinaryExpression extends Span {
|
|
|
331
202
|
}
|
|
332
203
|
|
|
333
204
|
export interface PrivateInExpression extends Span {
|
|
334
|
-
type: '
|
|
205
|
+
type: 'BinaryExpression';
|
|
335
206
|
left: PrivateIdentifier;
|
|
336
|
-
operator: BinaryOperator;
|
|
337
207
|
right: Expression;
|
|
208
|
+
operator: 'in';
|
|
338
209
|
}
|
|
339
210
|
|
|
340
211
|
export interface LogicalExpression extends Span {
|
|
@@ -358,18 +229,7 @@ export interface AssignmentExpression extends Span {
|
|
|
358
229
|
right: Expression;
|
|
359
230
|
}
|
|
360
231
|
|
|
361
|
-
export type AssignmentTarget =
|
|
362
|
-
| IdentifierReference
|
|
363
|
-
| TSAsExpression
|
|
364
|
-
| TSSatisfiesExpression
|
|
365
|
-
| TSNonNullExpression
|
|
366
|
-
| TSTypeAssertion
|
|
367
|
-
| TSInstantiationExpression
|
|
368
|
-
| ComputedMemberExpression
|
|
369
|
-
| StaticMemberExpression
|
|
370
|
-
| PrivateFieldExpression
|
|
371
|
-
| ArrayAssignmentTarget
|
|
372
|
-
| ObjectAssignmentTarget;
|
|
232
|
+
export type AssignmentTarget = SimpleAssignmentTarget | AssignmentTargetPattern;
|
|
373
233
|
|
|
374
234
|
export type SimpleAssignmentTarget =
|
|
375
235
|
| IdentifierReference
|
|
@@ -378,20 +238,18 @@ export type SimpleAssignmentTarget =
|
|
|
378
238
|
| TSNonNullExpression
|
|
379
239
|
| TSTypeAssertion
|
|
380
240
|
| TSInstantiationExpression
|
|
381
|
-
|
|
|
382
|
-
| StaticMemberExpression
|
|
383
|
-
| PrivateFieldExpression;
|
|
241
|
+
| MemberExpression;
|
|
384
242
|
|
|
385
243
|
export type AssignmentTargetPattern = ArrayAssignmentTarget | ObjectAssignmentTarget;
|
|
386
244
|
|
|
387
245
|
export interface ArrayAssignmentTarget extends Span {
|
|
388
|
-
type: '
|
|
389
|
-
elements: Array<
|
|
246
|
+
type: 'ArrayPattern';
|
|
247
|
+
elements: Array<AssignmentTargetMaybeDefault | AssignmentTargetRest | null>;
|
|
390
248
|
}
|
|
391
249
|
|
|
392
250
|
export interface ObjectAssignmentTarget extends Span {
|
|
393
|
-
type: '
|
|
394
|
-
properties: Array<
|
|
251
|
+
type: 'ObjectPattern';
|
|
252
|
+
properties: Array<AssignmentTargetProperty | AssignmentTargetRest>;
|
|
395
253
|
}
|
|
396
254
|
|
|
397
255
|
export interface AssignmentTargetRest extends Span {
|
|
@@ -399,39 +257,34 @@ export interface AssignmentTargetRest extends Span {
|
|
|
399
257
|
argument: AssignmentTarget;
|
|
400
258
|
}
|
|
401
259
|
|
|
402
|
-
export type AssignmentTargetMaybeDefault =
|
|
403
|
-
| AssignmentTargetWithDefault
|
|
404
|
-
| IdentifierReference
|
|
405
|
-
| TSAsExpression
|
|
406
|
-
| TSSatisfiesExpression
|
|
407
|
-
| TSNonNullExpression
|
|
408
|
-
| TSTypeAssertion
|
|
409
|
-
| TSInstantiationExpression
|
|
410
|
-
| ComputedMemberExpression
|
|
411
|
-
| StaticMemberExpression
|
|
412
|
-
| PrivateFieldExpression
|
|
413
|
-
| ArrayAssignmentTarget
|
|
414
|
-
| ObjectAssignmentTarget;
|
|
260
|
+
export type AssignmentTargetMaybeDefault = AssignmentTargetWithDefault | AssignmentTarget;
|
|
415
261
|
|
|
416
262
|
export interface AssignmentTargetWithDefault extends Span {
|
|
417
|
-
type: '
|
|
418
|
-
|
|
419
|
-
|
|
263
|
+
type: 'AssignmentPattern';
|
|
264
|
+
left: AssignmentTarget;
|
|
265
|
+
right: Expression;
|
|
420
266
|
}
|
|
421
267
|
|
|
422
268
|
export type AssignmentTargetProperty = AssignmentTargetPropertyIdentifier | AssignmentTargetPropertyProperty;
|
|
423
269
|
|
|
424
270
|
export interface AssignmentTargetPropertyIdentifier extends Span {
|
|
425
|
-
type: '
|
|
426
|
-
|
|
427
|
-
|
|
271
|
+
type: 'Property';
|
|
272
|
+
key: IdentifierReference;
|
|
273
|
+
value: IdentifierReference | AssignmentTargetWithDefault;
|
|
274
|
+
kind: 'init';
|
|
275
|
+
method: false;
|
|
276
|
+
shorthand: false;
|
|
277
|
+
computed: false;
|
|
428
278
|
}
|
|
429
279
|
|
|
430
280
|
export interface AssignmentTargetPropertyProperty extends Span {
|
|
431
|
-
type: '
|
|
432
|
-
|
|
433
|
-
|
|
281
|
+
type: 'Property';
|
|
282
|
+
key: PropertyKey;
|
|
283
|
+
value: AssignmentTargetMaybeDefault;
|
|
434
284
|
computed: boolean;
|
|
285
|
+
kind: 'init';
|
|
286
|
+
method: false;
|
|
287
|
+
shorthand: false;
|
|
435
288
|
}
|
|
436
289
|
|
|
437
290
|
export interface SequenceExpression extends Span {
|
|
@@ -453,12 +306,7 @@ export interface ChainExpression extends Span {
|
|
|
453
306
|
expression: ChainElement;
|
|
454
307
|
}
|
|
455
308
|
|
|
456
|
-
export type ChainElement =
|
|
457
|
-
| CallExpression
|
|
458
|
-
| TSNonNullExpression
|
|
459
|
-
| ComputedMemberExpression
|
|
460
|
-
| StaticMemberExpression
|
|
461
|
-
| PrivateFieldExpression;
|
|
309
|
+
export type ChainElement = CallExpression | TSNonNullExpression | MemberExpression;
|
|
462
310
|
|
|
463
311
|
export interface ParenthesizedExpression extends Span {
|
|
464
312
|
type: 'ParenthesizedExpression';
|
|
@@ -484,23 +332,11 @@ export type Statement =
|
|
|
484
332
|
| TryStatement
|
|
485
333
|
| WhileStatement
|
|
486
334
|
| WithStatement
|
|
487
|
-
|
|
|
488
|
-
|
|
|
489
|
-
| Class
|
|
490
|
-
| TSTypeAliasDeclaration
|
|
491
|
-
| TSInterfaceDeclaration
|
|
492
|
-
| TSEnumDeclaration
|
|
493
|
-
| TSModuleDeclaration
|
|
494
|
-
| TSImportEqualsDeclaration
|
|
495
|
-
| ImportDeclaration
|
|
496
|
-
| ExportAllDeclaration
|
|
497
|
-
| ExportDefaultDeclaration
|
|
498
|
-
| ExportNamedDeclaration
|
|
499
|
-
| TSExportAssignment
|
|
500
|
-
| TSNamespaceExportDeclaration;
|
|
335
|
+
| Declaration
|
|
336
|
+
| ModuleDeclaration;
|
|
501
337
|
|
|
502
338
|
export interface Directive extends Span {
|
|
503
|
-
type: '
|
|
339
|
+
type: 'ExpressionStatement';
|
|
504
340
|
expression: StringLiteral;
|
|
505
341
|
directive: string;
|
|
506
342
|
}
|
|
@@ -577,50 +413,7 @@ export interface ForStatement extends Span {
|
|
|
577
413
|
body: Statement;
|
|
578
414
|
}
|
|
579
415
|
|
|
580
|
-
export type ForStatementInit =
|
|
581
|
-
| VariableDeclaration
|
|
582
|
-
| BooleanLiteral
|
|
583
|
-
| NullLiteral
|
|
584
|
-
| NumericLiteral
|
|
585
|
-
| BigIntLiteral
|
|
586
|
-
| RegExpLiteral
|
|
587
|
-
| StringLiteral
|
|
588
|
-
| TemplateLiteral
|
|
589
|
-
| IdentifierReference
|
|
590
|
-
| MetaProperty
|
|
591
|
-
| Super
|
|
592
|
-
| ArrayExpression
|
|
593
|
-
| ArrowFunctionExpression
|
|
594
|
-
| AssignmentExpression
|
|
595
|
-
| AwaitExpression
|
|
596
|
-
| BinaryExpression
|
|
597
|
-
| CallExpression
|
|
598
|
-
| ChainExpression
|
|
599
|
-
| Class
|
|
600
|
-
| ConditionalExpression
|
|
601
|
-
| Function
|
|
602
|
-
| ImportExpression
|
|
603
|
-
| LogicalExpression
|
|
604
|
-
| NewExpression
|
|
605
|
-
| ObjectExpression
|
|
606
|
-
| ParenthesizedExpression
|
|
607
|
-
| SequenceExpression
|
|
608
|
-
| TaggedTemplateExpression
|
|
609
|
-
| ThisExpression
|
|
610
|
-
| UnaryExpression
|
|
611
|
-
| UpdateExpression
|
|
612
|
-
| YieldExpression
|
|
613
|
-
| PrivateInExpression
|
|
614
|
-
| JSXElement
|
|
615
|
-
| JSXFragment
|
|
616
|
-
| TSAsExpression
|
|
617
|
-
| TSSatisfiesExpression
|
|
618
|
-
| TSTypeAssertion
|
|
619
|
-
| TSNonNullExpression
|
|
620
|
-
| TSInstantiationExpression
|
|
621
|
-
| ComputedMemberExpression
|
|
622
|
-
| StaticMemberExpression
|
|
623
|
-
| PrivateFieldExpression;
|
|
416
|
+
export type ForStatementInit = VariableDeclaration | Expression;
|
|
624
417
|
|
|
625
418
|
export interface ForInStatement extends Span {
|
|
626
419
|
type: 'ForInStatement';
|
|
@@ -629,19 +422,7 @@ export interface ForInStatement extends Span {
|
|
|
629
422
|
body: Statement;
|
|
630
423
|
}
|
|
631
424
|
|
|
632
|
-
export type ForStatementLeft =
|
|
633
|
-
| VariableDeclaration
|
|
634
|
-
| IdentifierReference
|
|
635
|
-
| TSAsExpression
|
|
636
|
-
| TSSatisfiesExpression
|
|
637
|
-
| TSNonNullExpression
|
|
638
|
-
| TSTypeAssertion
|
|
639
|
-
| TSInstantiationExpression
|
|
640
|
-
| ComputedMemberExpression
|
|
641
|
-
| StaticMemberExpression
|
|
642
|
-
| PrivateFieldExpression
|
|
643
|
-
| ArrayAssignmentTarget
|
|
644
|
-
| ObjectAssignmentTarget;
|
|
425
|
+
export type ForStatementLeft = VariableDeclaration | AssignmentTarget;
|
|
645
426
|
|
|
646
427
|
export interface ForOfStatement extends Span {
|
|
647
428
|
type: 'ForOfStatement';
|
|
@@ -708,10 +489,12 @@ export interface CatchClause extends Span {
|
|
|
708
489
|
body: BlockStatement;
|
|
709
490
|
}
|
|
710
491
|
|
|
711
|
-
export
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
}
|
|
492
|
+
export type CatchParameter =
|
|
493
|
+
& ({
|
|
494
|
+
type: 'CatchParameter';
|
|
495
|
+
})
|
|
496
|
+
& Span
|
|
497
|
+
& BindingPattern;
|
|
715
498
|
|
|
716
499
|
export interface DebuggerStatement extends Span {
|
|
717
500
|
type: 'DebuggerStatement';
|
|
@@ -734,20 +517,22 @@ export interface AssignmentPattern extends Span {
|
|
|
734
517
|
|
|
735
518
|
export interface ObjectPattern extends Span {
|
|
736
519
|
type: 'ObjectPattern';
|
|
737
|
-
properties: Array<
|
|
520
|
+
properties: Array<BindingProperty | BindingRestElement>;
|
|
738
521
|
}
|
|
739
522
|
|
|
740
523
|
export interface BindingProperty extends Span {
|
|
741
|
-
type: '
|
|
524
|
+
type: 'Property';
|
|
742
525
|
key: PropertyKey;
|
|
743
526
|
value: BindingPattern;
|
|
744
527
|
shorthand: boolean;
|
|
745
528
|
computed: boolean;
|
|
529
|
+
kind: 'init';
|
|
530
|
+
method: false;
|
|
746
531
|
}
|
|
747
532
|
|
|
748
533
|
export interface ArrayPattern extends Span {
|
|
749
534
|
type: 'ArrayPattern';
|
|
750
|
-
elements: Array<
|
|
535
|
+
elements: Array<BindingPattern | BindingRestElement | null>;
|
|
751
536
|
}
|
|
752
537
|
|
|
753
538
|
export interface BindingRestElement extends Span {
|
|
@@ -763,11 +548,14 @@ export interface Function extends Span {
|
|
|
763
548
|
declare: boolean;
|
|
764
549
|
typeParameters: TSTypeParameterDeclaration | null;
|
|
765
550
|
thisParam: TSThisParameter | null;
|
|
766
|
-
params:
|
|
551
|
+
params: ParamPattern[];
|
|
767
552
|
returnType: TSTypeAnnotation | null;
|
|
768
553
|
body: FunctionBody | null;
|
|
554
|
+
expression: false;
|
|
769
555
|
}
|
|
770
556
|
|
|
557
|
+
export type ParamPattern = FormalParameter | FormalParameterRest;
|
|
558
|
+
|
|
771
559
|
export type FunctionType =
|
|
772
560
|
| 'FunctionDeclaration'
|
|
773
561
|
| 'FunctionExpression'
|
|
@@ -780,21 +568,28 @@ export interface FormalParameters extends Span {
|
|
|
780
568
|
items: Array<FormalParameter | FormalParameterRest>;
|
|
781
569
|
}
|
|
782
570
|
|
|
783
|
-
export interface
|
|
784
|
-
type: '
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
readonly: boolean;
|
|
789
|
-
override: boolean;
|
|
571
|
+
export interface FormalParameterRest extends Span {
|
|
572
|
+
type: 'RestElement';
|
|
573
|
+
argument: BindingPatternKind;
|
|
574
|
+
typeAnnotation: TSTypeAnnotation | null;
|
|
575
|
+
optional: boolean;
|
|
790
576
|
}
|
|
791
577
|
|
|
578
|
+
export type FormalParameter =
|
|
579
|
+
& ({
|
|
580
|
+
decorators: Array<Decorator>;
|
|
581
|
+
accessibility: TSAccessibility | null;
|
|
582
|
+
readonly: boolean;
|
|
583
|
+
override: boolean;
|
|
584
|
+
})
|
|
585
|
+
& Span
|
|
586
|
+
& BindingPattern;
|
|
587
|
+
|
|
792
588
|
export type FormalParameterKind = 'FormalParameter' | 'UniqueFormalParameters' | 'ArrowFormalParameters' | 'Signature';
|
|
793
589
|
|
|
794
590
|
export interface FunctionBody extends Span {
|
|
795
|
-
type: '
|
|
796
|
-
|
|
797
|
-
statements: Array<Statement>;
|
|
591
|
+
type: 'BlockStatement';
|
|
592
|
+
body: Array<Directive | Statement>;
|
|
798
593
|
}
|
|
799
594
|
|
|
800
595
|
export interface ArrowFunctionExpression extends Span {
|
|
@@ -802,9 +597,11 @@ export interface ArrowFunctionExpression extends Span {
|
|
|
802
597
|
expression: boolean;
|
|
803
598
|
async: boolean;
|
|
804
599
|
typeParameters: TSTypeParameterDeclaration | null;
|
|
805
|
-
params:
|
|
600
|
+
params: ParamPattern[];
|
|
806
601
|
returnType: TSTypeAnnotation | null;
|
|
807
|
-
body: FunctionBody;
|
|
602
|
+
body: FunctionBody | Expression;
|
|
603
|
+
generator: false;
|
|
604
|
+
id: null;
|
|
808
605
|
}
|
|
809
606
|
|
|
810
607
|
export interface YieldExpression extends Span {
|
|
@@ -905,8 +702,7 @@ export interface AccessorProperty extends Span {
|
|
|
905
702
|
export interface ImportExpression extends Span {
|
|
906
703
|
type: 'ImportExpression';
|
|
907
704
|
source: Expression;
|
|
908
|
-
|
|
909
|
-
phase: ImportPhase | null;
|
|
705
|
+
options: Expression | null;
|
|
910
706
|
}
|
|
911
707
|
|
|
912
708
|
export interface ImportDeclaration extends Span {
|
|
@@ -914,7 +710,7 @@ export interface ImportDeclaration extends Span {
|
|
|
914
710
|
specifiers: Array<ImportDeclarationSpecifier>;
|
|
915
711
|
source: StringLiteral;
|
|
916
712
|
phase: ImportPhase | null;
|
|
917
|
-
|
|
713
|
+
attributes: Array<ImportAttribute>;
|
|
918
714
|
importKind: ImportOrExportKind;
|
|
919
715
|
}
|
|
920
716
|
|
|
@@ -959,7 +755,7 @@ export interface ExportNamedDeclaration extends Span {
|
|
|
959
755
|
specifiers: Array<ExportSpecifier>;
|
|
960
756
|
source: StringLiteral | null;
|
|
961
757
|
exportKind: ImportOrExportKind;
|
|
962
|
-
|
|
758
|
+
attributes: Array<ImportAttribute>;
|
|
963
759
|
}
|
|
964
760
|
|
|
965
761
|
export interface ExportDefaultDeclaration extends Span {
|
|
@@ -968,69 +764,163 @@ export interface ExportDefaultDeclaration extends Span {
|
|
|
968
764
|
exported: ModuleExportName;
|
|
969
765
|
}
|
|
970
766
|
|
|
971
|
-
export interface ExportAllDeclaration extends Span {
|
|
972
|
-
type: 'ExportAllDeclaration';
|
|
973
|
-
exported: ModuleExportName | null;
|
|
974
|
-
source: StringLiteral;
|
|
975
|
-
|
|
976
|
-
exportKind: ImportOrExportKind;
|
|
767
|
+
export interface ExportAllDeclaration extends Span {
|
|
768
|
+
type: 'ExportAllDeclaration';
|
|
769
|
+
exported: ModuleExportName | null;
|
|
770
|
+
source: StringLiteral;
|
|
771
|
+
attributes: Array<ImportAttribute>;
|
|
772
|
+
exportKind: ImportOrExportKind;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
export interface ExportSpecifier extends Span {
|
|
776
|
+
type: 'ExportSpecifier';
|
|
777
|
+
local: ModuleExportName;
|
|
778
|
+
exported: ModuleExportName;
|
|
779
|
+
exportKind: ImportOrExportKind;
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
export type ExportDefaultDeclarationKind = Function | Class | TSInterfaceDeclaration | Expression;
|
|
783
|
+
|
|
784
|
+
export type ModuleExportName = IdentifierName | IdentifierReference | StringLiteral;
|
|
785
|
+
|
|
786
|
+
export interface BooleanLiteral extends Span {
|
|
787
|
+
type: 'Literal';
|
|
788
|
+
value: boolean;
|
|
789
|
+
raw: string | null;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
export interface NullLiteral extends Span {
|
|
793
|
+
type: 'Literal';
|
|
794
|
+
value: null;
|
|
795
|
+
raw: 'null' | null;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
export interface NumericLiteral extends Span {
|
|
799
|
+
type: 'Literal';
|
|
800
|
+
value: number;
|
|
801
|
+
raw: string | null;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
export interface StringLiteral extends Span {
|
|
805
|
+
type: 'Literal';
|
|
806
|
+
value: string;
|
|
807
|
+
raw: string | null;
|
|
808
|
+
}
|
|
809
|
+
|
|
810
|
+
export interface BigIntLiteral extends Span {
|
|
811
|
+
type: 'Literal';
|
|
812
|
+
raw: string | null;
|
|
813
|
+
value: null;
|
|
814
|
+
bigint: string;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
export interface RegExpLiteral extends Span {
|
|
818
|
+
type: 'Literal';
|
|
819
|
+
regex: RegExp;
|
|
820
|
+
raw: string | null;
|
|
821
|
+
value: null;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
export interface RegExp {
|
|
825
|
+
pattern: string;
|
|
826
|
+
flags: string;
|
|
827
|
+
}
|
|
828
|
+
|
|
829
|
+
export interface JSXElement extends Span {
|
|
830
|
+
type: 'JSXElement';
|
|
831
|
+
openingElement: JSXOpeningElement;
|
|
832
|
+
closingElement: JSXClosingElement | null;
|
|
833
|
+
children: Array<JSXChild>;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
export interface JSXOpeningElement extends Span {
|
|
837
|
+
type: 'JSXOpeningElement';
|
|
838
|
+
selfClosing: boolean;
|
|
839
|
+
name: JSXElementName;
|
|
840
|
+
attributes: Array<JSXAttributeItem>;
|
|
841
|
+
typeParameters: TSTypeParameterInstantiation | null;
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
export interface JSXClosingElement extends Span {
|
|
845
|
+
type: 'JSXClosingElement';
|
|
846
|
+
name: JSXElementName;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
export interface JSXFragment extends Span {
|
|
850
|
+
type: 'JSXFragment';
|
|
851
|
+
openingFragment: JSXOpeningFragment;
|
|
852
|
+
closingFragment: JSXClosingFragment;
|
|
853
|
+
children: Array<JSXChild>;
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
export interface JSXOpeningFragment extends Span {
|
|
857
|
+
type: 'JSXOpeningFragment';
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
export interface JSXClosingFragment extends Span {
|
|
861
|
+
type: 'JSXClosingFragment';
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
export type JSXElementName = JSXIdentifier | JSXNamespacedName | JSXMemberExpression;
|
|
865
|
+
|
|
866
|
+
export interface JSXNamespacedName extends Span {
|
|
867
|
+
type: 'JSXNamespacedName';
|
|
868
|
+
namespace: JSXIdentifier;
|
|
869
|
+
property: JSXIdentifier;
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
export interface JSXMemberExpression extends Span {
|
|
873
|
+
type: 'JSXMemberExpression';
|
|
874
|
+
object: JSXMemberExpressionObject;
|
|
875
|
+
property: JSXIdentifier;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
export type JSXMemberExpressionObject = JSXIdentifier | JSXMemberExpression;
|
|
879
|
+
|
|
880
|
+
export interface JSXExpressionContainer extends Span {
|
|
881
|
+
type: 'JSXExpressionContainer';
|
|
882
|
+
expression: JSXExpression;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
export type JSXExpression = JSXEmptyExpression | Expression;
|
|
886
|
+
|
|
887
|
+
export interface JSXEmptyExpression extends Span {
|
|
888
|
+
type: 'JSXEmptyExpression';
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
export type JSXAttributeItem = JSXAttribute | JSXSpreadAttribute;
|
|
892
|
+
|
|
893
|
+
export interface JSXAttribute extends Span {
|
|
894
|
+
type: 'JSXAttribute';
|
|
895
|
+
name: JSXAttributeName;
|
|
896
|
+
value: JSXAttributeValue | null;
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
export interface JSXSpreadAttribute extends Span {
|
|
900
|
+
type: 'JSXSpreadAttribute';
|
|
901
|
+
argument: Expression;
|
|
977
902
|
}
|
|
978
903
|
|
|
979
|
-
export
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
904
|
+
export type JSXAttributeName = JSXIdentifier | JSXNamespacedName;
|
|
905
|
+
|
|
906
|
+
export type JSXAttributeValue = StringLiteral | JSXExpressionContainer | JSXElement | JSXFragment;
|
|
907
|
+
|
|
908
|
+
export interface JSXIdentifier extends Span {
|
|
909
|
+
type: 'JSXIdentifier';
|
|
910
|
+
name: string;
|
|
984
911
|
}
|
|
985
912
|
|
|
986
|
-
export type
|
|
987
|
-
| Function
|
|
988
|
-
| Class
|
|
989
|
-
| TSInterfaceDeclaration
|
|
990
|
-
| BooleanLiteral
|
|
991
|
-
| NullLiteral
|
|
992
|
-
| NumericLiteral
|
|
993
|
-
| BigIntLiteral
|
|
994
|
-
| RegExpLiteral
|
|
995
|
-
| StringLiteral
|
|
996
|
-
| TemplateLiteral
|
|
997
|
-
| IdentifierReference
|
|
998
|
-
| MetaProperty
|
|
999
|
-
| Super
|
|
1000
|
-
| ArrayExpression
|
|
1001
|
-
| ArrowFunctionExpression
|
|
1002
|
-
| AssignmentExpression
|
|
1003
|
-
| AwaitExpression
|
|
1004
|
-
| BinaryExpression
|
|
1005
|
-
| CallExpression
|
|
1006
|
-
| ChainExpression
|
|
1007
|
-
| Class
|
|
1008
|
-
| ConditionalExpression
|
|
1009
|
-
| Function
|
|
1010
|
-
| ImportExpression
|
|
1011
|
-
| LogicalExpression
|
|
1012
|
-
| NewExpression
|
|
1013
|
-
| ObjectExpression
|
|
1014
|
-
| ParenthesizedExpression
|
|
1015
|
-
| SequenceExpression
|
|
1016
|
-
| TaggedTemplateExpression
|
|
1017
|
-
| ThisExpression
|
|
1018
|
-
| UnaryExpression
|
|
1019
|
-
| UpdateExpression
|
|
1020
|
-
| YieldExpression
|
|
1021
|
-
| PrivateInExpression
|
|
1022
|
-
| JSXElement
|
|
1023
|
-
| JSXFragment
|
|
1024
|
-
| TSAsExpression
|
|
1025
|
-
| TSSatisfiesExpression
|
|
1026
|
-
| TSTypeAssertion
|
|
1027
|
-
| TSNonNullExpression
|
|
1028
|
-
| TSInstantiationExpression
|
|
1029
|
-
| ComputedMemberExpression
|
|
1030
|
-
| StaticMemberExpression
|
|
1031
|
-
| PrivateFieldExpression;
|
|
913
|
+
export type JSXChild = JSXText | JSXElement | JSXFragment | JSXExpressionContainer | JSXSpreadChild;
|
|
1032
914
|
|
|
1033
|
-
export
|
|
915
|
+
export interface JSXSpreadChild extends Span {
|
|
916
|
+
type: 'JSXSpreadChild';
|
|
917
|
+
expression: Expression;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
export interface JSXText extends Span {
|
|
921
|
+
type: 'JSXText';
|
|
922
|
+
value: string;
|
|
923
|
+
}
|
|
1034
924
|
|
|
1035
925
|
export interface TSThisParameter extends Span {
|
|
1036
926
|
type: 'TSThisParameter';
|
|
@@ -1177,47 +1067,7 @@ export interface TSRestType extends Span {
|
|
|
1177
1067
|
typeAnnotation: TSType;
|
|
1178
1068
|
}
|
|
1179
1069
|
|
|
1180
|
-
export type TSTupleElement =
|
|
1181
|
-
| TSOptionalType
|
|
1182
|
-
| TSRestType
|
|
1183
|
-
| TSAnyKeyword
|
|
1184
|
-
| TSBigIntKeyword
|
|
1185
|
-
| TSBooleanKeyword
|
|
1186
|
-
| TSIntrinsicKeyword
|
|
1187
|
-
| TSNeverKeyword
|
|
1188
|
-
| TSNullKeyword
|
|
1189
|
-
| TSNumberKeyword
|
|
1190
|
-
| TSObjectKeyword
|
|
1191
|
-
| TSStringKeyword
|
|
1192
|
-
| TSSymbolKeyword
|
|
1193
|
-
| TSUndefinedKeyword
|
|
1194
|
-
| TSUnknownKeyword
|
|
1195
|
-
| TSVoidKeyword
|
|
1196
|
-
| TSArrayType
|
|
1197
|
-
| TSConditionalType
|
|
1198
|
-
| TSConstructorType
|
|
1199
|
-
| TSFunctionType
|
|
1200
|
-
| TSImportType
|
|
1201
|
-
| TSIndexedAccessType
|
|
1202
|
-
| TSInferType
|
|
1203
|
-
| TSIntersectionType
|
|
1204
|
-
| TSLiteralType
|
|
1205
|
-
| TSMappedType
|
|
1206
|
-
| TSNamedTupleMember
|
|
1207
|
-
| TSQualifiedName
|
|
1208
|
-
| TSTemplateLiteralType
|
|
1209
|
-
| TSThisType
|
|
1210
|
-
| TSTupleType
|
|
1211
|
-
| TSTypeLiteral
|
|
1212
|
-
| TSTypeOperator
|
|
1213
|
-
| TSTypePredicate
|
|
1214
|
-
| TSTypeQuery
|
|
1215
|
-
| TSTypeReference
|
|
1216
|
-
| TSUnionType
|
|
1217
|
-
| TSParenthesizedType
|
|
1218
|
-
| JSDocNullableType
|
|
1219
|
-
| JSDocNonNullableType
|
|
1220
|
-
| JSDocUnknownType;
|
|
1070
|
+
export type TSTupleElement = TSOptionalType | TSRestType | TSType;
|
|
1221
1071
|
|
|
1222
1072
|
export interface TSAnyKeyword extends Span {
|
|
1223
1073
|
type: 'TSAnyKeyword';
|
|
@@ -1367,7 +1217,7 @@ export interface TSCallSignatureDeclaration extends Span {
|
|
|
1367
1217
|
type: 'TSCallSignatureDeclaration';
|
|
1368
1218
|
typeParameters: TSTypeParameterDeclaration | null;
|
|
1369
1219
|
thisParam: TSThisParameter | null;
|
|
1370
|
-
params:
|
|
1220
|
+
params: ParamPattern[];
|
|
1371
1221
|
returnType: TSTypeAnnotation | null;
|
|
1372
1222
|
}
|
|
1373
1223
|
|
|
@@ -1381,14 +1231,14 @@ export interface TSMethodSignature extends Span {
|
|
|
1381
1231
|
kind: TSMethodSignatureKind;
|
|
1382
1232
|
typeParameters: TSTypeParameterDeclaration | null;
|
|
1383
1233
|
thisParam: TSThisParameter | null;
|
|
1384
|
-
params:
|
|
1234
|
+
params: ParamPattern[];
|
|
1385
1235
|
returnType: TSTypeAnnotation | null;
|
|
1386
1236
|
}
|
|
1387
1237
|
|
|
1388
1238
|
export interface TSConstructSignatureDeclaration extends Span {
|
|
1389
1239
|
type: 'TSConstructSignatureDeclaration';
|
|
1390
1240
|
typeParameters: TSTypeParameterDeclaration | null;
|
|
1391
|
-
params:
|
|
1241
|
+
params: ParamPattern[];
|
|
1392
1242
|
returnType: TSTypeAnnotation | null;
|
|
1393
1243
|
}
|
|
1394
1244
|
|
|
@@ -1429,7 +1279,7 @@ export type TSModuleDeclarationBody = TSModuleDeclaration | TSModuleBlock;
|
|
|
1429
1279
|
|
|
1430
1280
|
export interface TSModuleBlock extends Span {
|
|
1431
1281
|
type: 'TSModuleBlock';
|
|
1432
|
-
body: Array<Statement>;
|
|
1282
|
+
body: Array<Directive | Statement>;
|
|
1433
1283
|
}
|
|
1434
1284
|
|
|
1435
1285
|
export interface TSTypeLiteral extends Span {
|
|
@@ -1448,7 +1298,7 @@ export interface TSTypeQuery extends Span {
|
|
|
1448
1298
|
typeParameters: TSTypeParameterInstantiation | null;
|
|
1449
1299
|
}
|
|
1450
1300
|
|
|
1451
|
-
export type TSTypeQueryExprName = TSImportType |
|
|
1301
|
+
export type TSTypeQueryExprName = TSImportType | TSTypeName;
|
|
1452
1302
|
|
|
1453
1303
|
export interface TSImportType extends Span {
|
|
1454
1304
|
type: 'TSImportType';
|
|
@@ -1477,7 +1327,7 @@ export interface TSFunctionType extends Span {
|
|
|
1477
1327
|
type: 'TSFunctionType';
|
|
1478
1328
|
typeParameters: TSTypeParameterDeclaration | null;
|
|
1479
1329
|
thisParam: TSThisParameter | null;
|
|
1480
|
-
params:
|
|
1330
|
+
params: ParamPattern[];
|
|
1481
1331
|
returnType: TSTypeAnnotation;
|
|
1482
1332
|
}
|
|
1483
1333
|
|
|
@@ -1485,7 +1335,7 @@ export interface TSConstructorType extends Span {
|
|
|
1485
1335
|
type: 'TSConstructorType';
|
|
1486
1336
|
abstract: boolean;
|
|
1487
1337
|
typeParameters: TSTypeParameterDeclaration | null;
|
|
1488
|
-
params:
|
|
1338
|
+
params: ParamPattern[];
|
|
1489
1339
|
returnType: TSTypeAnnotation;
|
|
1490
1340
|
}
|
|
1491
1341
|
|
|
@@ -1531,7 +1381,7 @@ export interface TSImportEqualsDeclaration extends Span {
|
|
|
1531
1381
|
importKind: ImportOrExportKind;
|
|
1532
1382
|
}
|
|
1533
1383
|
|
|
1534
|
-
export type TSModuleReference = TSExternalModuleReference |
|
|
1384
|
+
export type TSModuleReference = TSExternalModuleReference | TSTypeName;
|
|
1535
1385
|
|
|
1536
1386
|
export interface TSExternalModuleReference extends Span {
|
|
1537
1387
|
type: 'TSExternalModuleReference';
|
|
@@ -1582,141 +1432,6 @@ export interface JSDocUnknownType extends Span {
|
|
|
1582
1432
|
type: 'JSDocUnknownType';
|
|
1583
1433
|
}
|
|
1584
1434
|
|
|
1585
|
-
export interface JSXElement extends Span {
|
|
1586
|
-
type: 'JSXElement';
|
|
1587
|
-
openingElement: JSXOpeningElement;
|
|
1588
|
-
closingElement: JSXClosingElement | null;
|
|
1589
|
-
children: Array<JSXChild>;
|
|
1590
|
-
}
|
|
1591
|
-
|
|
1592
|
-
export interface JSXOpeningElement extends Span {
|
|
1593
|
-
type: 'JSXOpeningElement';
|
|
1594
|
-
selfClosing: boolean;
|
|
1595
|
-
name: JSXElementName;
|
|
1596
|
-
attributes: Array<JSXAttributeItem>;
|
|
1597
|
-
typeParameters: TSTypeParameterInstantiation | null;
|
|
1598
|
-
}
|
|
1599
|
-
|
|
1600
|
-
export interface JSXClosingElement extends Span {
|
|
1601
|
-
type: 'JSXClosingElement';
|
|
1602
|
-
name: JSXElementName;
|
|
1603
|
-
}
|
|
1604
|
-
|
|
1605
|
-
export interface JSXFragment extends Span {
|
|
1606
|
-
type: 'JSXFragment';
|
|
1607
|
-
openingFragment: JSXOpeningFragment;
|
|
1608
|
-
closingFragment: JSXClosingFragment;
|
|
1609
|
-
children: Array<JSXChild>;
|
|
1610
|
-
}
|
|
1611
|
-
|
|
1612
|
-
export interface JSXOpeningFragment extends Span {
|
|
1613
|
-
type: 'JSXOpeningFragment';
|
|
1614
|
-
}
|
|
1615
|
-
|
|
1616
|
-
export interface JSXClosingFragment extends Span {
|
|
1617
|
-
type: 'JSXClosingFragment';
|
|
1618
|
-
}
|
|
1619
|
-
|
|
1620
|
-
export interface JSXNamespacedName extends Span {
|
|
1621
|
-
type: 'JSXNamespacedName';
|
|
1622
|
-
namespace: JSXIdentifier;
|
|
1623
|
-
property: JSXIdentifier;
|
|
1624
|
-
}
|
|
1625
|
-
|
|
1626
|
-
export interface JSXMemberExpression extends Span {
|
|
1627
|
-
type: 'JSXMemberExpression';
|
|
1628
|
-
object: JSXMemberExpressionObject;
|
|
1629
|
-
property: JSXIdentifier;
|
|
1630
|
-
}
|
|
1631
|
-
|
|
1632
|
-
export interface JSXExpressionContainer extends Span {
|
|
1633
|
-
type: 'JSXExpressionContainer';
|
|
1634
|
-
expression: JSXExpression;
|
|
1635
|
-
}
|
|
1636
|
-
|
|
1637
|
-
export type JSXExpression =
|
|
1638
|
-
| JSXEmptyExpression
|
|
1639
|
-
| BooleanLiteral
|
|
1640
|
-
| NullLiteral
|
|
1641
|
-
| NumericLiteral
|
|
1642
|
-
| BigIntLiteral
|
|
1643
|
-
| RegExpLiteral
|
|
1644
|
-
| StringLiteral
|
|
1645
|
-
| TemplateLiteral
|
|
1646
|
-
| IdentifierReference
|
|
1647
|
-
| MetaProperty
|
|
1648
|
-
| Super
|
|
1649
|
-
| ArrayExpression
|
|
1650
|
-
| ArrowFunctionExpression
|
|
1651
|
-
| AssignmentExpression
|
|
1652
|
-
| AwaitExpression
|
|
1653
|
-
| BinaryExpression
|
|
1654
|
-
| CallExpression
|
|
1655
|
-
| ChainExpression
|
|
1656
|
-
| Class
|
|
1657
|
-
| ConditionalExpression
|
|
1658
|
-
| Function
|
|
1659
|
-
| ImportExpression
|
|
1660
|
-
| LogicalExpression
|
|
1661
|
-
| NewExpression
|
|
1662
|
-
| ObjectExpression
|
|
1663
|
-
| ParenthesizedExpression
|
|
1664
|
-
| SequenceExpression
|
|
1665
|
-
| TaggedTemplateExpression
|
|
1666
|
-
| ThisExpression
|
|
1667
|
-
| UnaryExpression
|
|
1668
|
-
| UpdateExpression
|
|
1669
|
-
| YieldExpression
|
|
1670
|
-
| PrivateInExpression
|
|
1671
|
-
| JSXElement
|
|
1672
|
-
| JSXFragment
|
|
1673
|
-
| TSAsExpression
|
|
1674
|
-
| TSSatisfiesExpression
|
|
1675
|
-
| TSTypeAssertion
|
|
1676
|
-
| TSNonNullExpression
|
|
1677
|
-
| TSInstantiationExpression
|
|
1678
|
-
| ComputedMemberExpression
|
|
1679
|
-
| StaticMemberExpression
|
|
1680
|
-
| PrivateFieldExpression;
|
|
1681
|
-
|
|
1682
|
-
export interface JSXEmptyExpression extends Span {
|
|
1683
|
-
type: 'JSXEmptyExpression';
|
|
1684
|
-
}
|
|
1685
|
-
|
|
1686
|
-
export type JSXAttributeItem = JSXAttribute | JSXSpreadAttribute;
|
|
1687
|
-
|
|
1688
|
-
export interface JSXAttribute extends Span {
|
|
1689
|
-
type: 'JSXAttribute';
|
|
1690
|
-
name: JSXAttributeName;
|
|
1691
|
-
value: JSXAttributeValue | null;
|
|
1692
|
-
}
|
|
1693
|
-
|
|
1694
|
-
export interface JSXSpreadAttribute extends Span {
|
|
1695
|
-
type: 'JSXSpreadAttribute';
|
|
1696
|
-
argument: Expression;
|
|
1697
|
-
}
|
|
1698
|
-
|
|
1699
|
-
export type JSXAttributeName = JSXIdentifier | JSXNamespacedName;
|
|
1700
|
-
|
|
1701
|
-
export type JSXAttributeValue = StringLiteral | JSXExpressionContainer | JSXElement | JSXFragment;
|
|
1702
|
-
|
|
1703
|
-
export interface JSXIdentifier extends Span {
|
|
1704
|
-
type: 'JSXIdentifier';
|
|
1705
|
-
name: string;
|
|
1706
|
-
}
|
|
1707
|
-
|
|
1708
|
-
export type JSXChild = JSXText | JSXElement | JSXFragment | JSXExpressionContainer | JSXSpreadChild;
|
|
1709
|
-
|
|
1710
|
-
export interface JSXSpreadChild extends Span {
|
|
1711
|
-
type: 'JSXSpreadChild';
|
|
1712
|
-
expression: Expression;
|
|
1713
|
-
}
|
|
1714
|
-
|
|
1715
|
-
export interface JSXText extends Span {
|
|
1716
|
-
type: 'JSXText';
|
|
1717
|
-
value: string;
|
|
1718
|
-
}
|
|
1719
|
-
|
|
1720
1435
|
export type AssignmentOperator =
|
|
1721
1436
|
| '='
|
|
1722
1437
|
| '+='
|
|
@@ -1770,18 +1485,8 @@ export interface Span {
|
|
|
1770
1485
|
end: number;
|
|
1771
1486
|
}
|
|
1772
1487
|
|
|
1773
|
-
export interface SourceType {
|
|
1774
|
-
language: Language;
|
|
1775
|
-
moduleKind: ModuleKind;
|
|
1776
|
-
variant: LanguageVariant;
|
|
1777
|
-
}
|
|
1778
|
-
|
|
1779
|
-
export type Language = 'javascript' | 'typescript' | 'typescriptDefinition';
|
|
1780
|
-
|
|
1781
1488
|
export type ModuleKind = 'script' | 'module' | 'unambiguous';
|
|
1782
1489
|
|
|
1783
|
-
export type LanguageVariant = 'standard' | 'jsx';
|
|
1784
|
-
|
|
1785
1490
|
export interface Pattern extends Span {
|
|
1786
1491
|
type: 'Pattern';
|
|
1787
1492
|
body: Disjunction;
|
|
@@ -1941,36 +1646,3 @@ export interface NamedReference extends Span {
|
|
|
1941
1646
|
type: 'NamedReference';
|
|
1942
1647
|
name: string;
|
|
1943
1648
|
}
|
|
1944
|
-
|
|
1945
|
-
export interface FormalParameterRest extends Span {
|
|
1946
|
-
type: 'RestElement';
|
|
1947
|
-
argument: BindingPatternKind;
|
|
1948
|
-
typeAnnotation: TSTypeAnnotation | null;
|
|
1949
|
-
optional: boolean;
|
|
1950
|
-
}
|
|
1951
|
-
|
|
1952
|
-
export type RegExpFlags = {
|
|
1953
|
-
/** Global flag */
|
|
1954
|
-
G: 1;
|
|
1955
|
-
/** Ignore case flag */
|
|
1956
|
-
I: 2;
|
|
1957
|
-
/** Multiline flag */
|
|
1958
|
-
M: 4;
|
|
1959
|
-
/** DotAll flag */
|
|
1960
|
-
S: 8;
|
|
1961
|
-
/** Unicode flag */
|
|
1962
|
-
U: 16;
|
|
1963
|
-
/** Sticky flag */
|
|
1964
|
-
Y: 32;
|
|
1965
|
-
/** Indices flag */
|
|
1966
|
-
D: 64;
|
|
1967
|
-
/** Unicode sets flag */
|
|
1968
|
-
V: 128;
|
|
1969
|
-
};
|
|
1970
|
-
|
|
1971
|
-
export type JSXElementName =
|
|
1972
|
-
| JSXIdentifier
|
|
1973
|
-
| JSXNamespacedName
|
|
1974
|
-
| JSXMemberExpression;
|
|
1975
|
-
|
|
1976
|
-
export type JSXMemberExpressionObject = JSXIdentifier | JSXMemberExpression;
|