@rolldown/browser 1.0.0-beta.9-commit.0ec9e7d → 1.0.0-rc.2

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 (73) hide show
  1. package/dist/cli-setup.mjs +16 -0
  2. package/dist/cli.mjs +1084 -1281
  3. package/dist/config.d.mts +1 -3
  4. package/dist/config.mjs +7 -5
  5. package/dist/constructors-B8gqcrFr.js +61 -0
  6. package/dist/experimental-index.browser.mjs +225 -50
  7. package/dist/experimental-index.d.mts +164 -76
  8. package/dist/experimental-index.mjs +220 -60
  9. package/dist/experimental-runtime-types.d.ts +98 -0
  10. package/dist/filter-index.d.mts +104 -2
  11. package/dist/filter-index.mjs +123 -3
  12. package/dist/get-log-filter.d.mts +7 -0
  13. package/dist/get-log-filter.mjs +48 -0
  14. package/dist/index.browser.mjs +242 -2
  15. package/dist/index.d.mts +4 -3
  16. package/dist/index.mjs +54 -5
  17. package/dist/{shared/parse-ast-index-BHaE0ECV.cjs → normalize-string-or-regex-CL-PJZI7.js} +70 -137
  18. package/dist/parallel-plugin-worker.mjs +26 -33
  19. package/dist/parallel-plugin.d.mts +7 -7
  20. package/dist/parse-ast-index.d.mts +5 -6
  21. package/dist/parse-ast-index.mjs +1 -2
  22. package/dist/plugins-index.browser.mjs +39 -0
  23. package/dist/plugins-index.d.mts +30 -0
  24. package/dist/plugins-index.mjs +39 -0
  25. package/dist/rolldown-binding.wasi-browser.js +41 -24
  26. package/dist/rolldown-binding.wasi.cjs +62 -24
  27. package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
  28. package/dist/rolldown-build-BntP6Bjl.js +5063 -0
  29. package/dist/shared/bindingify-input-options-CObJx_Uj.mjs +2236 -0
  30. package/dist/shared/composable-filters-CIxSuZSM.mjs +227 -0
  31. package/dist/shared/constructors-5bt5oBhE.d.mts +28 -0
  32. package/dist/shared/constructors-BTW-c3jX.mjs +61 -0
  33. package/dist/shared/define-config-C-sO_cLw.d.mts +3679 -0
  34. package/dist/shared/define-config-Dlptvz3X.mjs +7 -0
  35. package/dist/shared/{load-config-D7UduHRZ.mjs → load-config-hx3WBhLe.mjs} +23 -33
  36. package/dist/shared/logging-RB67zQ4N.d.mts +50 -0
  37. package/dist/shared/{parse-ast-index-vu376yZ1.mjs → logs-B2CASPcx.mjs} +21 -116
  38. package/dist/shared/normalize-string-or-regex-DIwprzLy.mjs +60 -0
  39. package/dist/shared/parse-ast-index-BQpfNG1v.mjs +98 -0
  40. package/dist/shared/{prompt-CxjDC0Gn.cjs → prompt-CYPmuhh-.mjs} +301 -308
  41. package/dist/shared/rolldown-D2E0YTeB.mjs +42 -0
  42. package/dist/shared/rolldown-build-Do6WlRGM.mjs +2371 -0
  43. package/dist/shared/types-CIhJMr1h.d.mts +1300 -0
  44. package/dist/shared/utils-CqMTwlsR.d.mts +22 -0
  45. package/dist/shared/watch-BsneBCNP.mjs +378 -0
  46. package/package.json +33 -38
  47. package/dist/cli.cjs +0 -1748
  48. package/dist/config.cjs +0 -12
  49. package/dist/config.d.cts +0 -11
  50. package/dist/experimental-index.cjs +0 -129
  51. package/dist/experimental-index.d.cts +0 -96
  52. package/dist/filter-index.cjs +0 -53
  53. package/dist/filter-index.d.cts +0 -3
  54. package/dist/index.cjs +0 -9
  55. package/dist/index.d.cts +0 -3
  56. package/dist/parallel-plugin-worker.cjs +0 -33
  57. package/dist/parallel-plugin-worker.d.cts +0 -1
  58. package/dist/parallel-plugin.cjs +0 -8
  59. package/dist/parallel-plugin.d.cts +0 -14
  60. package/dist/parse-ast-index.cjs +0 -4
  61. package/dist/parse-ast-index.d.cts +0 -9
  62. package/dist/shared/chunk-DDkG_k5U.cjs +0 -39
  63. package/dist/shared/chunk-DSsiIF1Z.mjs +0 -30
  64. package/dist/shared/define-config.d-D4lKXE9V.d.cts +0 -1165
  65. package/dist/shared/define-config.d-Dm9iNdt9.d.mts +0 -1165
  66. package/dist/shared/dist-BMVjvV-v.cjs +0 -249
  67. package/dist/shared/dist-CAn6dxW6.mjs +0 -153
  68. package/dist/shared/load-config-CtKjQ8Mn.cjs +0 -125
  69. package/dist/shared/prompt-GFYxfPw7.mjs +0 -854
  70. package/dist/shared/src-D0nc44MQ.mjs +0 -4691
  71. package/dist/shared/src-s89s870G.cjs +0 -4647
  72. package/dist/src-CeWghjQt.js +0 -4329
  73. /package/dist/{cli.d.cts → cli-setup.d.mts} +0 -0
