@oxc-project/types 0.99.0 → 0.100.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 +275 -258
package/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// To edit this generated file you have to edit `tasks/ast_tools/src/generators/typescript.rs`.
|
|
3
3
|
|
|
4
4
|
export interface Program extends Span {
|
|
5
|
-
type:
|
|
5
|
+
type: "Program";
|
|
6
6
|
body: Array<Directive | Statement>;
|
|
7
7
|
sourceType: ModuleKind;
|
|
8
8
|
hashbang: Hashbang | null;
|
|
@@ -53,7 +53,7 @@ export type Expression =
|
|
|
53
53
|
| MemberExpression;
|
|
54
54
|
|
|
55
55
|
export interface IdentifierName extends Span {
|
|
56
|
-
type:
|
|
56
|
+
type: "Identifier";
|
|
57
57
|
decorators?: [];
|
|
58
58
|
name: string;
|
|
59
59
|
optional?: false;
|
|
@@ -62,7 +62,7 @@ export interface IdentifierName extends Span {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
export interface IdentifierReference extends Span {
|
|
65
|
-
type:
|
|
65
|
+
type: "Identifier";
|
|
66
66
|
decorators?: [];
|
|
67
67
|
name: string;
|
|
68
68
|
optional?: false;
|
|
@@ -71,7 +71,7 @@ export interface IdentifierReference extends Span {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
export interface BindingIdentifier extends Span {
|
|
74
|
-
type:
|
|
74
|
+
type: "Identifier";
|
|
75
75
|
decorators?: [];
|
|
76
76
|
name: string;
|
|
77
77
|
optional?: false;
|
|
@@ -80,7 +80,7 @@ export interface BindingIdentifier extends Span {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
export interface LabelIdentifier extends Span {
|
|
83
|
-
type:
|
|
83
|
+
type: "Identifier";
|
|
84
84
|
decorators?: [];
|
|
85
85
|
name: string;
|
|
86
86
|
optional?: false;
|
|
@@ -89,12 +89,12 @@ export interface LabelIdentifier extends Span {
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
export interface ThisExpression extends Span {
|
|
92
|
-
type:
|
|
92
|
+
type: "ThisExpression";
|
|
93
93
|
parent?: Node;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
export interface ArrayExpression extends Span {
|
|
97
|
-
type:
|
|
97
|
+
type: "ArrayExpression";
|
|
98
98
|
elements: Array<ArrayExpressionElement>;
|
|
99
99
|
parent?: Node;
|
|
100
100
|
}
|
|
@@ -102,7 +102,7 @@ export interface ArrayExpression extends Span {
|
|
|
102
102
|
export type ArrayExpressionElement = SpreadElement | null | Expression;
|
|
103
103
|
|
|
104
104
|
export interface ObjectExpression extends Span {
|
|
105
|
-
type:
|
|
105
|
+
type: "ObjectExpression";
|
|
106
106
|
properties: Array<ObjectPropertyKind>;
|
|
107
107
|
parent?: Node;
|
|
108
108
|
}
|
|
@@ -110,7 +110,7 @@ export interface ObjectExpression extends Span {
|
|
|
110
110
|
export type ObjectPropertyKind = ObjectProperty | SpreadElement;
|
|
111
111
|
|
|
112
112
|
export interface ObjectProperty extends Span {
|
|
113
|
-
type:
|
|
113
|
+
type: "Property";
|
|
114
114
|
kind: PropertyKind;
|
|
115
115
|
key: PropertyKey;
|
|
116
116
|
value: Expression;
|
|
@@ -123,17 +123,17 @@ export interface ObjectProperty extends Span {
|
|
|
123
123
|
|
|
124
124
|
export type PropertyKey = IdentifierName | PrivateIdentifier | Expression;
|
|
125
125
|
|
|
126
|
-
export type PropertyKind =
|
|
126
|
+
export type PropertyKind = "init" | "get" | "set";
|
|
127
127
|
|
|
128
128
|
export interface TemplateLiteral extends Span {
|
|
129
|
-
type:
|
|
129
|
+
type: "TemplateLiteral";
|
|
130
130
|
quasis: Array<TemplateElement>;
|
|
131
131
|
expressions: Array<Expression>;
|
|
132
132
|
parent?: Node;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
export interface TaggedTemplateExpression extends Span {
|
|
136
|
-
type:
|
|
136
|
+
type: "TaggedTemplateExpression";
|
|
137
137
|
tag: Expression;
|
|
138
138
|
typeArguments?: TSTypeParameterInstantiation | null;
|
|
139
139
|
quasi: TemplateLiteral;
|
|
@@ -141,7 +141,7 @@ export interface TaggedTemplateExpression extends Span {
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
export interface TemplateElement extends Span {
|
|
144
|
-
type:
|
|
144
|
+
type: "TemplateElement";
|
|
145
145
|
value: TemplateElementValue;
|
|
146
146
|
tail: boolean;
|
|
147
147
|
parent?: Node;
|
|
@@ -152,10 +152,13 @@ export interface TemplateElementValue {
|
|
|
152
152
|
cooked: string | null;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
export type MemberExpression =
|
|
155
|
+
export type MemberExpression =
|
|
156
|
+
| ComputedMemberExpression
|
|
157
|
+
| StaticMemberExpression
|
|
158
|
+
| PrivateFieldExpression;
|
|
156
159
|
|
|
157
160
|
export interface ComputedMemberExpression extends Span {
|
|
158
|
-
type:
|
|
161
|
+
type: "MemberExpression";
|
|
159
162
|
object: Expression;
|
|
160
163
|
property: Expression;
|
|
161
164
|
optional: boolean;
|
|
@@ -164,7 +167,7 @@ export interface ComputedMemberExpression extends Span {
|
|
|
164
167
|
}
|
|
165
168
|
|
|
166
169
|
export interface StaticMemberExpression extends Span {
|
|
167
|
-
type:
|
|
170
|
+
type: "MemberExpression";
|
|
168
171
|
object: Expression;
|
|
169
172
|
property: IdentifierName;
|
|
170
173
|
optional: boolean;
|
|
@@ -173,7 +176,7 @@ export interface StaticMemberExpression extends Span {
|
|
|
173
176
|
}
|
|
174
177
|
|
|
175
178
|
export interface PrivateFieldExpression extends Span {
|
|
176
|
-
type:
|
|
179
|
+
type: "MemberExpression";
|
|
177
180
|
object: Expression;
|
|
178
181
|
property: PrivateIdentifier;
|
|
179
182
|
optional: boolean;
|
|
@@ -182,7 +185,7 @@ export interface PrivateFieldExpression extends Span {
|
|
|
182
185
|
}
|
|
183
186
|
|
|
184
187
|
export interface CallExpression extends Span {
|
|
185
|
-
type:
|
|
188
|
+
type: "CallExpression";
|
|
186
189
|
callee: Expression;
|
|
187
190
|
typeArguments?: TSTypeParameterInstantiation | null;
|
|
188
191
|
arguments: Array<Argument>;
|
|
@@ -191,7 +194,7 @@ export interface CallExpression extends Span {
|
|
|
191
194
|
}
|
|
192
195
|
|
|
193
196
|
export interface NewExpression extends Span {
|
|
194
|
-
type:
|
|
197
|
+
type: "NewExpression";
|
|
195
198
|
callee: Expression;
|
|
196
199
|
typeArguments?: TSTypeParameterInstantiation | null;
|
|
197
200
|
arguments: Array<Argument>;
|
|
@@ -199,14 +202,14 @@ export interface NewExpression extends Span {
|
|
|
199
202
|
}
|
|
200
203
|
|
|
201
204
|
export interface MetaProperty extends Span {
|
|
202
|
-
type:
|
|
205
|
+
type: "MetaProperty";
|
|
203
206
|
meta: IdentifierName;
|
|
204
207
|
property: IdentifierName;
|
|
205
208
|
parent?: Node;
|
|
206
209
|
}
|
|
207
210
|
|
|
208
211
|
export interface SpreadElement extends Span {
|
|
209
|
-
type:
|
|
212
|
+
type: "SpreadElement";
|
|
210
213
|
argument: Expression;
|
|
211
214
|
parent?: Node;
|
|
212
215
|
}
|
|
@@ -214,7 +217,7 @@ export interface SpreadElement extends Span {
|
|
|
214
217
|
export type Argument = SpreadElement | Expression;
|
|
215
218
|
|
|
216
219
|
export interface UpdateExpression extends Span {
|
|
217
|
-
type:
|
|
220
|
+
type: "UpdateExpression";
|
|
218
221
|
operator: UpdateOperator;
|
|
219
222
|
prefix: boolean;
|
|
220
223
|
argument: SimpleAssignmentTarget;
|
|
@@ -222,7 +225,7 @@ export interface UpdateExpression extends Span {
|
|
|
222
225
|
}
|
|
223
226
|
|
|
224
227
|
export interface UnaryExpression extends Span {
|
|
225
|
-
type:
|
|
228
|
+
type: "UnaryExpression";
|
|
226
229
|
operator: UnaryOperator;
|
|
227
230
|
argument: Expression;
|
|
228
231
|
prefix: true;
|
|
@@ -230,7 +233,7 @@ export interface UnaryExpression extends Span {
|
|
|
230
233
|
}
|
|
231
234
|
|
|
232
235
|
export interface BinaryExpression extends Span {
|
|
233
|
-
type:
|
|
236
|
+
type: "BinaryExpression";
|
|
234
237
|
left: Expression;
|
|
235
238
|
operator: BinaryOperator;
|
|
236
239
|
right: Expression;
|
|
@@ -238,15 +241,15 @@ export interface BinaryExpression extends Span {
|
|
|
238
241
|
}
|
|
239
242
|
|
|
240
243
|
export interface PrivateInExpression extends Span {
|
|
241
|
-
type:
|
|
244
|
+
type: "BinaryExpression";
|
|
242
245
|
left: PrivateIdentifier;
|
|
243
|
-
operator:
|
|
246
|
+
operator: "in";
|
|
244
247
|
right: Expression;
|
|
245
248
|
parent?: Node;
|
|
246
249
|
}
|
|
247
250
|
|
|
248
251
|
export interface LogicalExpression extends Span {
|
|
249
|
-
type:
|
|
252
|
+
type: "LogicalExpression";
|
|
250
253
|
left: Expression;
|
|
251
254
|
operator: LogicalOperator;
|
|
252
255
|
right: Expression;
|
|
@@ -254,7 +257,7 @@ export interface LogicalExpression extends Span {
|
|
|
254
257
|
}
|
|
255
258
|
|
|
256
259
|
export interface ConditionalExpression extends Span {
|
|
257
|
-
type:
|
|
260
|
+
type: "ConditionalExpression";
|
|
258
261
|
test: Expression;
|
|
259
262
|
consequent: Expression;
|
|
260
263
|
alternate: Expression;
|
|
@@ -262,7 +265,7 @@ export interface ConditionalExpression extends Span {
|
|
|
262
265
|
}
|
|
263
266
|
|
|
264
267
|
export interface AssignmentExpression extends Span {
|
|
265
|
-
type:
|
|
268
|
+
type: "AssignmentExpression";
|
|
266
269
|
operator: AssignmentOperator;
|
|
267
270
|
left: AssignmentTarget;
|
|
268
271
|
right: Expression;
|
|
@@ -282,7 +285,7 @@ export type SimpleAssignmentTarget =
|
|
|
282
285
|
export type AssignmentTargetPattern = ArrayAssignmentTarget | ObjectAssignmentTarget;
|
|
283
286
|
|
|
284
287
|
export interface ArrayAssignmentTarget extends Span {
|
|
285
|
-
type:
|
|
288
|
+
type: "ArrayPattern";
|
|
286
289
|
decorators?: [];
|
|
287
290
|
elements: Array<AssignmentTargetMaybeDefault | AssignmentTargetRest | null>;
|
|
288
291
|
optional?: false;
|
|
@@ -291,7 +294,7 @@ export interface ArrayAssignmentTarget extends Span {
|
|
|
291
294
|
}
|
|
292
295
|
|
|
293
296
|
export interface ObjectAssignmentTarget extends Span {
|
|
294
|
-
type:
|
|
297
|
+
type: "ObjectPattern";
|
|
295
298
|
decorators?: [];
|
|
296
299
|
properties: Array<AssignmentTargetProperty | AssignmentTargetRest>;
|
|
297
300
|
optional?: false;
|
|
@@ -300,7 +303,7 @@ export interface ObjectAssignmentTarget extends Span {
|
|
|
300
303
|
}
|
|
301
304
|
|
|
302
305
|
export interface AssignmentTargetRest extends Span {
|
|
303
|
-
type:
|
|
306
|
+
type: "RestElement";
|
|
304
307
|
decorators?: [];
|
|
305
308
|
argument: AssignmentTarget;
|
|
306
309
|
optional?: false;
|
|
@@ -312,7 +315,7 @@ export interface AssignmentTargetRest extends Span {
|
|
|
312
315
|
export type AssignmentTargetMaybeDefault = AssignmentTargetWithDefault | AssignmentTarget;
|
|
313
316
|
|
|
314
317
|
export interface AssignmentTargetWithDefault extends Span {
|
|
315
|
-
type:
|
|
318
|
+
type: "AssignmentPattern";
|
|
316
319
|
decorators?: [];
|
|
317
320
|
left: AssignmentTarget;
|
|
318
321
|
right: Expression;
|
|
@@ -321,11 +324,13 @@ export interface AssignmentTargetWithDefault extends Span {
|
|
|
321
324
|
parent?: Node;
|
|
322
325
|
}
|
|
323
326
|
|
|
324
|
-
export type AssignmentTargetProperty =
|
|
327
|
+
export type AssignmentTargetProperty =
|
|
328
|
+
| AssignmentTargetPropertyIdentifier
|
|
329
|
+
| AssignmentTargetPropertyProperty;
|
|
325
330
|
|
|
326
331
|
export interface AssignmentTargetPropertyIdentifier extends Span {
|
|
327
|
-
type:
|
|
328
|
-
kind:
|
|
332
|
+
type: "Property";
|
|
333
|
+
kind: "init";
|
|
329
334
|
key: IdentifierReference;
|
|
330
335
|
value: IdentifierReference | AssignmentTargetWithDefault;
|
|
331
336
|
method: false;
|
|
@@ -336,8 +341,8 @@ export interface AssignmentTargetPropertyIdentifier extends Span {
|
|
|
336
341
|
}
|
|
337
342
|
|
|
338
343
|
export interface AssignmentTargetPropertyProperty extends Span {
|
|
339
|
-
type:
|
|
340
|
-
kind:
|
|
344
|
+
type: "Property";
|
|
345
|
+
kind: "init";
|
|
341
346
|
key: PropertyKey;
|
|
342
347
|
value: AssignmentTargetMaybeDefault;
|
|
343
348
|
method: false;
|
|
@@ -348,24 +353,24 @@ export interface AssignmentTargetPropertyProperty extends Span {
|
|
|
348
353
|
}
|
|
349
354
|
|
|
350
355
|
export interface SequenceExpression extends Span {
|
|
351
|
-
type:
|
|
356
|
+
type: "SequenceExpression";
|
|
352
357
|
expressions: Array<Expression>;
|
|
353
358
|
parent?: Node;
|
|
354
359
|
}
|
|
355
360
|
|
|
356
361
|
export interface Super extends Span {
|
|
357
|
-
type:
|
|
362
|
+
type: "Super";
|
|
358
363
|
parent?: Node;
|
|
359
364
|
}
|
|
360
365
|
|
|
361
366
|
export interface AwaitExpression extends Span {
|
|
362
|
-
type:
|
|
367
|
+
type: "AwaitExpression";
|
|
363
368
|
argument: Expression;
|
|
364
369
|
parent?: Node;
|
|
365
370
|
}
|
|
366
371
|
|
|
367
372
|
export interface ChainExpression extends Span {
|
|
368
|
-
type:
|
|
373
|
+
type: "ChainExpression";
|
|
369
374
|
expression: ChainElement;
|
|
370
375
|
parent?: Node;
|
|
371
376
|
}
|
|
@@ -373,7 +378,7 @@ export interface ChainExpression extends Span {
|
|
|
373
378
|
export type ChainElement = CallExpression | TSNonNullExpression | MemberExpression;
|
|
374
379
|
|
|
375
380
|
export interface ParenthesizedExpression extends Span {
|
|
376
|
-
type:
|
|
381
|
+
type: "ParenthesizedExpression";
|
|
377
382
|
expression: Expression;
|
|
378
383
|
parent?: Node;
|
|
379
384
|
}
|
|
@@ -401,20 +406,20 @@ export type Statement =
|
|
|
401
406
|
| ModuleDeclaration;
|
|
402
407
|
|
|
403
408
|
export interface Directive extends Span {
|
|
404
|
-
type:
|
|
409
|
+
type: "ExpressionStatement";
|
|
405
410
|
expression: StringLiteral;
|
|
406
411
|
directive: string;
|
|
407
412
|
parent?: Node;
|
|
408
413
|
}
|
|
409
414
|
|
|
410
415
|
export interface Hashbang extends Span {
|
|
411
|
-
type:
|
|
416
|
+
type: "Hashbang";
|
|
412
417
|
value: string;
|
|
413
418
|
parent?: Node;
|
|
414
419
|
}
|
|
415
420
|
|
|
416
421
|
export interface BlockStatement extends Span {
|
|
417
|
-
type:
|
|
422
|
+
type: "BlockStatement";
|
|
418
423
|
body: Array<Statement>;
|
|
419
424
|
parent?: Node;
|
|
420
425
|
}
|
|
@@ -431,17 +436,17 @@ export type Declaration =
|
|
|
431
436
|
| TSImportEqualsDeclaration;
|
|
432
437
|
|
|
433
438
|
export interface VariableDeclaration extends Span {
|
|
434
|
-
type:
|
|
439
|
+
type: "VariableDeclaration";
|
|
435
440
|
kind: VariableDeclarationKind;
|
|
436
441
|
declarations: Array<VariableDeclarator>;
|
|
437
442
|
declare?: boolean;
|
|
438
443
|
parent?: Node;
|
|
439
444
|
}
|
|
440
445
|
|
|
441
|
-
export type VariableDeclarationKind =
|
|
446
|
+
export type VariableDeclarationKind = "var" | "let" | "const" | "using" | "await using";
|
|
442
447
|
|
|
443
448
|
export interface VariableDeclarator extends Span {
|
|
444
|
-
type:
|
|
449
|
+
type: "VariableDeclarator";
|
|
445
450
|
id: BindingPattern;
|
|
446
451
|
init: Expression | null;
|
|
447
452
|
definite?: boolean;
|
|
@@ -449,19 +454,19 @@ export interface VariableDeclarator extends Span {
|
|
|
449
454
|
}
|
|
450
455
|
|
|
451
456
|
export interface EmptyStatement extends Span {
|
|
452
|
-
type:
|
|
457
|
+
type: "EmptyStatement";
|
|
453
458
|
parent?: Node;
|
|
454
459
|
}
|
|
455
460
|
|
|
456
461
|
export interface ExpressionStatement extends Span {
|
|
457
|
-
type:
|
|
462
|
+
type: "ExpressionStatement";
|
|
458
463
|
expression: Expression;
|
|
459
464
|
directive?: string | null;
|
|
460
465
|
parent?: Node;
|
|
461
466
|
}
|
|
462
467
|
|
|
463
468
|
export interface IfStatement extends Span {
|
|
464
|
-
type:
|
|
469
|
+
type: "IfStatement";
|
|
465
470
|
test: Expression;
|
|
466
471
|
consequent: Statement;
|
|
467
472
|
alternate: Statement | null;
|
|
@@ -469,21 +474,21 @@ export interface IfStatement extends Span {
|
|
|
469
474
|
}
|
|
470
475
|
|
|
471
476
|
export interface DoWhileStatement extends Span {
|
|
472
|
-
type:
|
|
477
|
+
type: "DoWhileStatement";
|
|
473
478
|
body: Statement;
|
|
474
479
|
test: Expression;
|
|
475
480
|
parent?: Node;
|
|
476
481
|
}
|
|
477
482
|
|
|
478
483
|
export interface WhileStatement extends Span {
|
|
479
|
-
type:
|
|
484
|
+
type: "WhileStatement";
|
|
480
485
|
test: Expression;
|
|
481
486
|
body: Statement;
|
|
482
487
|
parent?: Node;
|
|
483
488
|
}
|
|
484
489
|
|
|
485
490
|
export interface ForStatement extends Span {
|
|
486
|
-
type:
|
|
491
|
+
type: "ForStatement";
|
|
487
492
|
init: ForStatementInit | null;
|
|
488
493
|
test: Expression | null;
|
|
489
494
|
update: Expression | null;
|
|
@@ -494,7 +499,7 @@ export interface ForStatement extends Span {
|
|
|
494
499
|
export type ForStatementInit = VariableDeclaration | Expression;
|
|
495
500
|
|
|
496
501
|
export interface ForInStatement extends Span {
|
|
497
|
-
type:
|
|
502
|
+
type: "ForInStatement";
|
|
498
503
|
left: ForStatementLeft;
|
|
499
504
|
right: Expression;
|
|
500
505
|
body: Statement;
|
|
@@ -504,7 +509,7 @@ export interface ForInStatement extends Span {
|
|
|
504
509
|
export type ForStatementLeft = VariableDeclaration | AssignmentTarget;
|
|
505
510
|
|
|
506
511
|
export interface ForOfStatement extends Span {
|
|
507
|
-
type:
|
|
512
|
+
type: "ForOfStatement";
|
|
508
513
|
await: boolean;
|
|
509
514
|
left: ForStatementLeft;
|
|
510
515
|
right: Expression;
|
|
@@ -513,59 +518,59 @@ export interface ForOfStatement extends Span {
|
|
|
513
518
|
}
|
|
514
519
|
|
|
515
520
|
export interface ContinueStatement extends Span {
|
|
516
|
-
type:
|
|
521
|
+
type: "ContinueStatement";
|
|
517
522
|
label: LabelIdentifier | null;
|
|
518
523
|
parent?: Node;
|
|
519
524
|
}
|
|
520
525
|
|
|
521
526
|
export interface BreakStatement extends Span {
|
|
522
|
-
type:
|
|
527
|
+
type: "BreakStatement";
|
|
523
528
|
label: LabelIdentifier | null;
|
|
524
529
|
parent?: Node;
|
|
525
530
|
}
|
|
526
531
|
|
|
527
532
|
export interface ReturnStatement extends Span {
|
|
528
|
-
type:
|
|
533
|
+
type: "ReturnStatement";
|
|
529
534
|
argument: Expression | null;
|
|
530
535
|
parent?: Node;
|
|
531
536
|
}
|
|
532
537
|
|
|
533
538
|
export interface WithStatement extends Span {
|
|
534
|
-
type:
|
|
539
|
+
type: "WithStatement";
|
|
535
540
|
object: Expression;
|
|
536
541
|
body: Statement;
|
|
537
542
|
parent?: Node;
|
|
538
543
|
}
|
|
539
544
|
|
|
540
545
|
export interface SwitchStatement extends Span {
|
|
541
|
-
type:
|
|
546
|
+
type: "SwitchStatement";
|
|
542
547
|
discriminant: Expression;
|
|
543
548
|
cases: Array<SwitchCase>;
|
|
544
549
|
parent?: Node;
|
|
545
550
|
}
|
|
546
551
|
|
|
547
552
|
export interface SwitchCase extends Span {
|
|
548
|
-
type:
|
|
553
|
+
type: "SwitchCase";
|
|
549
554
|
test: Expression | null;
|
|
550
555
|
consequent: Array<Statement>;
|
|
551
556
|
parent?: Node;
|
|
552
557
|
}
|
|
553
558
|
|
|
554
559
|
export interface LabeledStatement extends Span {
|
|
555
|
-
type:
|
|
560
|
+
type: "LabeledStatement";
|
|
556
561
|
label: LabelIdentifier;
|
|
557
562
|
body: Statement;
|
|
558
563
|
parent?: Node;
|
|
559
564
|
}
|
|
560
565
|
|
|
561
566
|
export interface ThrowStatement extends Span {
|
|
562
|
-
type:
|
|
567
|
+
type: "ThrowStatement";
|
|
563
568
|
argument: Expression;
|
|
564
569
|
parent?: Node;
|
|
565
570
|
}
|
|
566
571
|
|
|
567
572
|
export interface TryStatement extends Span {
|
|
568
|
-
type:
|
|
573
|
+
type: "TryStatement";
|
|
569
574
|
block: BlockStatement;
|
|
570
575
|
handler: CatchClause | null;
|
|
571
576
|
finalizer: BlockStatement | null;
|
|
@@ -573,14 +578,14 @@ export interface TryStatement extends Span {
|
|
|
573
578
|
}
|
|
574
579
|
|
|
575
580
|
export interface CatchClause extends Span {
|
|
576
|
-
type:
|
|
581
|
+
type: "CatchClause";
|
|
577
582
|
param: BindingPattern | null;
|
|
578
583
|
body: BlockStatement;
|
|
579
584
|
parent?: Node;
|
|
580
585
|
}
|
|
581
586
|
|
|
582
587
|
export interface DebuggerStatement extends Span {
|
|
583
|
-
type:
|
|
588
|
+
type: "DebuggerStatement";
|
|
584
589
|
parent?: Node;
|
|
585
590
|
}
|
|
586
591
|
|
|
@@ -589,10 +594,14 @@ export type BindingPattern = {
|
|
|
589
594
|
typeAnnotation?: TSTypeAnnotation | null;
|
|
590
595
|
} & (BindingIdentifier | ObjectPattern | ArrayPattern | AssignmentPattern);
|
|
591
596
|
|
|
592
|
-
export type BindingPatternKind =
|
|
597
|
+
export type BindingPatternKind =
|
|
598
|
+
| BindingIdentifier
|
|
599
|
+
| ObjectPattern
|
|
600
|
+
| ArrayPattern
|
|
601
|
+
| AssignmentPattern;
|
|
593
602
|
|
|
594
603
|
export interface AssignmentPattern extends Span {
|
|
595
|
-
type:
|
|
604
|
+
type: "AssignmentPattern";
|
|
596
605
|
decorators?: [];
|
|
597
606
|
left: BindingPattern;
|
|
598
607
|
right: Expression;
|
|
@@ -602,7 +611,7 @@ export interface AssignmentPattern extends Span {
|
|
|
602
611
|
}
|
|
603
612
|
|
|
604
613
|
export interface ObjectPattern extends Span {
|
|
605
|
-
type:
|
|
614
|
+
type: "ObjectPattern";
|
|
606
615
|
decorators?: [];
|
|
607
616
|
properties: Array<BindingProperty | BindingRestElement>;
|
|
608
617
|
optional?: false;
|
|
@@ -611,8 +620,8 @@ export interface ObjectPattern extends Span {
|
|
|
611
620
|
}
|
|
612
621
|
|
|
613
622
|
export interface BindingProperty extends Span {
|
|
614
|
-
type:
|
|
615
|
-
kind:
|
|
623
|
+
type: "Property";
|
|
624
|
+
kind: "init";
|
|
616
625
|
key: PropertyKey;
|
|
617
626
|
value: BindingPattern;
|
|
618
627
|
method: false;
|
|
@@ -623,7 +632,7 @@ export interface BindingProperty extends Span {
|
|
|
623
632
|
}
|
|
624
633
|
|
|
625
634
|
export interface ArrayPattern extends Span {
|
|
626
|
-
type:
|
|
635
|
+
type: "ArrayPattern";
|
|
627
636
|
decorators?: [];
|
|
628
637
|
elements: Array<BindingPattern | BindingRestElement | null>;
|
|
629
638
|
optional?: false;
|
|
@@ -632,7 +641,7 @@ export interface ArrayPattern extends Span {
|
|
|
632
641
|
}
|
|
633
642
|
|
|
634
643
|
export interface BindingRestElement extends Span {
|
|
635
|
-
type:
|
|
644
|
+
type: "RestElement";
|
|
636
645
|
decorators?: [];
|
|
637
646
|
argument: BindingPattern;
|
|
638
647
|
optional?: false;
|
|
@@ -658,13 +667,13 @@ export interface Function extends Span {
|
|
|
658
667
|
export type ParamPattern = FormalParameter | TSParameterProperty | FormalParameterRest;
|
|
659
668
|
|
|
660
669
|
export type FunctionType =
|
|
661
|
-
|
|
|
662
|
-
|
|
|
663
|
-
|
|
|
664
|
-
|
|
|
670
|
+
| "FunctionDeclaration"
|
|
671
|
+
| "FunctionExpression"
|
|
672
|
+
| "TSDeclareFunction"
|
|
673
|
+
| "TSEmptyBodyFunctionExpression";
|
|
665
674
|
|
|
666
675
|
export interface FormalParameterRest extends Span {
|
|
667
|
-
type:
|
|
676
|
+
type: "RestElement";
|
|
668
677
|
argument: BindingPatternKind;
|
|
669
678
|
decorators?: [];
|
|
670
679
|
optional?: boolean;
|
|
@@ -678,7 +687,7 @@ export type FormalParameter = {
|
|
|
678
687
|
} & BindingPattern;
|
|
679
688
|
|
|
680
689
|
export interface TSParameterProperty extends Span {
|
|
681
|
-
type:
|
|
690
|
+
type: "TSParameterProperty";
|
|
682
691
|
accessibility: TSAccessibility | null;
|
|
683
692
|
decorators: Array<Decorator>;
|
|
684
693
|
override: boolean;
|
|
@@ -689,13 +698,13 @@ export interface TSParameterProperty extends Span {
|
|
|
689
698
|
}
|
|
690
699
|
|
|
691
700
|
export interface FunctionBody extends Span {
|
|
692
|
-
type:
|
|
701
|
+
type: "BlockStatement";
|
|
693
702
|
body: Array<Directive | Statement>;
|
|
694
703
|
parent?: Node;
|
|
695
704
|
}
|
|
696
705
|
|
|
697
706
|
export interface ArrowFunctionExpression extends Span {
|
|
698
|
-
type:
|
|
707
|
+
type: "ArrowFunctionExpression";
|
|
699
708
|
expression: boolean;
|
|
700
709
|
async: boolean;
|
|
701
710
|
typeParameters?: TSTypeParameterDeclaration | null;
|
|
@@ -708,7 +717,7 @@ export interface ArrowFunctionExpression extends Span {
|
|
|
708
717
|
}
|
|
709
718
|
|
|
710
719
|
export interface YieldExpression extends Span {
|
|
711
|
-
type:
|
|
720
|
+
type: "YieldExpression";
|
|
712
721
|
delegate: boolean;
|
|
713
722
|
argument: Expression | null;
|
|
714
723
|
parent?: Node;
|
|
@@ -728,15 +737,20 @@ export interface Class extends Span {
|
|
|
728
737
|
parent?: Node;
|
|
729
738
|
}
|
|
730
739
|
|
|
731
|
-
export type ClassType =
|
|
740
|
+
export type ClassType = "ClassDeclaration" | "ClassExpression";
|
|
732
741
|
|
|
733
742
|
export interface ClassBody extends Span {
|
|
734
|
-
type:
|
|
743
|
+
type: "ClassBody";
|
|
735
744
|
body: Array<ClassElement>;
|
|
736
745
|
parent?: Node;
|
|
737
746
|
}
|
|
738
747
|
|
|
739
|
-
export type ClassElement =
|
|
748
|
+
export type ClassElement =
|
|
749
|
+
| StaticBlock
|
|
750
|
+
| MethodDefinition
|
|
751
|
+
| PropertyDefinition
|
|
752
|
+
| AccessorProperty
|
|
753
|
+
| TSIndexSignature;
|
|
740
754
|
|
|
741
755
|
export interface MethodDefinition extends Span {
|
|
742
756
|
type: MethodDefinitionType;
|
|
@@ -752,7 +766,7 @@ export interface MethodDefinition extends Span {
|
|
|
752
766
|
parent?: Node;
|
|
753
767
|
}
|
|
754
768
|
|
|
755
|
-
export type MethodDefinitionType =
|
|
769
|
+
export type MethodDefinitionType = "MethodDefinition" | "TSAbstractMethodDefinition";
|
|
756
770
|
|
|
757
771
|
export interface PropertyDefinition extends Span {
|
|
758
772
|
type: PropertyDefinitionType;
|
|
@@ -771,18 +785,18 @@ export interface PropertyDefinition extends Span {
|
|
|
771
785
|
parent?: Node;
|
|
772
786
|
}
|
|
773
787
|
|
|
774
|
-
export type PropertyDefinitionType =
|
|
788
|
+
export type PropertyDefinitionType = "PropertyDefinition" | "TSAbstractPropertyDefinition";
|
|
775
789
|
|
|
776
|
-
export type MethodDefinitionKind =
|
|
790
|
+
export type MethodDefinitionKind = "constructor" | "method" | "get" | "set";
|
|
777
791
|
|
|
778
792
|
export interface PrivateIdentifier extends Span {
|
|
779
|
-
type:
|
|
793
|
+
type: "PrivateIdentifier";
|
|
780
794
|
name: string;
|
|
781
795
|
parent?: Node;
|
|
782
796
|
}
|
|
783
797
|
|
|
784
798
|
export interface StaticBlock extends Span {
|
|
785
|
-
type:
|
|
799
|
+
type: "StaticBlock";
|
|
786
800
|
body: Array<Statement>;
|
|
787
801
|
parent?: Node;
|
|
788
802
|
}
|
|
@@ -795,7 +809,7 @@ export type ModuleDeclaration =
|
|
|
795
809
|
| TSExportAssignment
|
|
796
810
|
| TSNamespaceExportDeclaration;
|
|
797
811
|
|
|
798
|
-
export type AccessorPropertyType =
|
|
812
|
+
export type AccessorPropertyType = "AccessorProperty" | "TSAbstractAccessorProperty";
|
|
799
813
|
|
|
800
814
|
export interface AccessorProperty extends Span {
|
|
801
815
|
type: AccessorPropertyType;
|
|
@@ -815,7 +829,7 @@ export interface AccessorProperty extends Span {
|
|
|
815
829
|
}
|
|
816
830
|
|
|
817
831
|
export interface ImportExpression extends Span {
|
|
818
|
-
type:
|
|
832
|
+
type: "ImportExpression";
|
|
819
833
|
source: Expression;
|
|
820
834
|
options: Expression | null;
|
|
821
835
|
phase: ImportPhase | null;
|
|
@@ -823,7 +837,7 @@ export interface ImportExpression extends Span {
|
|
|
823
837
|
}
|
|
824
838
|
|
|
825
839
|
export interface ImportDeclaration extends Span {
|
|
826
|
-
type:
|
|
840
|
+
type: "ImportDeclaration";
|
|
827
841
|
specifiers: Array<ImportDeclarationSpecifier>;
|
|
828
842
|
source: StringLiteral;
|
|
829
843
|
phase: ImportPhase | null;
|
|
@@ -832,12 +846,15 @@ export interface ImportDeclaration extends Span {
|
|
|
832
846
|
parent?: Node;
|
|
833
847
|
}
|
|
834
848
|
|
|
835
|
-
export type ImportPhase =
|
|
849
|
+
export type ImportPhase = "source" | "defer";
|
|
836
850
|
|
|
837
|
-
export type ImportDeclarationSpecifier =
|
|
851
|
+
export type ImportDeclarationSpecifier =
|
|
852
|
+
| ImportSpecifier
|
|
853
|
+
| ImportDefaultSpecifier
|
|
854
|
+
| ImportNamespaceSpecifier;
|
|
838
855
|
|
|
839
856
|
export interface ImportSpecifier extends Span {
|
|
840
|
-
type:
|
|
857
|
+
type: "ImportSpecifier";
|
|
841
858
|
imported: ModuleExportName;
|
|
842
859
|
local: BindingIdentifier;
|
|
843
860
|
importKind?: ImportOrExportKind;
|
|
@@ -845,19 +862,19 @@ export interface ImportSpecifier extends Span {
|
|
|
845
862
|
}
|
|
846
863
|
|
|
847
864
|
export interface ImportDefaultSpecifier extends Span {
|
|
848
|
-
type:
|
|
865
|
+
type: "ImportDefaultSpecifier";
|
|
849
866
|
local: BindingIdentifier;
|
|
850
867
|
parent?: Node;
|
|
851
868
|
}
|
|
852
869
|
|
|
853
870
|
export interface ImportNamespaceSpecifier extends Span {
|
|
854
|
-
type:
|
|
871
|
+
type: "ImportNamespaceSpecifier";
|
|
855
872
|
local: BindingIdentifier;
|
|
856
873
|
parent?: Node;
|
|
857
874
|
}
|
|
858
875
|
|
|
859
876
|
export interface ImportAttribute extends Span {
|
|
860
|
-
type:
|
|
877
|
+
type: "ImportAttribute";
|
|
861
878
|
key: ImportAttributeKey;
|
|
862
879
|
value: StringLiteral;
|
|
863
880
|
parent?: Node;
|
|
@@ -866,7 +883,7 @@ export interface ImportAttribute extends Span {
|
|
|
866
883
|
export type ImportAttributeKey = IdentifierName | StringLiteral;
|
|
867
884
|
|
|
868
885
|
export interface ExportNamedDeclaration extends Span {
|
|
869
|
-
type:
|
|
886
|
+
type: "ExportNamedDeclaration";
|
|
870
887
|
declaration: Declaration | null;
|
|
871
888
|
specifiers: Array<ExportSpecifier>;
|
|
872
889
|
source: StringLiteral | null;
|
|
@@ -876,14 +893,14 @@ export interface ExportNamedDeclaration extends Span {
|
|
|
876
893
|
}
|
|
877
894
|
|
|
878
895
|
export interface ExportDefaultDeclaration extends Span {
|
|
879
|
-
type:
|
|
896
|
+
type: "ExportDefaultDeclaration";
|
|
880
897
|
declaration: ExportDefaultDeclarationKind;
|
|
881
|
-
exportKind?:
|
|
898
|
+
exportKind?: "value";
|
|
882
899
|
parent?: Node;
|
|
883
900
|
}
|
|
884
901
|
|
|
885
902
|
export interface ExportAllDeclaration extends Span {
|
|
886
|
-
type:
|
|
903
|
+
type: "ExportAllDeclaration";
|
|
887
904
|
exported: ModuleExportName | null;
|
|
888
905
|
source: StringLiteral;
|
|
889
906
|
attributes: Array<ImportAttribute>;
|
|
@@ -892,7 +909,7 @@ export interface ExportAllDeclaration extends Span {
|
|
|
892
909
|
}
|
|
893
910
|
|
|
894
911
|
export interface ExportSpecifier extends Span {
|
|
895
|
-
type:
|
|
912
|
+
type: "ExportSpecifier";
|
|
896
913
|
local: ModuleExportName;
|
|
897
914
|
exported: ModuleExportName;
|
|
898
915
|
exportKind?: ImportOrExportKind;
|
|
@@ -904,42 +921,42 @@ export type ExportDefaultDeclarationKind = Function | Class | TSInterfaceDeclara
|
|
|
904
921
|
export type ModuleExportName = IdentifierName | IdentifierReference | StringLiteral;
|
|
905
922
|
|
|
906
923
|
export interface V8IntrinsicExpression extends Span {
|
|
907
|
-
type:
|
|
924
|
+
type: "V8IntrinsicExpression";
|
|
908
925
|
name: IdentifierName;
|
|
909
926
|
arguments: Array<Argument>;
|
|
910
927
|
parent?: Node;
|
|
911
928
|
}
|
|
912
929
|
|
|
913
930
|
export interface BooleanLiteral extends Span {
|
|
914
|
-
type:
|
|
931
|
+
type: "Literal";
|
|
915
932
|
value: boolean;
|
|
916
933
|
raw: string | null;
|
|
917
934
|
parent?: Node;
|
|
918
935
|
}
|
|
919
936
|
|
|
920
937
|
export interface NullLiteral extends Span {
|
|
921
|
-
type:
|
|
938
|
+
type: "Literal";
|
|
922
939
|
value: null;
|
|
923
|
-
raw:
|
|
940
|
+
raw: "null" | null;
|
|
924
941
|
parent?: Node;
|
|
925
942
|
}
|
|
926
943
|
|
|
927
944
|
export interface NumericLiteral extends Span {
|
|
928
|
-
type:
|
|
945
|
+
type: "Literal";
|
|
929
946
|
value: number;
|
|
930
947
|
raw: string | null;
|
|
931
948
|
parent?: Node;
|
|
932
949
|
}
|
|
933
950
|
|
|
934
951
|
export interface StringLiteral extends Span {
|
|
935
|
-
type:
|
|
952
|
+
type: "Literal";
|
|
936
953
|
value: string;
|
|
937
954
|
raw: string | null;
|
|
938
955
|
parent?: Node;
|
|
939
956
|
}
|
|
940
957
|
|
|
941
958
|
export interface BigIntLiteral extends Span {
|
|
942
|
-
type:
|
|
959
|
+
type: "Literal";
|
|
943
960
|
value: bigint;
|
|
944
961
|
raw: string | null;
|
|
945
962
|
bigint: string;
|
|
@@ -947,7 +964,7 @@ export interface BigIntLiteral extends Span {
|
|
|
947
964
|
}
|
|
948
965
|
|
|
949
966
|
export interface RegExpLiteral extends Span {
|
|
950
|
-
type:
|
|
967
|
+
type: "Literal";
|
|
951
968
|
value: RegExp | null;
|
|
952
969
|
raw: string | null;
|
|
953
970
|
regex: { pattern: string; flags: string };
|
|
@@ -955,7 +972,7 @@ export interface RegExpLiteral extends Span {
|
|
|
955
972
|
}
|
|
956
973
|
|
|
957
974
|
export interface JSXElement extends Span {
|
|
958
|
-
type:
|
|
975
|
+
type: "JSXElement";
|
|
959
976
|
openingElement: JSXOpeningElement;
|
|
960
977
|
children: Array<JSXChild>;
|
|
961
978
|
closingElement: JSXClosingElement | null;
|
|
@@ -963,7 +980,7 @@ export interface JSXElement extends Span {
|
|
|
963
980
|
}
|
|
964
981
|
|
|
965
982
|
export interface JSXOpeningElement extends Span {
|
|
966
|
-
type:
|
|
983
|
+
type: "JSXOpeningElement";
|
|
967
984
|
name: JSXElementName;
|
|
968
985
|
typeArguments?: TSTypeParameterInstantiation | null;
|
|
969
986
|
attributes: Array<JSXAttributeItem>;
|
|
@@ -972,13 +989,13 @@ export interface JSXOpeningElement extends Span {
|
|
|
972
989
|
}
|
|
973
990
|
|
|
974
991
|
export interface JSXClosingElement extends Span {
|
|
975
|
-
type:
|
|
992
|
+
type: "JSXClosingElement";
|
|
976
993
|
name: JSXElementName;
|
|
977
994
|
parent?: Node;
|
|
978
995
|
}
|
|
979
996
|
|
|
980
997
|
export interface JSXFragment extends Span {
|
|
981
|
-
type:
|
|
998
|
+
type: "JSXFragment";
|
|
982
999
|
openingFragment: JSXOpeningFragment;
|
|
983
1000
|
children: Array<JSXChild>;
|
|
984
1001
|
closingFragment: JSXClosingFragment;
|
|
@@ -986,28 +1003,28 @@ export interface JSXFragment extends Span {
|
|
|
986
1003
|
}
|
|
987
1004
|
|
|
988
1005
|
export interface JSXOpeningFragment extends Span {
|
|
989
|
-
type:
|
|
1006
|
+
type: "JSXOpeningFragment";
|
|
990
1007
|
attributes?: [];
|
|
991
1008
|
selfClosing?: false;
|
|
992
1009
|
parent?: Node;
|
|
993
1010
|
}
|
|
994
1011
|
|
|
995
1012
|
export interface JSXClosingFragment extends Span {
|
|
996
|
-
type:
|
|
1013
|
+
type: "JSXClosingFragment";
|
|
997
1014
|
parent?: Node;
|
|
998
1015
|
}
|
|
999
1016
|
|
|
1000
1017
|
export type JSXElementName = JSXIdentifier | JSXNamespacedName | JSXMemberExpression;
|
|
1001
1018
|
|
|
1002
1019
|
export interface JSXNamespacedName extends Span {
|
|
1003
|
-
type:
|
|
1020
|
+
type: "JSXNamespacedName";
|
|
1004
1021
|
namespace: JSXIdentifier;
|
|
1005
1022
|
name: JSXIdentifier;
|
|
1006
1023
|
parent?: Node;
|
|
1007
1024
|
}
|
|
1008
1025
|
|
|
1009
1026
|
export interface JSXMemberExpression extends Span {
|
|
1010
|
-
type:
|
|
1027
|
+
type: "JSXMemberExpression";
|
|
1011
1028
|
object: JSXMemberExpressionObject;
|
|
1012
1029
|
property: JSXIdentifier;
|
|
1013
1030
|
parent?: Node;
|
|
@@ -1016,7 +1033,7 @@ export interface JSXMemberExpression extends Span {
|
|
|
1016
1033
|
export type JSXMemberExpressionObject = JSXIdentifier | JSXMemberExpression;
|
|
1017
1034
|
|
|
1018
1035
|
export interface JSXExpressionContainer extends Span {
|
|
1019
|
-
type:
|
|
1036
|
+
type: "JSXExpressionContainer";
|
|
1020
1037
|
expression: JSXExpression;
|
|
1021
1038
|
parent?: Node;
|
|
1022
1039
|
}
|
|
@@ -1024,21 +1041,21 @@ export interface JSXExpressionContainer extends Span {
|
|
|
1024
1041
|
export type JSXExpression = JSXEmptyExpression | Expression;
|
|
1025
1042
|
|
|
1026
1043
|
export interface JSXEmptyExpression extends Span {
|
|
1027
|
-
type:
|
|
1044
|
+
type: "JSXEmptyExpression";
|
|
1028
1045
|
parent?: Node;
|
|
1029
1046
|
}
|
|
1030
1047
|
|
|
1031
1048
|
export type JSXAttributeItem = JSXAttribute | JSXSpreadAttribute;
|
|
1032
1049
|
|
|
1033
1050
|
export interface JSXAttribute extends Span {
|
|
1034
|
-
type:
|
|
1051
|
+
type: "JSXAttribute";
|
|
1035
1052
|
name: JSXAttributeName;
|
|
1036
1053
|
value: JSXAttributeValue | null;
|
|
1037
1054
|
parent?: Node;
|
|
1038
1055
|
}
|
|
1039
1056
|
|
|
1040
1057
|
export interface JSXSpreadAttribute extends Span {
|
|
1041
|
-
type:
|
|
1058
|
+
type: "JSXSpreadAttribute";
|
|
1042
1059
|
argument: Expression;
|
|
1043
1060
|
parent?: Node;
|
|
1044
1061
|
}
|
|
@@ -1048,7 +1065,7 @@ export type JSXAttributeName = JSXIdentifier | JSXNamespacedName;
|
|
|
1048
1065
|
export type JSXAttributeValue = StringLiteral | JSXExpressionContainer | JSXElement | JSXFragment;
|
|
1049
1066
|
|
|
1050
1067
|
export interface JSXIdentifier extends Span {
|
|
1051
|
-
type:
|
|
1068
|
+
type: "JSXIdentifier";
|
|
1052
1069
|
name: string;
|
|
1053
1070
|
parent?: Node;
|
|
1054
1071
|
}
|
|
@@ -1056,29 +1073,29 @@ export interface JSXIdentifier extends Span {
|
|
|
1056
1073
|
export type JSXChild = JSXText | JSXElement | JSXFragment | JSXExpressionContainer | JSXSpreadChild;
|
|
1057
1074
|
|
|
1058
1075
|
export interface JSXSpreadChild extends Span {
|
|
1059
|
-
type:
|
|
1076
|
+
type: "JSXSpreadChild";
|
|
1060
1077
|
expression: Expression;
|
|
1061
1078
|
parent?: Node;
|
|
1062
1079
|
}
|
|
1063
1080
|
|
|
1064
1081
|
export interface JSXText extends Span {
|
|
1065
|
-
type:
|
|
1082
|
+
type: "JSXText";
|
|
1066
1083
|
value: string;
|
|
1067
1084
|
raw: string | null;
|
|
1068
1085
|
parent?: Node;
|
|
1069
1086
|
}
|
|
1070
1087
|
|
|
1071
1088
|
export interface TSThisParameter extends Span {
|
|
1072
|
-
type:
|
|
1089
|
+
type: "Identifier";
|
|
1073
1090
|
decorators: [];
|
|
1074
|
-
name:
|
|
1091
|
+
name: "this";
|
|
1075
1092
|
optional: false;
|
|
1076
1093
|
typeAnnotation: TSTypeAnnotation | null;
|
|
1077
1094
|
parent?: Node;
|
|
1078
1095
|
}
|
|
1079
1096
|
|
|
1080
1097
|
export interface TSEnumDeclaration extends Span {
|
|
1081
|
-
type:
|
|
1098
|
+
type: "TSEnumDeclaration";
|
|
1082
1099
|
id: BindingIdentifier;
|
|
1083
1100
|
body: TSEnumBody;
|
|
1084
1101
|
const: boolean;
|
|
@@ -1087,13 +1104,13 @@ export interface TSEnumDeclaration extends Span {
|
|
|
1087
1104
|
}
|
|
1088
1105
|
|
|
1089
1106
|
export interface TSEnumBody extends Span {
|
|
1090
|
-
type:
|
|
1107
|
+
type: "TSEnumBody";
|
|
1091
1108
|
members: Array<TSEnumMember>;
|
|
1092
1109
|
parent?: Node;
|
|
1093
1110
|
}
|
|
1094
1111
|
|
|
1095
1112
|
export interface TSEnumMember extends Span {
|
|
1096
|
-
type:
|
|
1113
|
+
type: "TSEnumMember";
|
|
1097
1114
|
id: TSEnumMemberName;
|
|
1098
1115
|
initializer: Expression | null;
|
|
1099
1116
|
computed: boolean;
|
|
@@ -1103,13 +1120,13 @@ export interface TSEnumMember extends Span {
|
|
|
1103
1120
|
export type TSEnumMemberName = IdentifierName | StringLiteral | TemplateLiteral;
|
|
1104
1121
|
|
|
1105
1122
|
export interface TSTypeAnnotation extends Span {
|
|
1106
|
-
type:
|
|
1123
|
+
type: "TSTypeAnnotation";
|
|
1107
1124
|
typeAnnotation: TSType;
|
|
1108
1125
|
parent?: Node;
|
|
1109
1126
|
}
|
|
1110
1127
|
|
|
1111
1128
|
export interface TSLiteralType extends Span {
|
|
1112
|
-
type:
|
|
1129
|
+
type: "TSLiteralType";
|
|
1113
1130
|
literal: TSLiteral;
|
|
1114
1131
|
parent?: Node;
|
|
1115
1132
|
}
|
|
@@ -1162,7 +1179,7 @@ export type TSType =
|
|
|
1162
1179
|
| JSDocUnknownType;
|
|
1163
1180
|
|
|
1164
1181
|
export interface TSConditionalType extends Span {
|
|
1165
|
-
type:
|
|
1182
|
+
type: "TSConditionalType";
|
|
1166
1183
|
checkType: TSType;
|
|
1167
1184
|
extendsType: TSType;
|
|
1168
1185
|
trueType: TSType;
|
|
@@ -1171,53 +1188,53 @@ export interface TSConditionalType extends Span {
|
|
|
1171
1188
|
}
|
|
1172
1189
|
|
|
1173
1190
|
export interface TSUnionType extends Span {
|
|
1174
|
-
type:
|
|
1191
|
+
type: "TSUnionType";
|
|
1175
1192
|
types: Array<TSType>;
|
|
1176
1193
|
parent?: Node;
|
|
1177
1194
|
}
|
|
1178
1195
|
|
|
1179
1196
|
export interface TSIntersectionType extends Span {
|
|
1180
|
-
type:
|
|
1197
|
+
type: "TSIntersectionType";
|
|
1181
1198
|
types: Array<TSType>;
|
|
1182
1199
|
parent?: Node;
|
|
1183
1200
|
}
|
|
1184
1201
|
|
|
1185
1202
|
export interface TSParenthesizedType extends Span {
|
|
1186
|
-
type:
|
|
1203
|
+
type: "TSParenthesizedType";
|
|
1187
1204
|
typeAnnotation: TSType;
|
|
1188
1205
|
parent?: Node;
|
|
1189
1206
|
}
|
|
1190
1207
|
|
|
1191
1208
|
export interface TSTypeOperator extends Span {
|
|
1192
|
-
type:
|
|
1209
|
+
type: "TSTypeOperator";
|
|
1193
1210
|
operator: TSTypeOperatorOperator;
|
|
1194
1211
|
typeAnnotation: TSType;
|
|
1195
1212
|
parent?: Node;
|
|
1196
1213
|
}
|
|
1197
1214
|
|
|
1198
|
-
export type TSTypeOperatorOperator =
|
|
1215
|
+
export type TSTypeOperatorOperator = "keyof" | "unique" | "readonly";
|
|
1199
1216
|
|
|
1200
1217
|
export interface TSArrayType extends Span {
|
|
1201
|
-
type:
|
|
1218
|
+
type: "TSArrayType";
|
|
1202
1219
|
elementType: TSType;
|
|
1203
1220
|
parent?: Node;
|
|
1204
1221
|
}
|
|
1205
1222
|
|
|
1206
1223
|
export interface TSIndexedAccessType extends Span {
|
|
1207
|
-
type:
|
|
1224
|
+
type: "TSIndexedAccessType";
|
|
1208
1225
|
objectType: TSType;
|
|
1209
1226
|
indexType: TSType;
|
|
1210
1227
|
parent?: Node;
|
|
1211
1228
|
}
|
|
1212
1229
|
|
|
1213
1230
|
export interface TSTupleType extends Span {
|
|
1214
|
-
type:
|
|
1231
|
+
type: "TSTupleType";
|
|
1215
1232
|
elementTypes: Array<TSTupleElement>;
|
|
1216
1233
|
parent?: Node;
|
|
1217
1234
|
}
|
|
1218
1235
|
|
|
1219
1236
|
export interface TSNamedTupleMember extends Span {
|
|
1220
|
-
type:
|
|
1237
|
+
type: "TSNamedTupleMember";
|
|
1221
1238
|
label: IdentifierName;
|
|
1222
1239
|
elementType: TSTupleElement;
|
|
1223
1240
|
optional: boolean;
|
|
@@ -1225,13 +1242,13 @@ export interface TSNamedTupleMember extends Span {
|
|
|
1225
1242
|
}
|
|
1226
1243
|
|
|
1227
1244
|
export interface TSOptionalType extends Span {
|
|
1228
|
-
type:
|
|
1245
|
+
type: "TSOptionalType";
|
|
1229
1246
|
typeAnnotation: TSType;
|
|
1230
1247
|
parent?: Node;
|
|
1231
1248
|
}
|
|
1232
1249
|
|
|
1233
1250
|
export interface TSRestType extends Span {
|
|
1234
|
-
type:
|
|
1251
|
+
type: "TSRestType";
|
|
1235
1252
|
typeAnnotation: TSType;
|
|
1236
1253
|
parent?: Node;
|
|
1237
1254
|
}
|
|
@@ -1239,77 +1256,77 @@ export interface TSRestType extends Span {
|
|
|
1239
1256
|
export type TSTupleElement = TSOptionalType | TSRestType | TSType;
|
|
1240
1257
|
|
|
1241
1258
|
export interface TSAnyKeyword extends Span {
|
|
1242
|
-
type:
|
|
1259
|
+
type: "TSAnyKeyword";
|
|
1243
1260
|
parent?: Node;
|
|
1244
1261
|
}
|
|
1245
1262
|
|
|
1246
1263
|
export interface TSStringKeyword extends Span {
|
|
1247
|
-
type:
|
|
1264
|
+
type: "TSStringKeyword";
|
|
1248
1265
|
parent?: Node;
|
|
1249
1266
|
}
|
|
1250
1267
|
|
|
1251
1268
|
export interface TSBooleanKeyword extends Span {
|
|
1252
|
-
type:
|
|
1269
|
+
type: "TSBooleanKeyword";
|
|
1253
1270
|
parent?: Node;
|
|
1254
1271
|
}
|
|
1255
1272
|
|
|
1256
1273
|
export interface TSNumberKeyword extends Span {
|
|
1257
|
-
type:
|
|
1274
|
+
type: "TSNumberKeyword";
|
|
1258
1275
|
parent?: Node;
|
|
1259
1276
|
}
|
|
1260
1277
|
|
|
1261
1278
|
export interface TSNeverKeyword extends Span {
|
|
1262
|
-
type:
|
|
1279
|
+
type: "TSNeverKeyword";
|
|
1263
1280
|
parent?: Node;
|
|
1264
1281
|
}
|
|
1265
1282
|
|
|
1266
1283
|
export interface TSIntrinsicKeyword extends Span {
|
|
1267
|
-
type:
|
|
1284
|
+
type: "TSIntrinsicKeyword";
|
|
1268
1285
|
parent?: Node;
|
|
1269
1286
|
}
|
|
1270
1287
|
|
|
1271
1288
|
export interface TSUnknownKeyword extends Span {
|
|
1272
|
-
type:
|
|
1289
|
+
type: "TSUnknownKeyword";
|
|
1273
1290
|
parent?: Node;
|
|
1274
1291
|
}
|
|
1275
1292
|
|
|
1276
1293
|
export interface TSNullKeyword extends Span {
|
|
1277
|
-
type:
|
|
1294
|
+
type: "TSNullKeyword";
|
|
1278
1295
|
parent?: Node;
|
|
1279
1296
|
}
|
|
1280
1297
|
|
|
1281
1298
|
export interface TSUndefinedKeyword extends Span {
|
|
1282
|
-
type:
|
|
1299
|
+
type: "TSUndefinedKeyword";
|
|
1283
1300
|
parent?: Node;
|
|
1284
1301
|
}
|
|
1285
1302
|
|
|
1286
1303
|
export interface TSVoidKeyword extends Span {
|
|
1287
|
-
type:
|
|
1304
|
+
type: "TSVoidKeyword";
|
|
1288
1305
|
parent?: Node;
|
|
1289
1306
|
}
|
|
1290
1307
|
|
|
1291
1308
|
export interface TSSymbolKeyword extends Span {
|
|
1292
|
-
type:
|
|
1309
|
+
type: "TSSymbolKeyword";
|
|
1293
1310
|
parent?: Node;
|
|
1294
1311
|
}
|
|
1295
1312
|
|
|
1296
1313
|
export interface TSThisType extends Span {
|
|
1297
|
-
type:
|
|
1314
|
+
type: "TSThisType";
|
|
1298
1315
|
parent?: Node;
|
|
1299
1316
|
}
|
|
1300
1317
|
|
|
1301
1318
|
export interface TSObjectKeyword extends Span {
|
|
1302
|
-
type:
|
|
1319
|
+
type: "TSObjectKeyword";
|
|
1303
1320
|
parent?: Node;
|
|
1304
1321
|
}
|
|
1305
1322
|
|
|
1306
1323
|
export interface TSBigIntKeyword extends Span {
|
|
1307
|
-
type:
|
|
1324
|
+
type: "TSBigIntKeyword";
|
|
1308
1325
|
parent?: Node;
|
|
1309
1326
|
}
|
|
1310
1327
|
|
|
1311
1328
|
export interface TSTypeReference extends Span {
|
|
1312
|
-
type:
|
|
1329
|
+
type: "TSTypeReference";
|
|
1313
1330
|
typeName: TSTypeName;
|
|
1314
1331
|
typeArguments: TSTypeParameterInstantiation | null;
|
|
1315
1332
|
parent?: Node;
|
|
@@ -1318,20 +1335,20 @@ export interface TSTypeReference extends Span {
|
|
|
1318
1335
|
export type TSTypeName = IdentifierReference | TSQualifiedName | ThisExpression;
|
|
1319
1336
|
|
|
1320
1337
|
export interface TSQualifiedName extends Span {
|
|
1321
|
-
type:
|
|
1338
|
+
type: "TSQualifiedName";
|
|
1322
1339
|
left: TSTypeName;
|
|
1323
1340
|
right: IdentifierName;
|
|
1324
1341
|
parent?: Node;
|
|
1325
1342
|
}
|
|
1326
1343
|
|
|
1327
1344
|
export interface TSTypeParameterInstantiation extends Span {
|
|
1328
|
-
type:
|
|
1345
|
+
type: "TSTypeParameterInstantiation";
|
|
1329
1346
|
params: Array<TSType>;
|
|
1330
1347
|
parent?: Node;
|
|
1331
1348
|
}
|
|
1332
1349
|
|
|
1333
1350
|
export interface TSTypeParameter extends Span {
|
|
1334
|
-
type:
|
|
1351
|
+
type: "TSTypeParameter";
|
|
1335
1352
|
name: BindingIdentifier;
|
|
1336
1353
|
constraint: TSType | null;
|
|
1337
1354
|
default: TSType | null;
|
|
@@ -1342,13 +1359,13 @@ export interface TSTypeParameter extends Span {
|
|
|
1342
1359
|
}
|
|
1343
1360
|
|
|
1344
1361
|
export interface TSTypeParameterDeclaration extends Span {
|
|
1345
|
-
type:
|
|
1362
|
+
type: "TSTypeParameterDeclaration";
|
|
1346
1363
|
params: Array<TSTypeParameter>;
|
|
1347
1364
|
parent?: Node;
|
|
1348
1365
|
}
|
|
1349
1366
|
|
|
1350
1367
|
export interface TSTypeAliasDeclaration extends Span {
|
|
1351
|
-
type:
|
|
1368
|
+
type: "TSTypeAliasDeclaration";
|
|
1352
1369
|
id: BindingIdentifier;
|
|
1353
1370
|
typeParameters: TSTypeParameterDeclaration | null;
|
|
1354
1371
|
typeAnnotation: TSType;
|
|
@@ -1356,17 +1373,17 @@ export interface TSTypeAliasDeclaration extends Span {
|
|
|
1356
1373
|
parent?: Node;
|
|
1357
1374
|
}
|
|
1358
1375
|
|
|
1359
|
-
export type TSAccessibility =
|
|
1376
|
+
export type TSAccessibility = "private" | "protected" | "public";
|
|
1360
1377
|
|
|
1361
1378
|
export interface TSClassImplements extends Span {
|
|
1362
|
-
type:
|
|
1379
|
+
type: "TSClassImplements";
|
|
1363
1380
|
expression: IdentifierReference | ThisExpression | MemberExpression;
|
|
1364
1381
|
typeArguments: TSTypeParameterInstantiation | null;
|
|
1365
1382
|
parent?: Node;
|
|
1366
1383
|
}
|
|
1367
1384
|
|
|
1368
1385
|
export interface TSInterfaceDeclaration extends Span {
|
|
1369
|
-
type:
|
|
1386
|
+
type: "TSInterfaceDeclaration";
|
|
1370
1387
|
id: BindingIdentifier;
|
|
1371
1388
|
typeParameters: TSTypeParameterDeclaration | null;
|
|
1372
1389
|
extends: Array<TSInterfaceHeritage>;
|
|
@@ -1376,13 +1393,13 @@ export interface TSInterfaceDeclaration extends Span {
|
|
|
1376
1393
|
}
|
|
1377
1394
|
|
|
1378
1395
|
export interface TSInterfaceBody extends Span {
|
|
1379
|
-
type:
|
|
1396
|
+
type: "TSInterfaceBody";
|
|
1380
1397
|
body: Array<TSSignature>;
|
|
1381
1398
|
parent?: Node;
|
|
1382
1399
|
}
|
|
1383
1400
|
|
|
1384
1401
|
export interface TSPropertySignature extends Span {
|
|
1385
|
-
type:
|
|
1402
|
+
type: "TSPropertySignature";
|
|
1386
1403
|
computed: boolean;
|
|
1387
1404
|
optional: boolean;
|
|
1388
1405
|
readonly: boolean;
|
|
@@ -1401,7 +1418,7 @@ export type TSSignature =
|
|
|
1401
1418
|
| TSMethodSignature;
|
|
1402
1419
|
|
|
1403
1420
|
export interface TSIndexSignature extends Span {
|
|
1404
|
-
type:
|
|
1421
|
+
type: "TSIndexSignature";
|
|
1405
1422
|
parameters: Array<TSIndexSignatureName>;
|
|
1406
1423
|
typeAnnotation: TSTypeAnnotation;
|
|
1407
1424
|
readonly: boolean;
|
|
@@ -1411,17 +1428,17 @@ export interface TSIndexSignature extends Span {
|
|
|
1411
1428
|
}
|
|
1412
1429
|
|
|
1413
1430
|
export interface TSCallSignatureDeclaration extends Span {
|
|
1414
|
-
type:
|
|
1431
|
+
type: "TSCallSignatureDeclaration";
|
|
1415
1432
|
typeParameters: TSTypeParameterDeclaration | null;
|
|
1416
1433
|
params: ParamPattern[];
|
|
1417
1434
|
returnType: TSTypeAnnotation | null;
|
|
1418
1435
|
parent?: Node;
|
|
1419
1436
|
}
|
|
1420
1437
|
|
|
1421
|
-
export type TSMethodSignatureKind =
|
|
1438
|
+
export type TSMethodSignatureKind = "method" | "get" | "set";
|
|
1422
1439
|
|
|
1423
1440
|
export interface TSMethodSignature extends Span {
|
|
1424
|
-
type:
|
|
1441
|
+
type: "TSMethodSignature";
|
|
1425
1442
|
key: PropertyKey;
|
|
1426
1443
|
computed: boolean;
|
|
1427
1444
|
optional: boolean;
|
|
@@ -1436,7 +1453,7 @@ export interface TSMethodSignature extends Span {
|
|
|
1436
1453
|
}
|
|
1437
1454
|
|
|
1438
1455
|
export interface TSConstructSignatureDeclaration extends Span {
|
|
1439
|
-
type:
|
|
1456
|
+
type: "TSConstructSignatureDeclaration";
|
|
1440
1457
|
typeParameters: TSTypeParameterDeclaration | null;
|
|
1441
1458
|
params: ParamPattern[];
|
|
1442
1459
|
returnType: TSTypeAnnotation | null;
|
|
@@ -1444,7 +1461,7 @@ export interface TSConstructSignatureDeclaration extends Span {
|
|
|
1444
1461
|
}
|
|
1445
1462
|
|
|
1446
1463
|
export interface TSIndexSignatureName extends Span {
|
|
1447
|
-
type:
|
|
1464
|
+
type: "Identifier";
|
|
1448
1465
|
decorators: [];
|
|
1449
1466
|
name: string;
|
|
1450
1467
|
optional: false;
|
|
@@ -1453,14 +1470,14 @@ export interface TSIndexSignatureName extends Span {
|
|
|
1453
1470
|
}
|
|
1454
1471
|
|
|
1455
1472
|
export interface TSInterfaceHeritage extends Span {
|
|
1456
|
-
type:
|
|
1473
|
+
type: "TSInterfaceHeritage";
|
|
1457
1474
|
expression: Expression;
|
|
1458
1475
|
typeArguments: TSTypeParameterInstantiation | null;
|
|
1459
1476
|
parent?: Node;
|
|
1460
1477
|
}
|
|
1461
1478
|
|
|
1462
1479
|
export interface TSTypePredicate extends Span {
|
|
1463
|
-
type:
|
|
1480
|
+
type: "TSTypePredicate";
|
|
1464
1481
|
parameterName: TSTypePredicateName;
|
|
1465
1482
|
asserts: boolean;
|
|
1466
1483
|
typeAnnotation: TSTypeAnnotation | null;
|
|
@@ -1470,7 +1487,7 @@ export interface TSTypePredicate extends Span {
|
|
|
1470
1487
|
export type TSTypePredicateName = IdentifierName | TSThisType;
|
|
1471
1488
|
|
|
1472
1489
|
export interface TSModuleDeclaration extends Span {
|
|
1473
|
-
type:
|
|
1490
|
+
type: "TSModuleDeclaration";
|
|
1474
1491
|
id: BindingIdentifier | StringLiteral | TSQualifiedName;
|
|
1475
1492
|
body: TSModuleBlock | null;
|
|
1476
1493
|
kind: TSModuleDeclarationKind;
|
|
@@ -1479,38 +1496,38 @@ export interface TSModuleDeclaration extends Span {
|
|
|
1479
1496
|
parent?: Node;
|
|
1480
1497
|
}
|
|
1481
1498
|
|
|
1482
|
-
export type TSModuleDeclarationKind =
|
|
1499
|
+
export type TSModuleDeclarationKind = "module" | "namespace";
|
|
1483
1500
|
|
|
1484
1501
|
export interface TSGlobalDeclaration extends Span {
|
|
1485
|
-
type:
|
|
1502
|
+
type: "TSModuleDeclaration";
|
|
1486
1503
|
id: IdentifierName;
|
|
1487
1504
|
body: TSModuleBlock;
|
|
1488
|
-
kind:
|
|
1505
|
+
kind: "global";
|
|
1489
1506
|
declare: boolean;
|
|
1490
1507
|
global: true;
|
|
1491
1508
|
parent?: Node;
|
|
1492
1509
|
}
|
|
1493
1510
|
|
|
1494
1511
|
export interface TSModuleBlock extends Span {
|
|
1495
|
-
type:
|
|
1512
|
+
type: "TSModuleBlock";
|
|
1496
1513
|
body: Array<Directive | Statement>;
|
|
1497
1514
|
parent?: Node;
|
|
1498
1515
|
}
|
|
1499
1516
|
|
|
1500
1517
|
export interface TSTypeLiteral extends Span {
|
|
1501
|
-
type:
|
|
1518
|
+
type: "TSTypeLiteral";
|
|
1502
1519
|
members: Array<TSSignature>;
|
|
1503
1520
|
parent?: Node;
|
|
1504
1521
|
}
|
|
1505
1522
|
|
|
1506
1523
|
export interface TSInferType extends Span {
|
|
1507
|
-
type:
|
|
1524
|
+
type: "TSInferType";
|
|
1508
1525
|
typeParameter: TSTypeParameter;
|
|
1509
1526
|
parent?: Node;
|
|
1510
1527
|
}
|
|
1511
1528
|
|
|
1512
1529
|
export interface TSTypeQuery extends Span {
|
|
1513
|
-
type:
|
|
1530
|
+
type: "TSTypeQuery";
|
|
1514
1531
|
exprName: TSTypeQueryExprName;
|
|
1515
1532
|
typeArguments: TSTypeParameterInstantiation | null;
|
|
1516
1533
|
parent?: Node;
|
|
@@ -1519,8 +1536,8 @@ export interface TSTypeQuery extends Span {
|
|
|
1519
1536
|
export type TSTypeQueryExprName = TSImportType | TSTypeName;
|
|
1520
1537
|
|
|
1521
1538
|
export interface TSImportType extends Span {
|
|
1522
|
-
type:
|
|
1523
|
-
|
|
1539
|
+
type: "TSImportType";
|
|
1540
|
+
source: StringLiteral;
|
|
1524
1541
|
options: ObjectExpression | null;
|
|
1525
1542
|
qualifier: TSImportTypeQualifier | null;
|
|
1526
1543
|
typeArguments: TSTypeParameterInstantiation | null;
|
|
@@ -1530,14 +1547,14 @@ export interface TSImportType extends Span {
|
|
|
1530
1547
|
export type TSImportTypeQualifier = IdentifierName | TSImportTypeQualifiedName;
|
|
1531
1548
|
|
|
1532
1549
|
export interface TSImportTypeQualifiedName extends Span {
|
|
1533
|
-
type:
|
|
1550
|
+
type: "TSQualifiedName";
|
|
1534
1551
|
left: TSImportTypeQualifier;
|
|
1535
1552
|
right: IdentifierName;
|
|
1536
1553
|
parent?: Node;
|
|
1537
1554
|
}
|
|
1538
1555
|
|
|
1539
1556
|
export interface TSFunctionType extends Span {
|
|
1540
|
-
type:
|
|
1557
|
+
type: "TSFunctionType";
|
|
1541
1558
|
typeParameters: TSTypeParameterDeclaration | null;
|
|
1542
1559
|
params: ParamPattern[];
|
|
1543
1560
|
returnType: TSTypeAnnotation;
|
|
@@ -1545,7 +1562,7 @@ export interface TSFunctionType extends Span {
|
|
|
1545
1562
|
}
|
|
1546
1563
|
|
|
1547
1564
|
export interface TSConstructorType extends Span {
|
|
1548
|
-
type:
|
|
1565
|
+
type: "TSConstructorType";
|
|
1549
1566
|
abstract: boolean;
|
|
1550
1567
|
typeParameters: TSTypeParameterDeclaration | null;
|
|
1551
1568
|
params: ParamPattern[];
|
|
@@ -1554,9 +1571,9 @@ export interface TSConstructorType extends Span {
|
|
|
1554
1571
|
}
|
|
1555
1572
|
|
|
1556
1573
|
export interface TSMappedType extends Span {
|
|
1557
|
-
type:
|
|
1558
|
-
key: TSTypeParameter[
|
|
1559
|
-
constraint: TSTypeParameter[
|
|
1574
|
+
type: "TSMappedType";
|
|
1575
|
+
key: TSTypeParameter["name"];
|
|
1576
|
+
constraint: TSTypeParameter["constraint"];
|
|
1560
1577
|
nameType: TSType | null;
|
|
1561
1578
|
typeAnnotation: TSType | null;
|
|
1562
1579
|
optional: TSMappedTypeModifierOperator | false;
|
|
@@ -1564,38 +1581,38 @@ export interface TSMappedType extends Span {
|
|
|
1564
1581
|
parent?: Node;
|
|
1565
1582
|
}
|
|
1566
1583
|
|
|
1567
|
-
export type TSMappedTypeModifierOperator = true |
|
|
1584
|
+
export type TSMappedTypeModifierOperator = true | "+" | "-";
|
|
1568
1585
|
|
|
1569
1586
|
export interface TSTemplateLiteralType extends Span {
|
|
1570
|
-
type:
|
|
1587
|
+
type: "TSTemplateLiteralType";
|
|
1571
1588
|
quasis: Array<TemplateElement>;
|
|
1572
1589
|
types: Array<TSType>;
|
|
1573
1590
|
parent?: Node;
|
|
1574
1591
|
}
|
|
1575
1592
|
|
|
1576
1593
|
export interface TSAsExpression extends Span {
|
|
1577
|
-
type:
|
|
1594
|
+
type: "TSAsExpression";
|
|
1578
1595
|
expression: Expression;
|
|
1579
1596
|
typeAnnotation: TSType;
|
|
1580
1597
|
parent?: Node;
|
|
1581
1598
|
}
|
|
1582
1599
|
|
|
1583
1600
|
export interface TSSatisfiesExpression extends Span {
|
|
1584
|
-
type:
|
|
1601
|
+
type: "TSSatisfiesExpression";
|
|
1585
1602
|
expression: Expression;
|
|
1586
1603
|
typeAnnotation: TSType;
|
|
1587
1604
|
parent?: Node;
|
|
1588
1605
|
}
|
|
1589
1606
|
|
|
1590
1607
|
export interface TSTypeAssertion extends Span {
|
|
1591
|
-
type:
|
|
1608
|
+
type: "TSTypeAssertion";
|
|
1592
1609
|
typeAnnotation: TSType;
|
|
1593
1610
|
expression: Expression;
|
|
1594
1611
|
parent?: Node;
|
|
1595
1612
|
}
|
|
1596
1613
|
|
|
1597
1614
|
export interface TSImportEqualsDeclaration extends Span {
|
|
1598
|
-
type:
|
|
1615
|
+
type: "TSImportEqualsDeclaration";
|
|
1599
1616
|
id: BindingIdentifier;
|
|
1600
1617
|
moduleReference: TSModuleReference;
|
|
1601
1618
|
importKind: ImportOrExportKind;
|
|
@@ -1605,110 +1622,110 @@ export interface TSImportEqualsDeclaration extends Span {
|
|
|
1605
1622
|
export type TSModuleReference = TSExternalModuleReference | TSTypeName;
|
|
1606
1623
|
|
|
1607
1624
|
export interface TSExternalModuleReference extends Span {
|
|
1608
|
-
type:
|
|
1625
|
+
type: "TSExternalModuleReference";
|
|
1609
1626
|
expression: StringLiteral;
|
|
1610
1627
|
parent?: Node;
|
|
1611
1628
|
}
|
|
1612
1629
|
|
|
1613
1630
|
export interface TSNonNullExpression extends Span {
|
|
1614
|
-
type:
|
|
1631
|
+
type: "TSNonNullExpression";
|
|
1615
1632
|
expression: Expression;
|
|
1616
1633
|
parent?: Node;
|
|
1617
1634
|
}
|
|
1618
1635
|
|
|
1619
1636
|
export interface Decorator extends Span {
|
|
1620
|
-
type:
|
|
1637
|
+
type: "Decorator";
|
|
1621
1638
|
expression: Expression;
|
|
1622
1639
|
parent?: Node;
|
|
1623
1640
|
}
|
|
1624
1641
|
|
|
1625
1642
|
export interface TSExportAssignment extends Span {
|
|
1626
|
-
type:
|
|
1643
|
+
type: "TSExportAssignment";
|
|
1627
1644
|
expression: Expression;
|
|
1628
1645
|
parent?: Node;
|
|
1629
1646
|
}
|
|
1630
1647
|
|
|
1631
1648
|
export interface TSNamespaceExportDeclaration extends Span {
|
|
1632
|
-
type:
|
|
1649
|
+
type: "TSNamespaceExportDeclaration";
|
|
1633
1650
|
id: IdentifierName;
|
|
1634
1651
|
parent?: Node;
|
|
1635
1652
|
}
|
|
1636
1653
|
|
|
1637
1654
|
export interface TSInstantiationExpression extends Span {
|
|
1638
|
-
type:
|
|
1655
|
+
type: "TSInstantiationExpression";
|
|
1639
1656
|
expression: Expression;
|
|
1640
1657
|
typeArguments: TSTypeParameterInstantiation;
|
|
1641
1658
|
parent?: Node;
|
|
1642
1659
|
}
|
|
1643
1660
|
|
|
1644
|
-
export type ImportOrExportKind =
|
|
1661
|
+
export type ImportOrExportKind = "value" | "type";
|
|
1645
1662
|
|
|
1646
1663
|
export interface JSDocNullableType extends Span {
|
|
1647
|
-
type:
|
|
1664
|
+
type: "TSJSDocNullableType";
|
|
1648
1665
|
typeAnnotation: TSType;
|
|
1649
1666
|
postfix: boolean;
|
|
1650
1667
|
parent?: Node;
|
|
1651
1668
|
}
|
|
1652
1669
|
|
|
1653
1670
|
export interface JSDocNonNullableType extends Span {
|
|
1654
|
-
type:
|
|
1671
|
+
type: "TSJSDocNonNullableType";
|
|
1655
1672
|
typeAnnotation: TSType;
|
|
1656
1673
|
postfix: boolean;
|
|
1657
1674
|
parent?: Node;
|
|
1658
1675
|
}
|
|
1659
1676
|
|
|
1660
1677
|
export interface JSDocUnknownType extends Span {
|
|
1661
|
-
type:
|
|
1678
|
+
type: "TSJSDocUnknownType";
|
|
1662
1679
|
parent?: Node;
|
|
1663
1680
|
}
|
|
1664
1681
|
|
|
1665
1682
|
export type AssignmentOperator =
|
|
1666
|
-
|
|
|
1667
|
-
|
|
|
1668
|
-
|
|
|
1669
|
-
|
|
|
1670
|
-
|
|
|
1671
|
-
|
|
|
1672
|
-
|
|
|
1673
|
-
|
|
|
1674
|
-
|
|
|
1675
|
-
|
|
|
1676
|
-
|
|
|
1677
|
-
|
|
|
1678
|
-
|
|
|
1679
|
-
|
|
|
1680
|
-
|
|
|
1681
|
-
|
|
|
1683
|
+
| "="
|
|
1684
|
+
| "+="
|
|
1685
|
+
| "-="
|
|
1686
|
+
| "*="
|
|
1687
|
+
| "/="
|
|
1688
|
+
| "%="
|
|
1689
|
+
| "**="
|
|
1690
|
+
| "<<="
|
|
1691
|
+
| ">>="
|
|
1692
|
+
| ">>>="
|
|
1693
|
+
| "|="
|
|
1694
|
+
| "^="
|
|
1695
|
+
| "&="
|
|
1696
|
+
| "||="
|
|
1697
|
+
| "&&="
|
|
1698
|
+
| "??=";
|
|
1682
1699
|
|
|
1683
1700
|
export type BinaryOperator =
|
|
1684
|
-
|
|
|
1685
|
-
|
|
|
1686
|
-
|
|
|
1687
|
-
|
|
|
1688
|
-
|
|
|
1689
|
-
|
|
|
1690
|
-
|
|
|
1691
|
-
|
|
|
1692
|
-
|
|
|
1693
|
-
|
|
|
1694
|
-
|
|
|
1695
|
-
|
|
|
1696
|
-
|
|
|
1697
|
-
|
|
|
1698
|
-
|
|
|
1699
|
-
|
|
|
1700
|
-
|
|
|
1701
|
-
|
|
|
1702
|
-
|
|
|
1703
|
-
|
|
|
1704
|
-
|
|
|
1705
|
-
|
|
|
1706
|
-
|
|
1707
|
-
export type LogicalOperator =
|
|
1708
|
-
|
|
1709
|
-
export type UnaryOperator =
|
|
1710
|
-
|
|
1711
|
-
export type UpdateOperator =
|
|
1701
|
+
| "=="
|
|
1702
|
+
| "!="
|
|
1703
|
+
| "==="
|
|
1704
|
+
| "!=="
|
|
1705
|
+
| "<"
|
|
1706
|
+
| "<="
|
|
1707
|
+
| ">"
|
|
1708
|
+
| ">="
|
|
1709
|
+
| "+"
|
|
1710
|
+
| "-"
|
|
1711
|
+
| "*"
|
|
1712
|
+
| "/"
|
|
1713
|
+
| "%"
|
|
1714
|
+
| "**"
|
|
1715
|
+
| "<<"
|
|
1716
|
+
| ">>"
|
|
1717
|
+
| ">>>"
|
|
1718
|
+
| "|"
|
|
1719
|
+
| "^"
|
|
1720
|
+
| "&"
|
|
1721
|
+
| "in"
|
|
1722
|
+
| "instanceof";
|
|
1723
|
+
|
|
1724
|
+
export type LogicalOperator = "||" | "&&" | "??";
|
|
1725
|
+
|
|
1726
|
+
export type UnaryOperator = "+" | "-" | "!" | "~" | "typeof" | "void" | "delete";
|
|
1727
|
+
|
|
1728
|
+
export type UpdateOperator = "++" | "--";
|
|
1712
1729
|
|
|
1713
1730
|
export interface Span {
|
|
1714
1731
|
start: number;
|
|
@@ -1716,7 +1733,7 @@ export interface Span {
|
|
|
1716
1733
|
range?: [number, number];
|
|
1717
1734
|
}
|
|
1718
1735
|
|
|
1719
|
-
export type ModuleKind =
|
|
1736
|
+
export type ModuleKind = "script" | "module";
|
|
1720
1737
|
|
|
1721
1738
|
export type Node =
|
|
1722
1739
|
| Program
|