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