@@ -0,0 +1,1300 @@
1
+ //#region ../../node_modules/.pnpm/@oxc-project+types@0.111.0/node_modules/@oxc-project/types/types.d.ts
2
+ // Auto-generated code, DO NOT EDIT DIRECTLY!
3
+ // To edit this generated file you have to edit `tasks/ast_tools/src/generators/typescript.rs`.
4
+ interface Program extends Span {
5
+ type: "Program";
6
+ body: Array<Directive | Statement>;
7
+ sourceType: ModuleKind;
8
+ hashbang: Hashbang | null;
9
+ parent?: null;
10
+ }
11
+ type Expression = BooleanLiteral | NullLiteral | NumericLiteral | BigIntLiteral | RegExpLiteral | StringLiteral | TemplateLiteral | IdentifierReference | MetaProperty | Super | ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | CallExpression | ChainExpression | Class | ConditionalExpression | Function | ImportExpression | LogicalExpression | NewExpression | ObjectExpression | ParenthesizedExpression | SequenceExpression | TaggedTemplateExpression | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression | PrivateInExpression | JSXElement | JSXFragment | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression | TSInstantiationExpression | V8IntrinsicExpression | MemberExpression;
12
+ interface IdentifierName extends Span {
13
+ type: "Identifier";
14
+ decorators?: [];
15
+ name: string;
16
+ optional?: false;
17
+ typeAnnotation?: null;
18
+ parent?: Node;
19
+ }
20
+ interface IdentifierReference extends Span {
21
+ type: "Identifier";
22
+ decorators?: [];
23
+ name: string;
24
+ optional?: false;
25
+ typeAnnotation?: null;
26
+ parent?: Node;
27
+ }
28
+ interface BindingIdentifier extends Span {
29
+ type: "Identifier";
30
+ decorators?: [];
31
+ name: string;
32
+ optional?: false;
33
+ typeAnnotation?: null;
34
+ parent?: Node;
35
+ }
36
+ interface LabelIdentifier extends Span {
37
+ type: "Identifier";
38
+ decorators?: [];
39
+ name: string;
40
+ optional?: false;
41
+ typeAnnotation?: null;
42
+ parent?: Node;
43
+ }
44
+ interface ThisExpression extends Span {
45
+ type: "ThisExpression";
46
+ parent?: Node;
47
+ }
48
+ interface ArrayExpression extends Span {
49
+ type: "ArrayExpression";
50
+ elements: Array<ArrayExpressionElement>;
51
+ parent?: Node;
52
+ }
53
+ type ArrayExpressionElement = SpreadElement | null | Expression;
54
+ interface ObjectExpression extends Span {
55
+ type: "ObjectExpression";
56
+ properties: Array<ObjectPropertyKind>;
57
+ parent?: Node;
58
+ }
59
+ type ObjectPropertyKind = ObjectProperty | SpreadElement;
60
+ interface ObjectProperty extends Span {
61
+ type: "Property";
62
+ kind: PropertyKind;
63
+ key: PropertyKey;
64
+ value: Expression;
65
+ method: boolean;
66
+ shorthand: boolean;
67
+ computed: boolean;
68
+ optional?: false;
69
+ parent?: Node;
70
+ }
71
+ type PropertyKey = IdentifierName | PrivateIdentifier | Expression;
72
+ type PropertyKind = "init" | "get" | "set";
73
+ interface TemplateLiteral extends Span {
74
+ type: "TemplateLiteral";
75
+ quasis: Array<TemplateElement>;
76
+ expressions: Array<Expression>;
77
+ parent?: Node;
78
+ }
79
+ interface TaggedTemplateExpression extends Span {
80
+ type: "TaggedTemplateExpression";
81
+ tag: Expression;
82
+ typeArguments?: TSTypeParameterInstantiation | null;
83
+ quasi: TemplateLiteral;
84
+ parent?: Node;
85
+ }
86
+ interface TemplateElement extends Span {
87
+ type: "TemplateElement";
88
+ value: TemplateElementValue;
89
+ tail: boolean;
90
+ parent?: Node;
91
+ }
92
+ interface TemplateElementValue {
93
+ raw: string;
94
+ cooked: string | null;
95
+ }
96
+ type MemberExpression = ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression;
97
+ interface ComputedMemberExpression extends Span {
98
+ type: "MemberExpression";
99
+ object: Expression;
100
+ property: Expression;
101
+ optional: boolean;
102
+ computed: true;
103
+ parent?: Node;
104
+ }
105
+ interface StaticMemberExpression extends Span {
106
+ type: "MemberExpression";
107
+ object: Expression;
108
+ property: IdentifierName;
109
+ optional: boolean;
110
+ computed: false;
111
+ parent?: Node;
112
+ }
113
+ interface PrivateFieldExpression extends Span {
114
+ type: "MemberExpression";
115
+ object: Expression;
116
+ property: PrivateIdentifier;
117
+ optional: boolean;
118
+ computed: false;
119
+ parent?: Node;
120
+ }
121
+ interface CallExpression extends Span {
122
+ type: "CallExpression";
123
+ callee: Expression;
124
+ typeArguments?: TSTypeParameterInstantiation | null;
125
+ arguments: Array<Argument>;
126
+ optional: boolean;
127
+ parent?: Node;
128
+ }
129
+ interface NewExpression extends Span {
130
+ type: "NewExpression";
131
+ callee: Expression;
132
+ typeArguments?: TSTypeParameterInstantiation | null;
133
+ arguments: Array<Argument>;
134
+ parent?: Node;
135
+ }
136
+ interface MetaProperty extends Span {
137
+ type: "MetaProperty";
138
+ meta: IdentifierName;
139
+ property: IdentifierName;
140
+ parent?: Node;
141
+ }
142
+ interface SpreadElement extends Span {
143
+ type: "SpreadElement";
144
+ argument: Expression;
145
+ parent?: Node;
146
+ }
147
+ type Argument = SpreadElement | Expression;
148
+ interface UpdateExpression extends Span {
149
+ type: "UpdateExpression";
150
+ operator: UpdateOperator;
151
+ prefix: boolean;
152
+ argument: SimpleAssignmentTarget;
153
+ parent?: Node;
154
+ }
155
+ interface UnaryExpression extends Span {
156
+ type: "UnaryExpression";
157
+ operator: UnaryOperator;
158
+ argument: Expression;
159
+ prefix: true;
160
+ parent?: Node;
161
+ }
162
+ interface BinaryExpression extends Span {
163
+ type: "BinaryExpression";
164
+ left: Expression;
165
+ operator: BinaryOperator;
166
+ right: Expression;
167
+ parent?: Node;
168
+ }
169
+ interface PrivateInExpression extends Span {
170
+ type: "BinaryExpression";
171
+ left: PrivateIdentifier;
172
+ operator: "in";
173
+ right: Expression;
174
+ parent?: Node;
175
+ }
176
+ interface LogicalExpression extends Span {
177
+ type: "LogicalExpression";
178
+ left: Expression;
179
+ operator: LogicalOperator;
180
+ right: Expression;
181
+ parent?: Node;
182
+ }
183
+ interface ConditionalExpression extends Span {
184
+ type: "ConditionalExpression";
185
+ test: Expression;
186
+ consequent: Expression;
187
+ alternate: Expression;
188
+ parent?: Node;
189
+ }
190
+ interface AssignmentExpression extends Span {
191
+ type: "AssignmentExpression";
192
+ operator: AssignmentOperator;
193
+ left: AssignmentTarget;
194
+ right: Expression;
195
+ parent?: Node;
196
+ }
197
+ type AssignmentTarget = SimpleAssignmentTarget | AssignmentTargetPattern;
198
+ type SimpleAssignmentTarget = IdentifierReference | TSAsExpression | TSSatisfiesExpression | TSNonNullExpression | TSTypeAssertion | MemberExpression;
199
+ type AssignmentTargetPattern = ArrayAssignmentTarget | ObjectAssignmentTarget;
200
+ interface ArrayAssignmentTarget extends Span {
201
+ type: "ArrayPattern";
202
+ decorators?: [];
203
+ elements: Array<AssignmentTargetMaybeDefault | AssignmentTargetRest | null>;
204
+ optional?: false;
205
+ typeAnnotation?: null;
206
+ parent?: Node;
207
+ }
208
+ interface ObjectAssignmentTarget extends Span {
209
+ type: "ObjectPattern";
210
+ decorators?: [];
211
+ properties: Array<AssignmentTargetProperty | AssignmentTargetRest>;
212
+ optional?: false;
213
+ typeAnnotation?: null;
214
+ parent?: Node;
215
+ }
216
+ interface AssignmentTargetRest extends Span {
217
+ type: "RestElement";
218
+ decorators?: [];
219
+ argument: AssignmentTarget;
220
+ optional?: false;
221
+ typeAnnotation?: null;
222
+ value?: null;
223
+ parent?: Node;
224
+ }
225
+ type AssignmentTargetMaybeDefault = AssignmentTargetWithDefault | AssignmentTarget;
226
+ interface AssignmentTargetWithDefault extends Span {
227
+ type: "AssignmentPattern";
228
+ decorators?: [];
229
+ left: AssignmentTarget;
230
+ right: Expression;
231
+ optional?: false;
232
+ typeAnnotation?: null;
233
+ parent?: Node;
234
+ }
235
+ type AssignmentTargetProperty = AssignmentTargetPropertyIdentifier | AssignmentTargetPropertyProperty;
236
+ interface AssignmentTargetPropertyIdentifier extends Span {
237
+ type: "Property";
238
+ kind: "init";
239
+ key: IdentifierReference;
240
+ value: IdentifierReference | AssignmentTargetWithDefault;
241
+ method: false;
242
+ shorthand: true;
243
+ computed: false;
244
+ optional?: false;
245
+ parent?: Node;
246
+ }
247
+ interface AssignmentTargetPropertyProperty extends Span {
248
+ type: "Property";
249
+ kind: "init";
250
+ key: PropertyKey;
251
+ value: AssignmentTargetMaybeDefault;
252
+ method: false;
253
+ shorthand: false;
254
+ computed: boolean;
255
+ optional?: false;
256
+ parent?: Node;
257
+ }
258
+ interface SequenceExpression extends Span {
259
+ type: "SequenceExpression";
260
+ expressions: Array<Expression>;
261
+ parent?: Node;
262
+ }
263
+ interface Super extends Span {
264
+ type: "Super";
265
+ parent?: Node;
266
+ }
267
+ interface AwaitExpression extends Span {
268
+ type: "AwaitExpression";
269
+ argument: Expression;
270
+ parent?: Node;
271
+ }
272
+ interface ChainExpression extends Span {
273
+ type: "ChainExpression";
274
+ expression: ChainElement;
275
+ parent?: Node;
276
+ }
277
+ type ChainElement = CallExpression | TSNonNullExpression | MemberExpression;
278
+ interface ParenthesizedExpression extends Span {
279
+ type: "ParenthesizedExpression";
280
+ expression: Expression;
281
+ parent?: Node;
282
+ }
283
+ type Statement = BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | WithStatement | Declaration | ModuleDeclaration;
284
+ interface Directive extends Span {
285
+ type: "ExpressionStatement";
286
+ expression: StringLiteral;
287
+ directive: string;
288
+ parent?: Node;
289
+ }
290
+ interface Hashbang extends Span {
291
+ type: "Hashbang";
292
+ value: string;
293
+ parent?: Node;
294
+ }
295
+ interface BlockStatement extends Span {
296
+ type: "BlockStatement";
297
+ body: Array<Statement>;
298
+ parent?: Node;
299
+ }
300
+ type Declaration = VariableDeclaration | Function | Class | TSTypeAliasDeclaration | TSInterfaceDeclaration | TSEnumDeclaration | TSModuleDeclaration | TSGlobalDeclaration | TSImportEqualsDeclaration;
301
+ interface VariableDeclaration extends Span {
302
+ type: "VariableDeclaration";
303
+ kind: VariableDeclarationKind;
304
+ declarations: Array<VariableDeclarator>;
305
+ declare?: boolean;
306
+ parent?: Node;
307
+ }
308
+ type VariableDeclarationKind = "var" | "let" | "const" | "using" | "await using";
309
+ interface VariableDeclarator extends Span {
310
+ type: "VariableDeclarator";
311
+ id: BindingPattern;
312
+ init: Expression | null;
313
+ definite?: boolean;
314
+ parent?: Node;
315
+ }
316
+ interface EmptyStatement extends Span {
317
+ type: "EmptyStatement";
318
+ parent?: Node;
319
+ }
320
+ interface ExpressionStatement extends Span {
321
+ type: "ExpressionStatement";
322
+ expression: Expression;
323
+ directive?: string | null;
324
+ parent?: Node;
325
+ }
326
+ interface IfStatement extends Span {
327
+ type: "IfStatement";
328
+ test: Expression;
329
+ consequent: Statement;
330
+ alternate: Statement | null;
331
+ parent?: Node;
332
+ }
333
+ interface DoWhileStatement extends Span {
334
+ type: "DoWhileStatement";
335
+ body: Statement;
336
+ test: Expression;
337
+ parent?: Node;
338
+ }
339
+ interface WhileStatement extends Span {
340
+ type: "WhileStatement";
341
+ test: Expression;
342
+ body: Statement;
343
+ parent?: Node;
344
+ }
345
+ interface ForStatement extends Span {
346
+ type: "ForStatement";
347
+ init: ForStatementInit | null;
348
+ test: Expression | null;
349
+ update: Expression | null;
350
+ body: Statement;
351
+ parent?: Node;
352
+ }
353
+ type ForStatementInit = VariableDeclaration | Expression;
354
+ interface ForInStatement extends Span {
355
+ type: "ForInStatement";
356
+ left: ForStatementLeft;
357
+ right: Expression;
358
+ body: Statement;
359
+ parent?: Node;
360
+ }
361
+ type ForStatementLeft = VariableDeclaration | AssignmentTarget;
362
+ interface ForOfStatement extends Span {
363
+ type: "ForOfStatement";
364
+ await: boolean;
365
+ left: ForStatementLeft;
366
+ right: Expression;
367
+ body: Statement;
368
+ parent?: Node;
369
+ }
370
+ interface ContinueStatement extends Span {
371
+ type: "ContinueStatement";
372
+ label: LabelIdentifier | null;
373
+ parent?: Node;
374
+ }
375
+ interface BreakStatement extends Span {
376
+ type: "BreakStatement";
377
+ label: LabelIdentifier | null;
378
+ parent?: Node;
379
+ }
380
+ interface ReturnStatement extends Span {
381
+ type: "ReturnStatement";
382
+ argument: Expression | null;
383
+ parent?: Node;
384
+ }
385
+ interface WithStatement extends Span {
386
+ type: "WithStatement";
387
+ object: Expression;
388
+ body: Statement;
389
+ parent?: Node;
390
+ }
391
+ interface SwitchStatement extends Span {
392
+ type: "SwitchStatement";
393
+ discriminant: Expression;
394
+ cases: Array<SwitchCase>;
395
+ parent?: Node;
396
+ }
397
+ interface SwitchCase extends Span {
398
+ type: "SwitchCase";
399
+ test: Expression | null;
400
+ consequent: Array<Statement>;
401
+ parent?: Node;
402
+ }
403
+ interface LabeledStatement extends Span {
404
+ type: "LabeledStatement";
405
+ label: LabelIdentifier;
406
+ body: Statement;
407
+ parent?: Node;
408
+ }
409
+ interface ThrowStatement extends Span {
410
+ type: "ThrowStatement";
411
+ argument: Expression;
412
+ parent?: Node;
413
+ }
414
+ interface TryStatement extends Span {
415
+ type: "TryStatement";
416
+ block: BlockStatement;
417
+ handler: CatchClause | null;
418
+ finalizer: BlockStatement | null;
419
+ parent?: Node;
420
+ }
421
+ interface CatchClause extends Span {
422
+ type: "CatchClause";
423
+ param: BindingPattern | null;
424
+ body: BlockStatement;
425
+ parent?: Node;
426
+ }
427
+ interface DebuggerStatement extends Span {
428
+ type: "DebuggerStatement";
429
+ parent?: Node;
430
+ }
431
+ type BindingPattern = BindingIdentifier | ObjectPattern | ArrayPattern | AssignmentPattern;
432
+ interface AssignmentPattern extends Span {
433
+ type: "AssignmentPattern";
434
+ decorators?: [];
435
+ left: BindingPattern;
436
+ right: Expression;
437
+ optional?: false;
438
+ typeAnnotation?: null;
439
+ parent?: Node;
440
+ }
441
+ interface ObjectPattern extends Span {
442
+ type: "ObjectPattern";
443
+ decorators?: [];
444
+ properties: Array<BindingProperty | BindingRestElement>;
445
+ optional?: false;
446
+ typeAnnotation?: null;
447
+ parent?: Node;
448
+ }
449
+ interface BindingProperty extends Span {
450
+ type: "Property";
451
+ kind: "init";
452
+ key: PropertyKey;
453
+ value: BindingPattern;
454
+ method: false;
455
+ shorthand: boolean;
456
+ computed: boolean;
457
+ optional?: false;
458
+ parent?: Node;
459
+ }
460
+ interface ArrayPattern extends Span {
461
+ type: "ArrayPattern";
462
+ decorators?: [];
463
+ elements: Array<BindingPattern | BindingRestElement | null>;
464
+ optional?: false;
465
+ typeAnnotation?: null;
466
+ parent?: Node;
467
+ }
468
+ interface BindingRestElement extends Span {
469
+ type: "RestElement";
470
+ decorators?: [];
471
+ argument: BindingPattern;
472
+ optional?: false;
473
+ typeAnnotation?: null;
474
+ value?: null;
475
+ parent?: Node;
476
+ }
477
+ interface Function extends Span {
478
+ type: FunctionType;
479
+ id: BindingIdentifier | null;
480
+ generator: boolean;
481
+ async: boolean;
482
+ declare?: boolean;
483
+ typeParameters?: TSTypeParameterDeclaration | null;
484
+ params: ParamPattern[];
485
+ returnType?: TSTypeAnnotation | null;
486
+ body: FunctionBody | null;
487
+ expression: false;
488
+ parent?: Node;
489
+ }
490
+ type ParamPattern = FormalParameter | TSParameterProperty | FormalParameterRest;
491
+ type FunctionType = "FunctionDeclaration" | "FunctionExpression" | "TSDeclareFunction" | "TSEmptyBodyFunctionExpression";
492
+ interface FormalParameterRest extends Span {
493
+ type: "RestElement";
494
+ argument: BindingPattern;
495
+ decorators?: [];
496
+ optional?: boolean;
497
+ typeAnnotation?: TSTypeAnnotation | null;
498
+ value?: null;
499
+ parent?: Node;
500
+ }
501
+ type FormalParameter = {
502
+ decorators?: Array<Decorator>;
503
+ } & BindingPattern;
504
+ interface TSParameterProperty extends Span {
505
+ type: "TSParameterProperty";
506
+ accessibility: TSAccessibility | null;
507
+ decorators: Array<Decorator>;
508
+ override: boolean;
509
+ parameter: FormalParameter;
510
+ readonly: boolean;
511
+ static: boolean;
512
+ parent?: Node;
513
+ }
514
+ interface FunctionBody extends Span {
515
+ type: "BlockStatement";
516
+ body: Array<Directive | Statement>;
517
+ parent?: Node;
518
+ }
519
+ interface ArrowFunctionExpression extends Span {
520
+ type: "ArrowFunctionExpression";
521
+ expression: boolean;
522
+ async: boolean;
523
+ typeParameters?: TSTypeParameterDeclaration | null;
524
+ params: ParamPattern[];
525
+ returnType?: TSTypeAnnotation | null;
526
+ body: FunctionBody | Expression;
527
+ id: null;
528
+ generator: false;
529
+ parent?: Node;
530
+ }
531
+ interface YieldExpression extends Span {
532
+ type: "YieldExpression";
533
+ delegate: boolean;
534
+ argument: Expression | null;
535
+ parent?: Node;
536
+ }
537
+ interface Class extends Span {
538
+ type: ClassType;
539
+ decorators: Array<Decorator>;
540
+ id: BindingIdentifier | null;
541
+ typeParameters?: TSTypeParameterDeclaration | null;
542
+ superClass: Expression | null;
543
+ superTypeArguments?: TSTypeParameterInstantiation | null;
544
+ implements?: Array<TSClassImplements>;
545
+ body: ClassBody;
546
+ abstract?: boolean;
547
+ declare?: boolean;
548
+ parent?: Node;
549
+ }
550
+ type ClassType = "ClassDeclaration" | "ClassExpression";
551
+ interface ClassBody extends Span {
552
+ type: "ClassBody";
553
+ body: Array<ClassElement>;
554
+ parent?: Node;
555
+ }
556
+ type ClassElement = StaticBlock | MethodDefinition | PropertyDefinition | AccessorProperty | TSIndexSignature;
557
+ interface MethodDefinition extends Span {
558
+ type: MethodDefinitionType;
559
+ decorators: Array<Decorator>;
560
+ key: PropertyKey;
561
+ value: Function;
562
+ kind: MethodDefinitionKind;
563
+ computed: boolean;
564
+ static: boolean;
565
+ override?: boolean;
566
+ optional?: boolean;
567
+ accessibility?: TSAccessibility | null;
568
+ parent?: Node;
569
+ }
570
+ type MethodDefinitionType = "MethodDefinition" | "TSAbstractMethodDefinition";
571
+ interface PropertyDefinition extends Span {
572
+ type: PropertyDefinitionType;
573
+ decorators: Array<Decorator>;
574
+ key: PropertyKey;
575
+ typeAnnotation?: TSTypeAnnotation | null;
576
+ value: Expression | null;
577
+ computed: boolean;
578
+ static: boolean;
579
+ declare?: boolean;
580
+ override?: boolean;
581
+ optional?: boolean;
582
+ definite?: boolean;
583
+ readonly?: boolean;
584
+ accessibility?: TSAccessibility | null;
585
+ parent?: Node;
586
+ }
587
+ type PropertyDefinitionType = "PropertyDefinition" | "TSAbstractPropertyDefinition";
588
+ type MethodDefinitionKind = "constructor" | "method" | "get" | "set";
589
+ interface PrivateIdentifier extends Span {
590
+ type: "PrivateIdentifier";
591
+ name: string;
592
+ parent?: Node;
593
+ }
594
+ interface StaticBlock extends Span {
595
+ type: "StaticBlock";
596
+ body: Array<Statement>;
597
+ parent?: Node;
598
+ }
599
+ type ModuleDeclaration = ImportDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | TSExportAssignment | TSNamespaceExportDeclaration;
600
+ type AccessorPropertyType = "AccessorProperty" | "TSAbstractAccessorProperty";
601
+ interface AccessorProperty extends Span {
602
+ type: AccessorPropertyType;
603
+ decorators: Array<Decorator>;
604
+ key: PropertyKey;
605
+ typeAnnotation?: TSTypeAnnotation | null;
606
+ value: Expression | null;
607
+ computed: boolean;
608
+ static: boolean;
609
+ override?: boolean;
610
+ definite?: boolean;
611
+ accessibility?: TSAccessibility | null;
612
+ declare?: false;
613
+ optional?: false;
614
+ readonly?: false;
615
+ parent?: Node;
616
+ }
617
+ interface ImportExpression extends Span {
618
+ type: "ImportExpression";
619
+ source: Expression;
620
+ options: Expression | null;
621
+ phase: ImportPhase | null;
622
+ parent?: Node;
623
+ }
624
+ interface ImportDeclaration extends Span {
625
+ type: "ImportDeclaration";
626
+ specifiers: Array<ImportDeclarationSpecifier>;
627
+ source: StringLiteral;
628
+ phase: ImportPhase | null;
629
+ attributes: Array<ImportAttribute>;
630
+ importKind?: ImportOrExportKind;
631
+ parent?: Node;
632
+ }
633
+ type ImportPhase = "source" | "defer";
634
+ type ImportDeclarationSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier;
635
+ interface ImportSpecifier extends Span {
636
+ type: "ImportSpecifier";
637
+ imported: ModuleExportName;
638
+ local: BindingIdentifier;
639
+ importKind?: ImportOrExportKind;
640
+ parent?: Node;
641
+ }
642
+ interface ImportDefaultSpecifier extends Span {
643
+ type: "ImportDefaultSpecifier";
644
+ local: BindingIdentifier;
645
+ parent?: Node;
646
+ }
647
+ interface ImportNamespaceSpecifier extends Span {
648
+ type: "ImportNamespaceSpecifier";
649
+ local: BindingIdentifier;
650
+ parent?: Node;
651
+ }
652
+ interface ImportAttribute extends Span {
653
+ type: "ImportAttribute";
654
+ key: ImportAttributeKey;
655
+ value: StringLiteral;
656
+ parent?: Node;
657
+ }
658
+ type ImportAttributeKey = IdentifierName | StringLiteral;
659
+ interface ExportNamedDeclaration extends Span {
660
+ type: "ExportNamedDeclaration";
661
+ declaration: Declaration | null;
662
+ specifiers: Array<ExportSpecifier>;
663
+ source: StringLiteral | null;
664
+ exportKind?: ImportOrExportKind;
665
+ attributes: Array<ImportAttribute>;
666
+ parent?: Node;
667
+ }
668
+ interface ExportDefaultDeclaration extends Span {
669
+ type: "ExportDefaultDeclaration";
670
+ declaration: ExportDefaultDeclarationKind;
671
+ exportKind?: "value";
672
+ parent?: Node;
673
+ }
674
+ interface ExportAllDeclaration extends Span {
675
+ type: "ExportAllDeclaration";
676
+ exported: ModuleExportName | null;
677
+ source: StringLiteral;
678
+ attributes: Array<ImportAttribute>;
679
+ exportKind?: ImportOrExportKind;
680
+ parent?: Node;
681
+ }
682
+ interface ExportSpecifier extends Span {
683
+ type: "ExportSpecifier";
684
+ local: ModuleExportName;
685
+ exported: ModuleExportName;
686
+ exportKind?: ImportOrExportKind;
687
+ parent?: Node;
688
+ }
689
+ type ExportDefaultDeclarationKind = Function | Class | TSInterfaceDeclaration | Expression;
690
+ type ModuleExportName = IdentifierName | IdentifierReference | StringLiteral;
691
+ interface V8IntrinsicExpression extends Span {
692
+ type: "V8IntrinsicExpression";
693
+ name: IdentifierName;
694
+ arguments: Array<Argument>;
695
+ parent?: Node;
696
+ }
697
+ interface BooleanLiteral extends Span {
698
+ type: "Literal";
699
+ value: boolean;
700
+ raw: string | null;
701
+ parent?: Node;
702
+ }
703
+ interface NullLiteral extends Span {
704
+ type: "Literal";
705
+ value: null;
706
+ raw: "null" | null;
707
+ parent?: Node;
708
+ }
709
+ interface NumericLiteral extends Span {
710
+ type: "Literal";
711
+ value: number;
712
+ raw: string | null;
713
+ parent?: Node;
714
+ }
715
+ interface StringLiteral extends Span {
716
+ type: "Literal";
717
+ value: string;
718
+ raw: string | null;
719
+ parent?: Node;
720
+ }
721
+ interface BigIntLiteral extends Span {
722
+ type: "Literal";
723
+ value: bigint;
724
+ raw: string | null;
725
+ bigint: string;
726
+ parent?: Node;
727
+ }
728
+ interface RegExpLiteral extends Span {
729
+ type: "Literal";
730
+ value: RegExp | null;
731
+ raw: string | null;
732
+ regex: {
733
+ pattern: string;
734
+ flags: string;
735
+ };
736
+ parent?: Node;
737
+ }
738
+ interface JSXElement extends Span {
739
+ type: "JSXElement";
740
+ openingElement: JSXOpeningElement;
741
+ children: Array<JSXChild>;
742
+ closingElement: JSXClosingElement | null;
743
+ parent?: Node;
744
+ }
745
+ interface JSXOpeningElement extends Span {
746
+ type: "JSXOpeningElement";
747
+ name: JSXElementName;
748
+ typeArguments?: TSTypeParameterInstantiation | null;
749
+ attributes: Array<JSXAttributeItem>;
750
+ selfClosing: boolean;
751
+ parent?: Node;
752
+ }
753
+ interface JSXClosingElement extends Span {
754
+ type: "JSXClosingElement";
755
+ name: JSXElementName;
756
+ parent?: Node;
757
+ }
758
+ interface JSXFragment extends Span {
759
+ type: "JSXFragment";
760
+ openingFragment: JSXOpeningFragment;
761
+ children: Array<JSXChild>;
762
+ closingFragment: JSXClosingFragment;
763
+ parent?: Node;
764
+ }
765
+ interface JSXOpeningFragment extends Span {
766
+ type: "JSXOpeningFragment";
767
+ attributes?: [];
768
+ selfClosing?: false;
769
+ parent?: Node;
770
+ }
771
+ interface JSXClosingFragment extends Span {
772
+ type: "JSXClosingFragment";
773
+ parent?: Node;
774
+ }
775
+ type JSXElementName = JSXIdentifier | JSXNamespacedName | JSXMemberExpression;
776
+ interface JSXNamespacedName extends Span {
777
+ type: "JSXNamespacedName";
778
+ namespace: JSXIdentifier;
779
+ name: JSXIdentifier;
780
+ parent?: Node;
781
+ }
782
+ interface JSXMemberExpression extends Span {
783
+ type: "JSXMemberExpression";
784
+ object: JSXMemberExpressionObject;
785
+ property: JSXIdentifier;
786
+ parent?: Node;
787
+ }
788
+ type JSXMemberExpressionObject = JSXIdentifier | JSXMemberExpression;
789
+ interface JSXExpressionContainer extends Span {
790
+ type: "JSXExpressionContainer";
791
+ expression: JSXExpression;
792
+ parent?: Node;
793
+ }
794
+ type JSXExpression = JSXEmptyExpression | Expression;
795
+ interface JSXEmptyExpression extends Span {
796
+ type: "JSXEmptyExpression";
797
+ parent?: Node;
798
+ }
799
+ type JSXAttributeItem = JSXAttribute | JSXSpreadAttribute;
800
+ interface JSXAttribute extends Span {
801
+ type: "JSXAttribute";
802
+ name: JSXAttributeName;
803
+ value: JSXAttributeValue | null;
804
+ parent?: Node;
805
+ }
806
+ interface JSXSpreadAttribute extends Span {
807
+ type: "JSXSpreadAttribute";
808
+ argument: Expression;
809
+ parent?: Node;
810
+ }
811
+ type JSXAttributeName = JSXIdentifier | JSXNamespacedName;
812
+ type JSXAttributeValue = StringLiteral | JSXExpressionContainer | JSXElement | JSXFragment;
813
+ interface JSXIdentifier extends Span {
814
+ type: "JSXIdentifier";
815
+ name: string;
816
+ parent?: Node;
817
+ }
818
+ type JSXChild = JSXText | JSXElement | JSXFragment | JSXExpressionContainer | JSXSpreadChild;
819
+ interface JSXSpreadChild extends Span {
820
+ type: "JSXSpreadChild";
821
+ expression: Expression;
822
+ parent?: Node;
823
+ }
824
+ interface JSXText extends Span {
825
+ type: "JSXText";
826
+ value: string;
827
+ raw: string | null;
828
+ parent?: Node;
829
+ }
830
+ interface TSThisParameter extends Span {
831
+ type: "Identifier";
832
+ decorators: [];
833
+ name: "this";
834
+ optional: false;
835
+ typeAnnotation: TSTypeAnnotation | null;
836
+ parent?: Node;
837
+ }
838
+ interface TSEnumDeclaration extends Span {
839
+ type: "TSEnumDeclaration";
840
+ id: BindingIdentifier;
841
+ body: TSEnumBody;
842
+ const: boolean;
843
+ declare: boolean;
844
+ parent?: Node;
845
+ }
846
+ interface TSEnumBody extends Span {
847
+ type: "TSEnumBody";
848
+ members: Array<TSEnumMember>;
849
+ parent?: Node;
850
+ }
851
+ interface TSEnumMember extends Span {
852
+ type: "TSEnumMember";
853
+ id: TSEnumMemberName;
854
+ initializer: Expression | null;
855
+ computed: boolean;
856
+ parent?: Node;
857
+ }
858
+ type TSEnumMemberName = IdentifierName | StringLiteral | TemplateLiteral;
859
+ interface TSTypeAnnotation extends Span {
860
+ type: "TSTypeAnnotation";
861
+ typeAnnotation: TSType;
862
+ parent?: Node;
863
+ }
864
+ interface TSLiteralType extends Span {
865
+ type: "TSLiteralType";
866
+ literal: TSLiteral;
867
+ parent?: Node;
868
+ }
869
+ type TSLiteral = BooleanLiteral | NumericLiteral | BigIntLiteral | StringLiteral | TemplateLiteral | UnaryExpression;
870
+ type TSType = TSAnyKeyword | TSBigIntKeyword | TSBooleanKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSArrayType | TSConditionalType | TSConstructorType | TSFunctionType | TSImportType | TSIndexedAccessType | TSInferType | TSIntersectionType | TSLiteralType | TSMappedType | TSNamedTupleMember | TSTemplateLiteralType | TSThisType | TSTupleType | TSTypeLiteral | TSTypeOperator | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUnionType | TSParenthesizedType | JSDocNullableType | JSDocNonNullableType | JSDocUnknownType;
871
+ interface TSConditionalType extends Span {
872
+ type: "TSConditionalType";
873
+ checkType: TSType;
874
+ extendsType: TSType;
875
+ trueType: TSType;
876
+ falseType: TSType;
877
+ parent?: Node;
878
+ }
879
+ interface TSUnionType extends Span {
880
+ type: "TSUnionType";
881
+ types: Array<TSType>;
882
+ parent?: Node;
883
+ }
884
+ interface TSIntersectionType extends Span {
885
+ type: "TSIntersectionType";
886
+ types: Array<TSType>;
887
+ parent?: Node;
888
+ }
889
+ interface TSParenthesizedType extends Span {
890
+ type: "TSParenthesizedType";
891
+ typeAnnotation: TSType;
892
+ parent?: Node;
893
+ }
894
+ interface TSTypeOperator extends Span {
895
+ type: "TSTypeOperator";
896
+ operator: TSTypeOperatorOperator;
897
+ typeAnnotation: TSType;
898
+ parent?: Node;
899
+ }
900
+ type TSTypeOperatorOperator = "keyof" | "unique" | "readonly";
901
+ interface TSArrayType extends Span {
902
+ type: "TSArrayType";
903
+ elementType: TSType;
904
+ parent?: Node;
905
+ }
906
+ interface TSIndexedAccessType extends Span {
907
+ type: "TSIndexedAccessType";
908
+ objectType: TSType;
909
+ indexType: TSType;
910
+ parent?: Node;
911
+ }
912
+ interface TSTupleType extends Span {
913
+ type: "TSTupleType";
914
+ elementTypes: Array<TSTupleElement>;
915
+ parent?: Node;
916
+ }
917
+ interface TSNamedTupleMember extends Span {
918
+ type: "TSNamedTupleMember";
919
+ label: IdentifierName;
920
+ elementType: TSTupleElement;
921
+ optional: boolean;
922
+ parent?: Node;
923
+ }
924
+ interface TSOptionalType extends Span {
925
+ type: "TSOptionalType";
926
+ typeAnnotation: TSType;
927
+ parent?: Node;
928
+ }
929
+ interface TSRestType extends Span {
930
+ type: "TSRestType";
931
+ typeAnnotation: TSType;
932
+ parent?: Node;
933
+ }
934
+ type TSTupleElement = TSOptionalType | TSRestType | TSType;
935
+ interface TSAnyKeyword extends Span {
936
+ type: "TSAnyKeyword";
937
+ parent?: Node;
938
+ }
939
+ interface TSStringKeyword extends Span {
940
+ type: "TSStringKeyword";
941
+ parent?: Node;
942
+ }
943
+ interface TSBooleanKeyword extends Span {
944
+ type: "TSBooleanKeyword";
945
+ parent?: Node;
946
+ }
947
+ interface TSNumberKeyword extends Span {
948
+ type: "TSNumberKeyword";
949
+ parent?: Node;
950
+ }
951
+ interface TSNeverKeyword extends Span {
952
+ type: "TSNeverKeyword";
953
+ parent?: Node;
954
+ }
955
+ interface TSIntrinsicKeyword extends Span {
956
+ type: "TSIntrinsicKeyword";
957
+ parent?: Node;
958
+ }
959
+ interface TSUnknownKeyword extends Span {
960
+ type: "TSUnknownKeyword";
961
+ parent?: Node;
962
+ }
963
+ interface TSNullKeyword extends Span {
964
+ type: "TSNullKeyword";
965
+ parent?: Node;
966
+ }
967
+ interface TSUndefinedKeyword extends Span {
968
+ type: "TSUndefinedKeyword";
969
+ parent?: Node;
970
+ }
971
+ interface TSVoidKeyword extends Span {
972
+ type: "TSVoidKeyword";
973
+ parent?: Node;
974
+ }
975
+ interface TSSymbolKeyword extends Span {
976
+ type: "TSSymbolKeyword";
977
+ parent?: Node;
978
+ }
979
+ interface TSThisType extends Span {
980
+ type: "TSThisType";
981
+ parent?: Node;
982
+ }
983
+ interface TSObjectKeyword extends Span {
984
+ type: "TSObjectKeyword";
985
+ parent?: Node;
986
+ }
987
+ interface TSBigIntKeyword extends Span {
988
+ type: "TSBigIntKeyword";
989
+ parent?: Node;
990
+ }
991
+ interface TSTypeReference extends Span {
992
+ type: "TSTypeReference";
993
+ typeName: TSTypeName;
994
+ typeArguments: TSTypeParameterInstantiation | null;
995
+ parent?: Node;
996
+ }
997
+ type TSTypeName = IdentifierReference | TSQualifiedName | ThisExpression;
998
+ interface TSQualifiedName extends Span {
999
+ type: "TSQualifiedName";
1000
+ left: TSTypeName;
1001
+ right: IdentifierName;
1002
+ parent?: Node;
1003
+ }
1004
+ interface TSTypeParameterInstantiation extends Span {
1005
+ type: "TSTypeParameterInstantiation";
1006
+ params: Array<TSType>;
1007
+ parent?: Node;
1008
+ }
1009
+ interface TSTypeParameter extends Span {
1010
+ type: "TSTypeParameter";
1011
+ name: BindingIdentifier;
1012
+ constraint: TSType | null;
1013
+ default: TSType | null;
1014
+ in: boolean;
1015
+ out: boolean;
1016
+ const: boolean;
1017
+ parent?: Node;
1018
+ }
1019
+ interface TSTypeParameterDeclaration extends Span {
1020
+ type: "TSTypeParameterDeclaration";
1021
+ params: Array<TSTypeParameter>;
1022
+ parent?: Node;
1023
+ }
1024
+ interface TSTypeAliasDeclaration extends Span {
1025
+ type: "TSTypeAliasDeclaration";
1026
+ id: BindingIdentifier;
1027
+ typeParameters: TSTypeParameterDeclaration | null;
1028
+ typeAnnotation: TSType;
1029
+ declare: boolean;
1030
+ parent?: Node;
1031
+ }
1032
+ type TSAccessibility = "private" | "protected" | "public";
1033
+ interface TSClassImplements extends Span {
1034
+ type: "TSClassImplements";
1035
+ expression: IdentifierReference | ThisExpression | MemberExpression;
1036
+ typeArguments: TSTypeParameterInstantiation | null;
1037
+ parent?: Node;
1038
+ }
1039
+ interface TSInterfaceDeclaration extends Span {
1040
+ type: "TSInterfaceDeclaration";
1041
+ id: BindingIdentifier;
1042
+ typeParameters: TSTypeParameterDeclaration | null;
1043
+ extends: Array<TSInterfaceHeritage>;
1044
+ body: TSInterfaceBody;
1045
+ declare: boolean;
1046
+ parent?: Node;
1047
+ }
1048
+ interface TSInterfaceBody extends Span {
1049
+ type: "TSInterfaceBody";
1050
+ body: Array<TSSignature>;
1051
+ parent?: Node;
1052
+ }
1053
+ interface TSPropertySignature extends Span {
1054
+ type: "TSPropertySignature";
1055
+ computed: boolean;
1056
+ optional: boolean;
1057
+ readonly: boolean;
1058
+ key: PropertyKey;
1059
+ typeAnnotation: TSTypeAnnotation | null;
1060
+ accessibility: null;
1061
+ static: false;
1062
+ parent?: Node;
1063
+ }
1064
+ type TSSignature = TSIndexSignature | TSPropertySignature | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSMethodSignature;
1065
+ interface TSIndexSignature extends Span {
1066
+ type: "TSIndexSignature";
1067
+ parameters: Array<TSIndexSignatureName>;
1068
+ typeAnnotation: TSTypeAnnotation;
1069
+ readonly: boolean;
1070
+ static: boolean;
1071
+ accessibility: null;
1072
+ parent?: Node;
1073
+ }
1074
+ interface TSCallSignatureDeclaration extends Span {
1075
+ type: "TSCallSignatureDeclaration";
1076
+ typeParameters: TSTypeParameterDeclaration | null;
1077
+ params: ParamPattern[];
1078
+ returnType: TSTypeAnnotation | null;
1079
+ parent?: Node;
1080
+ }
1081
+ type TSMethodSignatureKind = "method" | "get" | "set";
1082
+ interface TSMethodSignature extends Span {
1083
+ type: "TSMethodSignature";
1084
+ key: PropertyKey;
1085
+ computed: boolean;
1086
+ optional: boolean;
1087
+ kind: TSMethodSignatureKind;
1088
+ typeParameters: TSTypeParameterDeclaration | null;
1089
+ params: ParamPattern[];
1090
+ returnType: TSTypeAnnotation | null;
1091
+ accessibility: null;
1092
+ readonly: false;
1093
+ static: false;
1094
+ parent?: Node;
1095
+ }
1096
+ interface TSConstructSignatureDeclaration extends Span {
1097
+ type: "TSConstructSignatureDeclaration";
1098
+ typeParameters: TSTypeParameterDeclaration | null;
1099
+ params: ParamPattern[];
1100
+ returnType: TSTypeAnnotation | null;
1101
+ parent?: Node;
1102
+ }
1103
+ interface TSIndexSignatureName extends Span {
1104
+ type: "Identifier";
1105
+ decorators: [];
1106
+ name: string;
1107
+ optional: false;
1108
+ typeAnnotation: TSTypeAnnotation;
1109
+ parent?: Node;
1110
+ }
1111
+ interface TSInterfaceHeritage extends Span {
1112
+ type: "TSInterfaceHeritage";
1113
+ expression: Expression;
1114
+ typeArguments: TSTypeParameterInstantiation | null;
1115
+ parent?: Node;
1116
+ }
1117
+ interface TSTypePredicate extends Span {
1118
+ type: "TSTypePredicate";
1119
+ parameterName: TSTypePredicateName;
1120
+ asserts: boolean;
1121
+ typeAnnotation: TSTypeAnnotation | null;
1122
+ parent?: Node;
1123
+ }
1124
+ type TSTypePredicateName = IdentifierName | TSThisType;
1125
+ interface TSModuleDeclaration extends Span {
1126
+ type: "TSModuleDeclaration";
1127
+ id: BindingIdentifier | StringLiteral | TSQualifiedName;
1128
+ body: TSModuleBlock | null;
1129
+ kind: TSModuleDeclarationKind;
1130
+ declare: boolean;
1131
+ global: false;
1132
+ parent?: Node;
1133
+ }
1134
+ type TSModuleDeclarationKind = "module" | "namespace";
1135
+ interface TSGlobalDeclaration extends Span {
1136
+ type: "TSModuleDeclaration";
1137
+ id: IdentifierName;
1138
+ body: TSModuleBlock;
1139
+ kind: "global";
1140
+ declare: boolean;
1141
+ global: true;
1142
+ parent?: Node;
1143
+ }
1144
+ interface TSModuleBlock extends Span {
1145
+ type: "TSModuleBlock";
1146
+ body: Array<Directive | Statement>;
1147
+ parent?: Node;
1148
+ }
1149
+ interface TSTypeLiteral extends Span {
1150
+ type: "TSTypeLiteral";
1151
+ members: Array<TSSignature>;
1152
+ parent?: Node;
1153
+ }
1154
+ interface TSInferType extends Span {
1155
+ type: "TSInferType";
1156
+ typeParameter: TSTypeParameter;
1157
+ parent?: Node;
1158
+ }
1159
+ interface TSTypeQuery extends Span {
1160
+ type: "TSTypeQuery";
1161
+ exprName: TSTypeQueryExprName;
1162
+ typeArguments: TSTypeParameterInstantiation | null;
1163
+ parent?: Node;
1164
+ }
1165
+ type TSTypeQueryExprName = TSImportType | TSTypeName;
1166
+ interface TSImportType extends Span {
1167
+ type: "TSImportType";
1168
+ source: StringLiteral;
1169
+ options: ObjectExpression | null;
1170
+ qualifier: TSImportTypeQualifier | null;
1171
+ typeArguments: TSTypeParameterInstantiation | null;
1172
+ parent?: Node;
1173
+ }
1174
+ type TSImportTypeQualifier = IdentifierName | TSImportTypeQualifiedName;
1175
+ interface TSImportTypeQualifiedName extends Span {
1176
+ type: "TSQualifiedName";
1177
+ left: TSImportTypeQualifier;
1178
+ right: IdentifierName;
1179
+ parent?: Node;
1180
+ }
1181
+ interface TSFunctionType extends Span {
1182
+ type: "TSFunctionType";
1183
+ typeParameters: TSTypeParameterDeclaration | null;
1184
+ params: ParamPattern[];
1185
+ returnType: TSTypeAnnotation;
1186
+ parent?: Node;
1187
+ }
1188
+ interface TSConstructorType extends Span {
1189
+ type: "TSConstructorType";
1190
+ abstract: boolean;
1191
+ typeParameters: TSTypeParameterDeclaration | null;
1192
+ params: ParamPattern[];
1193
+ returnType: TSTypeAnnotation;
1194
+ parent?: Node;
1195
+ }
1196
+ interface TSMappedType extends Span {
1197
+ type: "TSMappedType";
1198
+ key: BindingIdentifier;
1199
+ constraint: TSType;
1200
+ nameType: TSType | null;
1201
+ typeAnnotation: TSType | null;
1202
+ optional: TSMappedTypeModifierOperator | false;
1203
+ readonly: TSMappedTypeModifierOperator | null;
1204
+ parent?: Node;
1205
+ }
1206
+ type TSMappedTypeModifierOperator = true | "+" | "-";
1207
+ interface TSTemplateLiteralType extends Span {
1208
+ type: "TSTemplateLiteralType";
1209
+ quasis: Array<TemplateElement>;
1210
+ types: Array<TSType>;
1211
+ parent?: Node;
1212
+ }
1213
+ interface TSAsExpression extends Span {
1214
+ type: "TSAsExpression";
1215
+ expression: Expression;
1216
+ typeAnnotation: TSType;
1217
+ parent?: Node;
1218
+ }
1219
+ interface TSSatisfiesExpression extends Span {
1220
+ type: "TSSatisfiesExpression";
1221
+ expression: Expression;
1222
+ typeAnnotation: TSType;
1223
+ parent?: Node;
1224
+ }
1225
+ interface TSTypeAssertion extends Span {
1226
+ type: "TSTypeAssertion";
1227
+ typeAnnotation: TSType;
1228
+ expression: Expression;
1229
+ parent?: Node;
1230
+ }
1231
+ interface TSImportEqualsDeclaration extends Span {
1232
+ type: "TSImportEqualsDeclaration";
1233
+ id: BindingIdentifier;
1234
+ moduleReference: TSModuleReference;
1235
+ importKind: ImportOrExportKind;
1236
+ parent?: Node;
1237
+ }
1238
+ type TSModuleReference = TSExternalModuleReference | IdentifierReference | TSQualifiedName;
1239
+ interface TSExternalModuleReference extends Span {
1240
+ type: "TSExternalModuleReference";
1241
+ expression: StringLiteral;
1242
+ parent?: Node;
1243
+ }
1244
+ interface TSNonNullExpression extends Span {
1245
+ type: "TSNonNullExpression";
1246
+ expression: Expression;
1247
+ parent?: Node;
1248
+ }
1249
+ interface Decorator extends Span {
1250
+ type: "Decorator";
1251
+ expression: Expression;
1252
+ parent?: Node;
1253
+ }
1254
+ interface TSExportAssignment extends Span {
1255
+ type: "TSExportAssignment";
1256
+ expression: Expression;
1257
+ parent?: Node;
1258
+ }
1259
+ interface TSNamespaceExportDeclaration extends Span {
1260
+ type: "TSNamespaceExportDeclaration";
1261
+ id: IdentifierName;
1262
+ parent?: Node;
1263
+ }
1264
+ interface TSInstantiationExpression extends Span {
1265
+ type: "TSInstantiationExpression";
1266
+ expression: Expression;
1267
+ typeArguments: TSTypeParameterInstantiation;
1268
+ parent?: Node;
1269
+ }
1270
+ type ImportOrExportKind = "value" | "type";
1271
+ interface JSDocNullableType extends Span {
1272
+ type: "TSJSDocNullableType";
1273
+ typeAnnotation: TSType;
1274
+ postfix: boolean;
1275
+ parent?: Node;
1276
+ }
1277
+ interface JSDocNonNullableType extends Span {
1278
+ type: "TSJSDocNonNullableType";
1279
+ typeAnnotation: TSType;
1280
+ postfix: boolean;
1281
+ parent?: Node;
1282
+ }
1283
+ interface JSDocUnknownType extends Span {
1284
+ type: "TSJSDocUnknownType";
1285
+ parent?: Node;
1286
+ }
1287
+ type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "||=" | "&&=" | "??=";
1288
+ type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "+" | "-" | "*" | "/" | "%" | "**" | "<<" | ">>" | ">>>" | "|" | "^" | "&" | "in" | "instanceof";
1289
+ type LogicalOperator = "||" | "&&" | "??";
1290
+ type UnaryOperator = "+" | "-" | "!" | "~" | "typeof" | "void" | "delete";
1291
+ type UpdateOperator = "++" | "--";
1292
+ interface Span {
1293
+ start: number;
1294
+ end: number;
1295
+ range?: [number, number];
1296
+ }
1297
+ type ModuleKind = "script" | "module" | "commonjs";
1298
+ type Node = Program | IdentifierName | IdentifierReference | BindingIdentifier | LabelIdentifier | ThisExpression | ArrayExpression | ObjectExpression | ObjectProperty | TemplateLiteral | TaggedTemplateExpression | TemplateElement | ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression | CallExpression | NewExpression | MetaProperty | SpreadElement | UpdateExpression | UnaryExpression | BinaryExpression | PrivateInExpression | LogicalExpression | ConditionalExpression | AssignmentExpression | ArrayAssignmentTarget | ObjectAssignmentTarget | AssignmentTargetRest | AssignmentTargetWithDefault | AssignmentTargetPropertyIdentifier | AssignmentTargetPropertyProperty | SequenceExpression | Super | AwaitExpression | ChainExpression | ParenthesizedExpression | Directive | Hashbang | BlockStatement | VariableDeclaration | VariableDeclarator | EmptyStatement | ExpressionStatement | IfStatement | DoWhileStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | ContinueStatement | BreakStatement | ReturnStatement | WithStatement | SwitchStatement | SwitchCase | LabeledStatement | ThrowStatement | TryStatement | CatchClause | DebuggerStatement | AssignmentPattern | ObjectPattern | BindingProperty | ArrayPattern | BindingRestElement | Function | FunctionBody | ArrowFunctionExpression | YieldExpression | Class | ClassBody | MethodDefinition | PropertyDefinition | PrivateIdentifier | StaticBlock | AccessorProperty | ImportExpression | ImportDeclaration | ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportAttribute | ExportNamedDeclaration | ExportDefaultDeclaration | ExportAllDeclaration | ExportSpecifier | V8IntrinsicExpression | BooleanLiteral | NullLiteral | NumericLiteral | StringLiteral | BigIntLiteral | RegExpLiteral | JSXElement | JSXOpeningElement | JSXClosingElement | JSXFragment | JSXOpeningFragment | JSXClosingFragment | JSXNamespacedName | JSXMemberExpression | JSXExpressionContainer | JSXEmptyExpression | JSXAttribute | JSXSpreadAttribute | JSXIdentifier | JSXSpreadChild | JSXText | TSThisParameter | TSEnumDeclaration | TSEnumBody | TSEnumMember | TSTypeAnnotation | TSLiteralType | TSConditionalType | TSUnionType | TSIntersectionType | TSParenthesizedType | TSTypeOperator | TSArrayType | TSIndexedAccessType | TSTupleType | TSNamedTupleMember | TSOptionalType | TSRestType | TSAnyKeyword | TSStringKeyword | TSBooleanKeyword | TSNumberKeyword | TSNeverKeyword | TSIntrinsicKeyword | TSUnknownKeyword | TSNullKeyword | TSUndefinedKeyword | TSVoidKeyword | TSSymbolKeyword | TSThisType | TSObjectKeyword | TSBigIntKeyword | TSTypeReference | TSQualifiedName | TSTypeParameterInstantiation | TSTypeParameter | TSTypeParameterDeclaration | TSTypeAliasDeclaration | TSClassImplements | TSInterfaceDeclaration | TSInterfaceBody | TSPropertySignature | TSIndexSignature | TSCallSignatureDeclaration | TSMethodSignature | TSConstructSignatureDeclaration | TSIndexSignatureName | TSInterfaceHeritage | TSTypePredicate | TSModuleDeclaration | TSGlobalDeclaration | TSModuleBlock | TSTypeLiteral | TSInferType | TSTypeQuery | TSImportType | TSImportTypeQualifiedName | TSFunctionType | TSConstructorType | TSMappedType | TSTemplateLiteralType | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSImportEqualsDeclaration | TSExternalModuleReference | TSNonNullExpression | Decorator | TSExportAssignment | TSNamespaceExportDeclaration | TSInstantiationExpression | JSDocNullableType | JSDocNonNullableType | JSDocUnknownType | ParamPattern;
1299
+ //#endregion
1300
+ export { Program as t };