react-doctor 0.1.6 → 0.2.0-beta.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.
@@ -0,0 +1,1798 @@
1
+ import { l as ReactDoctorErrorInfo } from "./errors-ZdckckLr.js";
2
+
3
+ //#region src/core/rules/codebase/analyzer/plugins/types.d.ts
4
+ interface CodebasePluginResult {
5
+ entryPatterns: CodebasePluginEntryPattern[];
6
+ alwaysUsedPatterns: string[];
7
+ usedExports: Map<string, Set<string>>;
8
+ toolingDependencies: Set<string>;
9
+ virtualModulePrefixes: string[];
10
+ generatedImportSuffixes: string[];
11
+ }
12
+ interface CodebasePluginEntryPattern {
13
+ pattern: string;
14
+ role: EntryPointRole;
15
+ }
16
+ //#endregion
17
+ //#region src/core/rules/codebase/analyzer/types.d.ts
18
+ interface CodebaseAnalysisConfig {
19
+ rootDirectory: string;
20
+ includePaths: string[];
21
+ excludePatterns: string[];
22
+ conditionNames: string[];
23
+ production: boolean;
24
+ }
25
+ interface PackageJsonObject {
26
+ name?: string;
27
+ version?: string;
28
+ type?: string;
29
+ main?: string;
30
+ module?: string;
31
+ browser?: string | Record<string, string | false>;
32
+ source?: string;
33
+ types?: string;
34
+ typings?: string;
35
+ bin?: string | Record<string, string>;
36
+ exports?: unknown;
37
+ imports?: unknown;
38
+ files?: string[];
39
+ sideEffects?: boolean | string[];
40
+ scripts?: Record<string, string>;
41
+ workspaces?: string[] | {
42
+ packages?: string[];
43
+ };
44
+ dependencies?: Record<string, string>;
45
+ devDependencies?: Record<string, string>;
46
+ peerDependencies?: Record<string, string>;
47
+ optionalDependencies?: Record<string, string>;
48
+ peerDependenciesMeta?: Record<string, {
49
+ optional?: boolean;
50
+ }>;
51
+ [key: string]: unknown;
52
+ }
53
+ interface DependencyBuckets {
54
+ dependencies: Map<string, string>;
55
+ devDependencies: Map<string, string>;
56
+ peerDependencies: Map<string, string>;
57
+ optionalDependencies: Map<string, string>;
58
+ }
59
+ interface WorkspaceSourceMap {
60
+ sourceDirectory: string;
61
+ outputDirectory: string;
62
+ }
63
+ interface WorkspaceInfo {
64
+ id: number;
65
+ name: string;
66
+ directory: string;
67
+ relativeDirectory: string;
68
+ packageJsonPath: string;
69
+ manifest: PackageJsonObject;
70
+ dependencyBuckets: DependencyBuckets;
71
+ dependencyNames: Set<string>;
72
+ manifestDependencyNames: Set<string>;
73
+ scriptDependencyNames: Set<string>;
74
+ typeScriptConfigDependencyNames: Set<string>;
75
+ cssImportDependencyNames: Set<string>;
76
+ sourceMaps: WorkspaceSourceMap[];
77
+ }
78
+ interface ProjectFile {
79
+ id: number;
80
+ filePath: string;
81
+ relativePath: string;
82
+ extension: string;
83
+ sourceText: string;
84
+ workspaceId: number;
85
+ lineStarts: number[];
86
+ }
87
+ interface SourcePosition {
88
+ line: number;
89
+ column: number;
90
+ }
91
+ interface ImportedBinding {
92
+ importedName: string;
93
+ localName: string;
94
+ isTypeOnly: boolean;
95
+ isNamespace: boolean;
96
+ start: number;
97
+ end: number;
98
+ referenceStart?: number;
99
+ }
100
+ interface ImportRecord {
101
+ source: string;
102
+ bindings: ImportedBinding[];
103
+ kind: "static" | "dynamic" | "comment" | "re-export" | "require" | "require-resolve" | "import-meta" | "context" | "asset";
104
+ context?: ContextImportOptions;
105
+ isTypeOnly: boolean;
106
+ isSideEffectOnly: boolean;
107
+ isOptional: boolean;
108
+ start: number;
109
+ end: number;
110
+ position: SourcePosition;
111
+ }
112
+ interface ContextImportOptions {
113
+ kind: "glob" | "require-context";
114
+ recursive?: boolean;
115
+ regexPattern?: string;
116
+ regexFlags?: string;
117
+ }
118
+ interface ExportMemberRecord {
119
+ name: string;
120
+ kind: "class" | "enum" | "namespace";
121
+ start: number;
122
+ end: number;
123
+ position: SourcePosition;
124
+ jsDocTags: Set<string>;
125
+ hasLocalReferences: boolean;
126
+ }
127
+ interface ExportRecord {
128
+ exportedName: string;
129
+ localName: string | null;
130
+ source: string | null;
131
+ importedName: string | null;
132
+ symbolKind: "value" | "type" | "interface" | "enum" | "class" | "namespace" | "unknown";
133
+ isTypeOnly: boolean;
134
+ isReExport: boolean;
135
+ isCommonJs: boolean;
136
+ isNamespace: boolean;
137
+ isReactComponentLike: boolean;
138
+ jsDocTags: Set<string>;
139
+ members: ExportMemberRecord[];
140
+ hasLocalReferences: boolean;
141
+ start: number;
142
+ end: number;
143
+ position: SourcePosition;
144
+ }
145
+ interface NamespaceMemberReference {
146
+ namespace: string;
147
+ memberName: string;
148
+ memberPath: string[];
149
+ start: number;
150
+ end: number;
151
+ }
152
+ interface MemberObjectReference {
153
+ namespace: string;
154
+ memberPath: string[];
155
+ start: number;
156
+ end: number;
157
+ }
158
+ interface ShadowRange {
159
+ start: number;
160
+ end: number;
161
+ }
162
+ interface NamespaceObjectAlias {
163
+ exportName: string;
164
+ propertyName: string;
165
+ namespaceLocalName: string;
166
+ }
167
+ interface NamespaceLocalAlias {
168
+ aliasName: string;
169
+ namespaceLocalName: string;
170
+ start: number;
171
+ end: number;
172
+ }
173
+ interface NamespaceLocalObjectAlias {
174
+ objectLocalName: string;
175
+ propertyName: string;
176
+ namespaceLocalName: string;
177
+ }
178
+ interface ResolvedImport {
179
+ importRecord: ImportRecord;
180
+ targetKind: "internal" | "external" | "builtin" | "asset" | "unresolved";
181
+ targetFilePath: string | null;
182
+ packageName: string | null;
183
+ error: string | null;
184
+ }
185
+ interface SymbolReference {
186
+ fromFileId: number;
187
+ kind: "named" | "default" | "namespace" | "namespace-member" | "re-export" | "dynamic" | "side-effect";
188
+ importRecord: ImportRecord;
189
+ }
190
+ interface GraphExportSymbol extends ExportRecord {
191
+ references: SymbolReference[];
192
+ isPluginUsed: boolean;
193
+ isReferencedByNamespace: boolean;
194
+ referencedMemberNames: Set<string>;
195
+ }
196
+ interface ModuleGraphNode {
197
+ file: ProjectFile;
198
+ imports: ResolvedImport[];
199
+ importedBy: Set<number>;
200
+ exports: Map<string, GraphExportSymbol>;
201
+ directives: Set<string>;
202
+ parseErrors: string[];
203
+ usedIdentifiers: Set<string>;
204
+ usedIdentifierRanges: Map<string, number[]>;
205
+ shadowRangesByName: Map<string, ShadowRange[]>;
206
+ namespaceMemberReferences: NamespaceMemberReference[];
207
+ memberObjectReferences: MemberObjectReference[];
208
+ namespaceObjectAliases: NamespaceObjectAlias[];
209
+ namespaceLocalAliases: NamespaceLocalAlias[];
210
+ namespaceLocalObjectAliases: NamespaceLocalObjectAlias[];
211
+ entryRoles: Set<EntryPointRole>;
212
+ entrySources: Set<string>;
213
+ isReachable: boolean;
214
+ isRuntimeReachable: boolean;
215
+ isTestReachable: boolean;
216
+ isTypeReachable: boolean;
217
+ hasCjsExports: boolean;
218
+ }
219
+ interface EntryPoint {
220
+ fileId: number;
221
+ role: EntryPointRole;
222
+ source: string;
223
+ }
224
+ interface PackageUsage {
225
+ packageName: string;
226
+ workspaceId: number;
227
+ fromFileId: number;
228
+ specifier: string;
229
+ isTypeOnly: boolean;
230
+ isRuntime: boolean;
231
+ isTestOnly: boolean;
232
+ }
233
+ interface ModuleGraph {
234
+ rootDirectory: string;
235
+ config: CodebaseAnalysisConfig;
236
+ workspaces: WorkspaceInfo[];
237
+ files: ProjectFile[];
238
+ nodes: Map<number, ModuleGraphNode>;
239
+ pathToFileId: Map<string, number>;
240
+ entryPoints: EntryPoint[];
241
+ packageUsages: PackageUsage[];
242
+ unresolvedImports: ResolvedImport[];
243
+ pluginResults: ReadonlyMap<number, CodebasePluginResult>;
244
+ }
245
+ interface CodebaseAnalysisResult {
246
+ graph: ModuleGraph;
247
+ }
248
+ type EntryPointRole = "runtime" | "test" | "support";
249
+ //#endregion
250
+ //#region src/core/types.d.ts
251
+ interface SourceLocation {
252
+ filePath: string;
253
+ line?: number;
254
+ column?: number;
255
+ endLine?: number;
256
+ endColumn?: number;
257
+ }
258
+ interface ReactDoctorIssueSource {
259
+ checkId: string;
260
+ pluginName?: string;
261
+ ruleId?: string;
262
+ }
263
+ interface ReactDoctorIssue {
264
+ id: string;
265
+ title: string;
266
+ message: string;
267
+ severity: "error" | "warning" | "info";
268
+ category: string;
269
+ location?: SourceLocation;
270
+ recommendation?: string;
271
+ source?: ReactDoctorIssueSource;
272
+ }
273
+ interface ReactDoctorCheckResult {
274
+ id: string;
275
+ name: string;
276
+ status: "completed" | "failed" | "skipped";
277
+ issues: ReactDoctorIssue[];
278
+ durationMilliseconds: number;
279
+ error?: ReactDoctorErrorInfo;
280
+ }
281
+ interface ReactDoctorScore {
282
+ value: number;
283
+ label: string;
284
+ }
285
+ type ReactDoctorFailOnLevel = "error" | "warning" | "none";
286
+ type ReactProjectFramework = "cra" | "expo" | "gatsby" | "nextjs" | "react" | "react-native" | "remix" | "tanstack-start" | "unknown" | "vite";
287
+ interface ReactProjectInfo {
288
+ rootDirectory: string;
289
+ projectName: string;
290
+ packageJsonPath: string | null;
291
+ reactVersion: string | null;
292
+ reactMajorVersion: number | null;
293
+ reactPeerDependencyRange: string | null;
294
+ tailwindVersion: string | null;
295
+ framework: ReactProjectFramework;
296
+ hasTypeScript: boolean;
297
+ hasReactCompiler: boolean;
298
+ hasTanStackAI: boolean;
299
+ hasTanStackQuery: boolean;
300
+ sourceFileCount: number;
301
+ }
302
+ interface ReactDoctorResult {
303
+ status: "completed" | "completed-with-errors" | "failed";
304
+ project: ReactProjectInfo;
305
+ issues: ReactDoctorIssue[];
306
+ checks: ReactDoctorCheckResult[];
307
+ score: ReactDoctorScore | null;
308
+ startedAt: string;
309
+ completedAt: string;
310
+ durationMilliseconds: number;
311
+ }
312
+ interface ReactDoctorRuleSelection {
313
+ enabledRuleIds?: string[];
314
+ disabledRuleIds?: string[];
315
+ }
316
+ interface ReactDoctorIgnoreOverride {
317
+ files: string[];
318
+ rules?: string[];
319
+ }
320
+ interface ReactDoctorIgnoreConfig {
321
+ rules?: string[];
322
+ files?: string[];
323
+ overrides?: ReactDoctorIgnoreOverride[];
324
+ }
325
+ interface ReactDoctorConfig {
326
+ ignore?: ReactDoctorIgnoreConfig;
327
+ lint?: boolean;
328
+ deadCode?: boolean;
329
+ verbose?: boolean;
330
+ diff?: boolean | string;
331
+ offline?: boolean;
332
+ failOn?: ReactDoctorFailOnLevel;
333
+ customRulesOnly?: boolean;
334
+ rootDir?: string;
335
+ textComponents?: string[];
336
+ rawTextWrapperComponents?: string[];
337
+ respectInlineDisables?: boolean;
338
+ adoptExistingLintConfig?: boolean;
339
+ includeEcosystemRules?: boolean;
340
+ ignoredTags?: string[];
341
+ }
342
+ interface LoadedReactDoctorConfig {
343
+ config: ReactDoctorConfig;
344
+ sourceDirectory: string;
345
+ sourcePath: string;
346
+ }
347
+ interface ReactDoctorJsonReportSummary {
348
+ errorCount: number;
349
+ warningCount: number;
350
+ affectedFileCount: number;
351
+ totalIssueCount: number;
352
+ score: number | null;
353
+ scoreLabel: string | null;
354
+ }
355
+ interface ReactDoctorJsonReport {
356
+ schemaVersion: 1;
357
+ ok: boolean;
358
+ project: ReactProjectInfo;
359
+ issues: ReactDoctorIssue[];
360
+ checks: ReactDoctorCheckResult[];
361
+ summary: ReactDoctorJsonReportSummary;
362
+ startedAt: string;
363
+ completedAt: string;
364
+ durationMilliseconds: number;
365
+ }
366
+ interface InspectReactProjectOptions {
367
+ rootDirectory?: string;
368
+ includePaths?: string[];
369
+ excludePatterns?: string[];
370
+ rules?: ReactDoctorRuleSelection;
371
+ config?: ReactDoctorConfig | null;
372
+ loadedConfig?: LoadedReactDoctorConfig | null;
373
+ lint?: boolean;
374
+ deadCode?: boolean;
375
+ customRulesOnly?: boolean;
376
+ respectInlineDisables?: boolean;
377
+ offline?: boolean;
378
+ silentLogs?: boolean;
379
+ signal?: AbortSignal;
380
+ }
381
+ //#endregion
382
+ //#region src/core/rules/types.d.ts
383
+ interface ReactDoctorRuleExample {
384
+ before: string;
385
+ after: string;
386
+ }
387
+ interface ReactDoctorRuleMetadata {
388
+ id: string;
389
+ name: string;
390
+ description: string;
391
+ recommendation?: string;
392
+ examples?: ReactDoctorRuleExample[];
393
+ category: string;
394
+ severity: ReactDoctorIssue["severity"];
395
+ defaultEnabled: boolean;
396
+ tags: string[];
397
+ docsUrl?: string;
398
+ }
399
+ interface ReactDoctorRuleContext {
400
+ rootDirectory: string;
401
+ includePaths?: string[];
402
+ excludePatterns?: string[];
403
+ signal?: AbortSignal;
404
+ getCodebaseAnalysis?: () => Promise<CodebaseAnalysisResult>;
405
+ }
406
+ interface ReactDoctorRuleResult {
407
+ issues: ReactDoctorIssue[];
408
+ }
409
+ interface ReactDoctorRule {
410
+ metadata: ReactDoctorRuleMetadata;
411
+ run: (context: ReactDoctorRuleContext) => ReactDoctorRuleResult | Promise<ReactDoctorRuleResult>;
412
+ }
413
+ //#endregion
414
+ //#region src/core/rules/registry.d.ts
415
+ interface DefineRule {
416
+ (rule: ReactDoctorRule): ReactDoctorRule;
417
+ <RuleDefinition>(rule: RuleDefinition): RuleDefinition;
418
+ }
419
+ declare const defineRule: DefineRule;
420
+ interface RuleRegistryOptions {
421
+ rules?: ReactDoctorRule[];
422
+ enabledRuleIds?: string[];
423
+ disabledRuleIds?: string[];
424
+ }
425
+ interface ReactDoctorRuleRegistry {
426
+ listRules: () => ReactDoctorRule[];
427
+ listMetadata: () => ReactDoctorRuleMetadata[];
428
+ getRule: (ruleId: string) => ReactDoctorRule | null;
429
+ isRuleEnabled: (ruleId: string, selection?: ReactDoctorRuleSelection) => boolean;
430
+ selectRules: (selection?: ReactDoctorRuleSelection) => ReactDoctorRule[];
431
+ runRules: (context: RunRulesContext) => Promise<ReactDoctorCheckResult[]>;
432
+ enableRule: (ruleId: string) => ReactDoctorRuleRegistry;
433
+ disableRule: (ruleId: string) => ReactDoctorRuleRegistry;
434
+ }
435
+ interface RunRulesContext {
436
+ rootDirectory: string;
437
+ includePaths?: string[];
438
+ excludePatterns?: string[];
439
+ selection?: ReactDoctorRuleSelection;
440
+ signal?: AbortSignal;
441
+ getCodebaseAnalysis?: () => Promise<CodebaseAnalysisResult>;
442
+ }
443
+ //#endregion
444
+ //#region src/core/rules/react-project-structure.d.ts
445
+ declare const reactProjectStructureRule: ReactDoctorRule;
446
+ //#endregion
447
+ //#region ../../node_modules/.pnpm/@oxc-project+types@0.130.0/node_modules/@oxc-project/types/types.d.ts
448
+ // Auto-generated code, DO NOT EDIT DIRECTLY!
449
+ // To edit this generated file you have to edit `tasks/ast_tools/src/generators/typescript.rs`.
450
+ interface Program extends Span {
451
+ type: "Program";
452
+ body: Array<Directive | Statement>;
453
+ sourceType: ModuleKind;
454
+ hashbang: Hashbang | null;
455
+ parent?: null;
456
+ }
457
+ 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;
458
+ interface IdentifierName extends Span {
459
+ type: "Identifier";
460
+ decorators?: [];
461
+ name: string;
462
+ optional?: false;
463
+ typeAnnotation?: null;
464
+ parent?: Node;
465
+ }
466
+ interface IdentifierReference extends Span {
467
+ type: "Identifier";
468
+ decorators?: [];
469
+ name: string;
470
+ optional?: false;
471
+ typeAnnotation?: null;
472
+ parent?: Node;
473
+ }
474
+ interface BindingIdentifier extends Span {
475
+ type: "Identifier";
476
+ decorators?: [];
477
+ name: string;
478
+ optional?: false;
479
+ typeAnnotation?: null;
480
+ parent?: Node;
481
+ }
482
+ interface LabelIdentifier extends Span {
483
+ type: "Identifier";
484
+ decorators?: [];
485
+ name: string;
486
+ optional?: false;
487
+ typeAnnotation?: null;
488
+ parent?: Node;
489
+ }
490
+ interface ThisExpression extends Span {
491
+ type: "ThisExpression";
492
+ parent?: Node;
493
+ }
494
+ interface ArrayExpression extends Span {
495
+ type: "ArrayExpression";
496
+ elements: Array<ArrayExpressionElement>;
497
+ parent?: Node;
498
+ }
499
+ type ArrayExpressionElement = SpreadElement | null | Expression;
500
+ interface ObjectExpression extends Span {
501
+ type: "ObjectExpression";
502
+ properties: Array<ObjectPropertyKind>;
503
+ parent?: Node;
504
+ }
505
+ type ObjectPropertyKind = ObjectProperty | SpreadElement;
506
+ interface ObjectProperty extends Span {
507
+ type: "Property";
508
+ kind: PropertyKind;
509
+ key: PropertyKey;
510
+ value: Expression;
511
+ method: boolean;
512
+ shorthand: boolean;
513
+ computed: boolean;
514
+ optional?: false;
515
+ parent?: Node;
516
+ }
517
+ type PropertyKey = IdentifierName | PrivateIdentifier | Expression;
518
+ type PropertyKind = "init" | "get" | "set";
519
+ interface TemplateLiteral extends Span {
520
+ type: "TemplateLiteral";
521
+ quasis: Array<TemplateElement>;
522
+ expressions: Array<Expression>;
523
+ parent?: Node;
524
+ }
525
+ interface TaggedTemplateExpression extends Span {
526
+ type: "TaggedTemplateExpression";
527
+ tag: Expression;
528
+ typeArguments?: TSTypeParameterInstantiation | null;
529
+ quasi: TemplateLiteral;
530
+ parent?: Node;
531
+ }
532
+ interface TemplateElement extends Span {
533
+ type: "TemplateElement";
534
+ value: TemplateElementValue;
535
+ tail: boolean;
536
+ parent?: Node;
537
+ }
538
+ interface TemplateElementValue {
539
+ raw: string;
540
+ cooked: string | null;
541
+ }
542
+ type MemberExpression = ComputedMemberExpression | StaticMemberExpression | PrivateFieldExpression;
543
+ interface ComputedMemberExpression extends Span {
544
+ type: "MemberExpression";
545
+ object: Expression;
546
+ property: Expression;
547
+ optional: boolean;
548
+ computed: true;
549
+ parent?: Node;
550
+ }
551
+ interface StaticMemberExpression extends Span {
552
+ type: "MemberExpression";
553
+ object: Expression;
554
+ property: IdentifierName;
555
+ optional: boolean;
556
+ computed: false;
557
+ parent?: Node;
558
+ }
559
+ interface PrivateFieldExpression extends Span {
560
+ type: "MemberExpression";
561
+ object: Expression;
562
+ property: PrivateIdentifier;
563
+ optional: boolean;
564
+ computed: false;
565
+ parent?: Node;
566
+ }
567
+ interface CallExpression extends Span {
568
+ type: "CallExpression";
569
+ callee: Expression;
570
+ typeArguments?: TSTypeParameterInstantiation | null;
571
+ arguments: Array<Argument>;
572
+ optional: boolean;
573
+ parent?: Node;
574
+ }
575
+ interface NewExpression extends Span {
576
+ type: "NewExpression";
577
+ callee: Expression;
578
+ typeArguments?: TSTypeParameterInstantiation | null;
579
+ arguments: Array<Argument>;
580
+ parent?: Node;
581
+ }
582
+ interface MetaProperty extends Span {
583
+ type: "MetaProperty";
584
+ meta: IdentifierName;
585
+ property: IdentifierName;
586
+ parent?: Node;
587
+ }
588
+ interface SpreadElement extends Span {
589
+ type: "SpreadElement";
590
+ argument: Expression;
591
+ parent?: Node;
592
+ }
593
+ type Argument = SpreadElement | Expression;
594
+ interface UpdateExpression extends Span {
595
+ type: "UpdateExpression";
596
+ operator: UpdateOperator;
597
+ prefix: boolean;
598
+ argument: SimpleAssignmentTarget;
599
+ parent?: Node;
600
+ }
601
+ interface UnaryExpression extends Span {
602
+ type: "UnaryExpression";
603
+ operator: UnaryOperator;
604
+ argument: Expression;
605
+ prefix: true;
606
+ parent?: Node;
607
+ }
608
+ interface BinaryExpression extends Span {
609
+ type: "BinaryExpression";
610
+ left: Expression;
611
+ operator: BinaryOperator;
612
+ right: Expression;
613
+ parent?: Node;
614
+ }
615
+ interface PrivateInExpression extends Span {
616
+ type: "BinaryExpression";
617
+ left: PrivateIdentifier;
618
+ operator: "in";
619
+ right: Expression;
620
+ parent?: Node;
621
+ }
622
+ interface LogicalExpression extends Span {
623
+ type: "LogicalExpression";
624
+ left: Expression;
625
+ operator: LogicalOperator;
626
+ right: Expression;
627
+ parent?: Node;
628
+ }
629
+ interface ConditionalExpression extends Span {
630
+ type: "ConditionalExpression";
631
+ test: Expression;
632
+ consequent: Expression;
633
+ alternate: Expression;
634
+ parent?: Node;
635
+ }
636
+ interface AssignmentExpression extends Span {
637
+ type: "AssignmentExpression";
638
+ operator: AssignmentOperator;
639
+ left: AssignmentTarget;
640
+ right: Expression;
641
+ parent?: Node;
642
+ }
643
+ type AssignmentTarget = SimpleAssignmentTarget | AssignmentTargetPattern;
644
+ type SimpleAssignmentTarget = IdentifierReference | TSAsExpression | TSSatisfiesExpression | TSNonNullExpression | TSTypeAssertion | MemberExpression;
645
+ type AssignmentTargetPattern = ArrayAssignmentTarget | ObjectAssignmentTarget;
646
+ interface ArrayAssignmentTarget extends Span {
647
+ type: "ArrayPattern";
648
+ decorators?: [];
649
+ elements: Array<AssignmentTargetMaybeDefault | AssignmentTargetRest | null>;
650
+ optional?: false;
651
+ typeAnnotation?: null;
652
+ parent?: Node;
653
+ }
654
+ interface ObjectAssignmentTarget extends Span {
655
+ type: "ObjectPattern";
656
+ decorators?: [];
657
+ properties: Array<AssignmentTargetProperty | AssignmentTargetRest>;
658
+ optional?: false;
659
+ typeAnnotation?: null;
660
+ parent?: Node;
661
+ }
662
+ interface AssignmentTargetRest extends Span {
663
+ type: "RestElement";
664
+ decorators?: [];
665
+ argument: AssignmentTarget;
666
+ optional?: false;
667
+ typeAnnotation?: null;
668
+ value?: null;
669
+ parent?: Node;
670
+ }
671
+ type AssignmentTargetMaybeDefault = AssignmentTargetWithDefault | AssignmentTarget;
672
+ interface AssignmentTargetWithDefault extends Span {
673
+ type: "AssignmentPattern";
674
+ decorators?: [];
675
+ left: AssignmentTarget;
676
+ right: Expression;
677
+ optional?: false;
678
+ typeAnnotation?: null;
679
+ parent?: Node;
680
+ }
681
+ type AssignmentTargetProperty = AssignmentTargetPropertyIdentifier | AssignmentTargetPropertyProperty;
682
+ interface AssignmentTargetPropertyIdentifier extends Span {
683
+ type: "Property";
684
+ kind: "init";
685
+ key: IdentifierReference;
686
+ value: IdentifierReference | AssignmentTargetWithDefault;
687
+ method: false;
688
+ shorthand: true;
689
+ computed: false;
690
+ optional?: false;
691
+ parent?: Node;
692
+ }
693
+ interface AssignmentTargetPropertyProperty extends Span {
694
+ type: "Property";
695
+ kind: "init";
696
+ key: PropertyKey;
697
+ value: AssignmentTargetMaybeDefault;
698
+ method: false;
699
+ shorthand: false;
700
+ computed: boolean;
701
+ optional?: false;
702
+ parent?: Node;
703
+ }
704
+ interface SequenceExpression extends Span {
705
+ type: "SequenceExpression";
706
+ expressions: Array<Expression>;
707
+ parent?: Node;
708
+ }
709
+ interface Super extends Span {
710
+ type: "Super";
711
+ parent?: Node;
712
+ }
713
+ interface AwaitExpression extends Span {
714
+ type: "AwaitExpression";
715
+ argument: Expression;
716
+ parent?: Node;
717
+ }
718
+ interface ChainExpression extends Span {
719
+ type: "ChainExpression";
720
+ expression: ChainElement;
721
+ parent?: Node;
722
+ }
723
+ type ChainElement = CallExpression | TSNonNullExpression | MemberExpression;
724
+ interface ParenthesizedExpression extends Span {
725
+ type: "ParenthesizedExpression";
726
+ expression: Expression;
727
+ parent?: Node;
728
+ }
729
+ type Statement = BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | IfStatement | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | WithStatement | Declaration | ModuleDeclaration;
730
+ interface Directive extends Span {
731
+ type: "ExpressionStatement";
732
+ expression: StringLiteral;
733
+ directive: string;
734
+ parent?: Node;
735
+ }
736
+ interface Hashbang extends Span {
737
+ type: "Hashbang";
738
+ value: string;
739
+ parent?: Node;
740
+ }
741
+ interface BlockStatement extends Span {
742
+ type: "BlockStatement";
743
+ body: Array<Statement>;
744
+ parent?: Node;
745
+ }
746
+ type Declaration = VariableDeclaration | Function | Class | TSTypeAliasDeclaration | TSInterfaceDeclaration | TSEnumDeclaration | TSModuleDeclaration | TSGlobalDeclaration | TSImportEqualsDeclaration;
747
+ interface VariableDeclaration extends Span {
748
+ type: "VariableDeclaration";
749
+ kind: VariableDeclarationKind;
750
+ declarations: Array<VariableDeclarator>;
751
+ declare?: boolean;
752
+ parent?: Node;
753
+ }
754
+ type VariableDeclarationKind = "var" | "let" | "const" | "using" | "await using";
755
+ interface VariableDeclarator extends Span {
756
+ type: "VariableDeclarator";
757
+ id: BindingPattern;
758
+ init: Expression | null;
759
+ definite?: boolean;
760
+ parent?: Node;
761
+ }
762
+ interface EmptyStatement extends Span {
763
+ type: "EmptyStatement";
764
+ parent?: Node;
765
+ }
766
+ interface ExpressionStatement extends Span {
767
+ type: "ExpressionStatement";
768
+ expression: Expression;
769
+ directive?: string | null;
770
+ parent?: Node;
771
+ }
772
+ interface IfStatement extends Span {
773
+ type: "IfStatement";
774
+ test: Expression;
775
+ consequent: Statement;
776
+ alternate: Statement | null;
777
+ parent?: Node;
778
+ }
779
+ interface DoWhileStatement extends Span {
780
+ type: "DoWhileStatement";
781
+ body: Statement;
782
+ test: Expression;
783
+ parent?: Node;
784
+ }
785
+ interface WhileStatement extends Span {
786
+ type: "WhileStatement";
787
+ test: Expression;
788
+ body: Statement;
789
+ parent?: Node;
790
+ }
791
+ interface ForStatement extends Span {
792
+ type: "ForStatement";
793
+ init: ForStatementInit | null;
794
+ test: Expression | null;
795
+ update: Expression | null;
796
+ body: Statement;
797
+ parent?: Node;
798
+ }
799
+ type ForStatementInit = VariableDeclaration | Expression;
800
+ interface ForInStatement extends Span {
801
+ type: "ForInStatement";
802
+ left: ForStatementLeft;
803
+ right: Expression;
804
+ body: Statement;
805
+ parent?: Node;
806
+ }
807
+ type ForStatementLeft = VariableDeclaration | AssignmentTarget;
808
+ interface ForOfStatement extends Span {
809
+ type: "ForOfStatement";
810
+ await: boolean;
811
+ left: ForStatementLeft;
812
+ right: Expression;
813
+ body: Statement;
814
+ parent?: Node;
815
+ }
816
+ interface ContinueStatement extends Span {
817
+ type: "ContinueStatement";
818
+ label: LabelIdentifier | null;
819
+ parent?: Node;
820
+ }
821
+ interface BreakStatement extends Span {
822
+ type: "BreakStatement";
823
+ label: LabelIdentifier | null;
824
+ parent?: Node;
825
+ }
826
+ interface ReturnStatement extends Span {
827
+ type: "ReturnStatement";
828
+ argument: Expression | null;
829
+ parent?: Node;
830
+ }
831
+ interface WithStatement extends Span {
832
+ type: "WithStatement";
833
+ object: Expression;
834
+ body: Statement;
835
+ parent?: Node;
836
+ }
837
+ interface SwitchStatement extends Span {
838
+ type: "SwitchStatement";
839
+ discriminant: Expression;
840
+ cases: Array<SwitchCase>;
841
+ parent?: Node;
842
+ }
843
+ interface SwitchCase extends Span {
844
+ type: "SwitchCase";
845
+ test: Expression | null;
846
+ consequent: Array<Statement>;
847
+ parent?: Node;
848
+ }
849
+ interface LabeledStatement extends Span {
850
+ type: "LabeledStatement";
851
+ label: LabelIdentifier;
852
+ body: Statement;
853
+ parent?: Node;
854
+ }
855
+ interface ThrowStatement extends Span {
856
+ type: "ThrowStatement";
857
+ argument: Expression;
858
+ parent?: Node;
859
+ }
860
+ interface TryStatement extends Span {
861
+ type: "TryStatement";
862
+ block: BlockStatement;
863
+ handler: CatchClause | null;
864
+ finalizer: BlockStatement | null;
865
+ parent?: Node;
866
+ }
867
+ interface CatchClause extends Span {
868
+ type: "CatchClause";
869
+ param: BindingPattern | null;
870
+ body: BlockStatement;
871
+ parent?: Node;
872
+ }
873
+ interface DebuggerStatement extends Span {
874
+ type: "DebuggerStatement";
875
+ parent?: Node;
876
+ }
877
+ type BindingPattern = BindingIdentifier | ObjectPattern | ArrayPattern | AssignmentPattern;
878
+ interface AssignmentPattern extends Span {
879
+ type: "AssignmentPattern";
880
+ decorators?: [];
881
+ left: BindingPattern;
882
+ right: Expression;
883
+ optional?: false;
884
+ typeAnnotation?: null;
885
+ parent?: Node;
886
+ }
887
+ interface ObjectPattern extends Span {
888
+ type: "ObjectPattern";
889
+ decorators?: [];
890
+ properties: Array<BindingProperty | BindingRestElement>;
891
+ optional?: false;
892
+ typeAnnotation?: null;
893
+ parent?: Node;
894
+ }
895
+ interface BindingProperty extends Span {
896
+ type: "Property";
897
+ kind: "init";
898
+ key: PropertyKey;
899
+ value: BindingPattern;
900
+ method: false;
901
+ shorthand: boolean;
902
+ computed: boolean;
903
+ optional?: false;
904
+ parent?: Node;
905
+ }
906
+ interface ArrayPattern extends Span {
907
+ type: "ArrayPattern";
908
+ decorators?: [];
909
+ elements: Array<BindingPattern | BindingRestElement | null>;
910
+ optional?: false;
911
+ typeAnnotation?: null;
912
+ parent?: Node;
913
+ }
914
+ interface BindingRestElement extends Span {
915
+ type: "RestElement";
916
+ decorators?: [];
917
+ argument: BindingPattern;
918
+ optional?: false;
919
+ typeAnnotation?: null;
920
+ value?: null;
921
+ parent?: Node;
922
+ }
923
+ interface Function extends Span {
924
+ type: FunctionType;
925
+ id: BindingIdentifier | null;
926
+ generator: boolean;
927
+ async: boolean;
928
+ declare?: boolean;
929
+ typeParameters?: TSTypeParameterDeclaration | null;
930
+ params: ParamPattern[];
931
+ returnType?: TSTypeAnnotation | null;
932
+ body: FunctionBody | null;
933
+ expression: false;
934
+ parent?: Node;
935
+ }
936
+ type ParamPattern = FormalParameter | TSParameterProperty | FormalParameterRest;
937
+ type FunctionType = "FunctionDeclaration" | "FunctionExpression" | "TSDeclareFunction" | "TSEmptyBodyFunctionExpression";
938
+ interface FormalParameterRest extends Span {
939
+ type: "RestElement";
940
+ argument: BindingPattern;
941
+ decorators?: [];
942
+ optional?: boolean;
943
+ typeAnnotation?: TSTypeAnnotation | null;
944
+ value?: null;
945
+ parent?: Node;
946
+ }
947
+ type FormalParameter = {
948
+ decorators?: Array<Decorator>;
949
+ } & BindingPattern;
950
+ interface TSParameterProperty extends Span {
951
+ type: "TSParameterProperty";
952
+ accessibility: TSAccessibility | null;
953
+ decorators: Array<Decorator>;
954
+ override: boolean;
955
+ parameter: FormalParameter;
956
+ readonly: boolean;
957
+ static: boolean;
958
+ parent?: Node;
959
+ }
960
+ interface FunctionBody extends Span {
961
+ type: "BlockStatement";
962
+ body: Array<Directive | Statement>;
963
+ parent?: Node;
964
+ }
965
+ interface ArrowFunctionExpression extends Span {
966
+ type: "ArrowFunctionExpression";
967
+ expression: boolean;
968
+ async: boolean;
969
+ typeParameters?: TSTypeParameterDeclaration | null;
970
+ params: ParamPattern[];
971
+ returnType?: TSTypeAnnotation | null;
972
+ body: FunctionBody | Expression;
973
+ id: null;
974
+ generator: false;
975
+ parent?: Node;
976
+ }
977
+ interface YieldExpression extends Span {
978
+ type: "YieldExpression";
979
+ delegate: boolean;
980
+ argument: Expression | null;
981
+ parent?: Node;
982
+ }
983
+ interface Class extends Span {
984
+ type: ClassType;
985
+ decorators: Array<Decorator>;
986
+ id: BindingIdentifier | null;
987
+ typeParameters?: TSTypeParameterDeclaration | null;
988
+ superClass: Expression | null;
989
+ superTypeArguments?: TSTypeParameterInstantiation | null;
990
+ implements?: Array<TSClassImplements>;
991
+ body: ClassBody;
992
+ abstract?: boolean;
993
+ declare?: boolean;
994
+ parent?: Node;
995
+ }
996
+ type ClassType = "ClassDeclaration" | "ClassExpression";
997
+ interface ClassBody extends Span {
998
+ type: "ClassBody";
999
+ body: Array<ClassElement>;
1000
+ parent?: Node;
1001
+ }
1002
+ type ClassElement = StaticBlock | MethodDefinition | PropertyDefinition | AccessorProperty | TSIndexSignature;
1003
+ interface MethodDefinition extends Span {
1004
+ type: MethodDefinitionType;
1005
+ decorators: Array<Decorator>;
1006
+ key: PropertyKey;
1007
+ value: Function;
1008
+ kind: MethodDefinitionKind;
1009
+ computed: boolean;
1010
+ static: boolean;
1011
+ override?: boolean;
1012
+ optional?: boolean;
1013
+ accessibility?: TSAccessibility | null;
1014
+ parent?: Node;
1015
+ }
1016
+ type MethodDefinitionType = "MethodDefinition" | "TSAbstractMethodDefinition";
1017
+ interface PropertyDefinition extends Span {
1018
+ type: PropertyDefinitionType;
1019
+ decorators: Array<Decorator>;
1020
+ key: PropertyKey;
1021
+ typeAnnotation?: TSTypeAnnotation | null;
1022
+ value: Expression | null;
1023
+ computed: boolean;
1024
+ static: boolean;
1025
+ declare?: boolean;
1026
+ override?: boolean;
1027
+ optional?: boolean;
1028
+ definite?: boolean;
1029
+ readonly?: boolean;
1030
+ accessibility?: TSAccessibility | null;
1031
+ parent?: Node;
1032
+ }
1033
+ type PropertyDefinitionType = "PropertyDefinition" | "TSAbstractPropertyDefinition";
1034
+ type MethodDefinitionKind = "constructor" | "method" | "get" | "set";
1035
+ interface PrivateIdentifier extends Span {
1036
+ type: "PrivateIdentifier";
1037
+ name: string;
1038
+ parent?: Node;
1039
+ }
1040
+ interface StaticBlock extends Span {
1041
+ type: "StaticBlock";
1042
+ body: Array<Statement>;
1043
+ parent?: Node;
1044
+ }
1045
+ type ModuleDeclaration = ImportDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | TSExportAssignment | TSNamespaceExportDeclaration;
1046
+ type AccessorPropertyType = "AccessorProperty" | "TSAbstractAccessorProperty";
1047
+ interface AccessorProperty extends Span {
1048
+ type: AccessorPropertyType;
1049
+ decorators: Array<Decorator>;
1050
+ key: PropertyKey;
1051
+ typeAnnotation?: TSTypeAnnotation | null;
1052
+ value: Expression | null;
1053
+ computed: boolean;
1054
+ static: boolean;
1055
+ override?: boolean;
1056
+ definite?: boolean;
1057
+ accessibility?: TSAccessibility | null;
1058
+ declare?: false;
1059
+ optional?: false;
1060
+ readonly?: false;
1061
+ parent?: Node;
1062
+ }
1063
+ interface ImportExpression extends Span {
1064
+ type: "ImportExpression";
1065
+ source: Expression;
1066
+ options: Expression | null;
1067
+ phase: ImportPhase | null;
1068
+ parent?: Node;
1069
+ }
1070
+ interface ImportDeclaration extends Span {
1071
+ type: "ImportDeclaration";
1072
+ specifiers: Array<ImportDeclarationSpecifier>;
1073
+ source: StringLiteral;
1074
+ phase: ImportPhase | null;
1075
+ attributes: Array<ImportAttribute>;
1076
+ importKind?: ImportOrExportKind;
1077
+ parent?: Node;
1078
+ }
1079
+ type ImportPhase = "source" | "defer";
1080
+ type ImportDeclarationSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier;
1081
+ interface ImportSpecifier extends Span {
1082
+ type: "ImportSpecifier";
1083
+ imported: ModuleExportName;
1084
+ local: BindingIdentifier;
1085
+ importKind?: ImportOrExportKind;
1086
+ parent?: Node;
1087
+ }
1088
+ interface ImportDefaultSpecifier extends Span {
1089
+ type: "ImportDefaultSpecifier";
1090
+ local: BindingIdentifier;
1091
+ parent?: Node;
1092
+ }
1093
+ interface ImportNamespaceSpecifier extends Span {
1094
+ type: "ImportNamespaceSpecifier";
1095
+ local: BindingIdentifier;
1096
+ parent?: Node;
1097
+ }
1098
+ interface ImportAttribute extends Span {
1099
+ type: "ImportAttribute";
1100
+ key: ImportAttributeKey;
1101
+ value: StringLiteral;
1102
+ parent?: Node;
1103
+ }
1104
+ type ImportAttributeKey = IdentifierName | StringLiteral;
1105
+ interface ExportNamedDeclaration extends Span {
1106
+ type: "ExportNamedDeclaration";
1107
+ declaration: Declaration | null;
1108
+ specifiers: Array<ExportSpecifier>;
1109
+ source: StringLiteral | null;
1110
+ exportKind?: ImportOrExportKind;
1111
+ attributes: Array<ImportAttribute>;
1112
+ parent?: Node;
1113
+ }
1114
+ interface ExportDefaultDeclaration extends Span {
1115
+ type: "ExportDefaultDeclaration";
1116
+ declaration: ExportDefaultDeclarationKind;
1117
+ exportKind?: "value";
1118
+ parent?: Node;
1119
+ }
1120
+ interface ExportAllDeclaration extends Span {
1121
+ type: "ExportAllDeclaration";
1122
+ exported: ModuleExportName | null;
1123
+ source: StringLiteral;
1124
+ attributes: Array<ImportAttribute>;
1125
+ exportKind?: ImportOrExportKind;
1126
+ parent?: Node;
1127
+ }
1128
+ interface ExportSpecifier extends Span {
1129
+ type: "ExportSpecifier";
1130
+ local: ModuleExportName;
1131
+ exported: ModuleExportName;
1132
+ exportKind?: ImportOrExportKind;
1133
+ parent?: Node;
1134
+ }
1135
+ type ExportDefaultDeclarationKind = Function | Class | TSInterfaceDeclaration | Expression;
1136
+ type ModuleExportName = IdentifierName | IdentifierReference | StringLiteral;
1137
+ interface V8IntrinsicExpression extends Span {
1138
+ type: "V8IntrinsicExpression";
1139
+ name: IdentifierName;
1140
+ arguments: Array<Argument>;
1141
+ parent?: Node;
1142
+ }
1143
+ interface BooleanLiteral extends Span {
1144
+ type: "Literal";
1145
+ value: boolean;
1146
+ raw: string | null;
1147
+ parent?: Node;
1148
+ }
1149
+ interface NullLiteral extends Span {
1150
+ type: "Literal";
1151
+ value: null;
1152
+ raw: "null" | null;
1153
+ parent?: Node;
1154
+ }
1155
+ interface NumericLiteral extends Span {
1156
+ type: "Literal";
1157
+ value: number;
1158
+ raw: string | null;
1159
+ parent?: Node;
1160
+ }
1161
+ interface StringLiteral extends Span {
1162
+ type: "Literal";
1163
+ value: string;
1164
+ raw: string | null;
1165
+ parent?: Node;
1166
+ }
1167
+ interface BigIntLiteral extends Span {
1168
+ type: "Literal";
1169
+ value: bigint;
1170
+ raw: string | null;
1171
+ bigint: string;
1172
+ parent?: Node;
1173
+ }
1174
+ interface RegExpLiteral extends Span {
1175
+ type: "Literal";
1176
+ value: RegExp | null;
1177
+ raw: string | null;
1178
+ regex: {
1179
+ pattern: string;
1180
+ flags: string;
1181
+ };
1182
+ parent?: Node;
1183
+ }
1184
+ interface JSXElement extends Span {
1185
+ type: "JSXElement";
1186
+ openingElement: JSXOpeningElement;
1187
+ children: Array<JSXChild>;
1188
+ closingElement: JSXClosingElement | null;
1189
+ parent?: Node;
1190
+ }
1191
+ interface JSXOpeningElement extends Span {
1192
+ type: "JSXOpeningElement";
1193
+ name: JSXElementName;
1194
+ typeArguments?: TSTypeParameterInstantiation | null;
1195
+ attributes: Array<JSXAttributeItem>;
1196
+ selfClosing: boolean;
1197
+ parent?: Node;
1198
+ }
1199
+ interface JSXClosingElement extends Span {
1200
+ type: "JSXClosingElement";
1201
+ name: JSXElementName;
1202
+ parent?: Node;
1203
+ }
1204
+ interface JSXFragment extends Span {
1205
+ type: "JSXFragment";
1206
+ openingFragment: JSXOpeningFragment;
1207
+ children: Array<JSXChild>;
1208
+ closingFragment: JSXClosingFragment;
1209
+ parent?: Node;
1210
+ }
1211
+ interface JSXOpeningFragment extends Span {
1212
+ type: "JSXOpeningFragment";
1213
+ attributes?: [];
1214
+ selfClosing?: false;
1215
+ parent?: Node;
1216
+ }
1217
+ interface JSXClosingFragment extends Span {
1218
+ type: "JSXClosingFragment";
1219
+ parent?: Node;
1220
+ }
1221
+ type JSXElementName = JSXIdentifier | JSXNamespacedName | JSXMemberExpression;
1222
+ interface JSXNamespacedName extends Span {
1223
+ type: "JSXNamespacedName";
1224
+ namespace: JSXIdentifier;
1225
+ name: JSXIdentifier;
1226
+ parent?: Node;
1227
+ }
1228
+ interface JSXMemberExpression extends Span {
1229
+ type: "JSXMemberExpression";
1230
+ object: JSXMemberExpressionObject;
1231
+ property: JSXIdentifier;
1232
+ parent?: Node;
1233
+ }
1234
+ type JSXMemberExpressionObject = JSXIdentifier | JSXMemberExpression;
1235
+ interface JSXExpressionContainer extends Span {
1236
+ type: "JSXExpressionContainer";
1237
+ expression: JSXExpression;
1238
+ parent?: Node;
1239
+ }
1240
+ type JSXExpression = JSXEmptyExpression | Expression;
1241
+ interface JSXEmptyExpression extends Span {
1242
+ type: "JSXEmptyExpression";
1243
+ parent?: Node;
1244
+ }
1245
+ type JSXAttributeItem = JSXAttribute | JSXSpreadAttribute;
1246
+ interface JSXAttribute extends Span {
1247
+ type: "JSXAttribute";
1248
+ name: JSXAttributeName;
1249
+ value: JSXAttributeValue | null;
1250
+ parent?: Node;
1251
+ }
1252
+ interface JSXSpreadAttribute extends Span {
1253
+ type: "JSXSpreadAttribute";
1254
+ argument: Expression;
1255
+ parent?: Node;
1256
+ }
1257
+ type JSXAttributeName = JSXIdentifier | JSXNamespacedName;
1258
+ type JSXAttributeValue = StringLiteral | JSXExpressionContainer | JSXElement | JSXFragment;
1259
+ interface JSXIdentifier extends Span {
1260
+ type: "JSXIdentifier";
1261
+ name: string;
1262
+ parent?: Node;
1263
+ }
1264
+ type JSXChild = JSXText | JSXElement | JSXFragment | JSXExpressionContainer | JSXSpreadChild;
1265
+ interface JSXSpreadChild extends Span {
1266
+ type: "JSXSpreadChild";
1267
+ expression: Expression;
1268
+ parent?: Node;
1269
+ }
1270
+ interface JSXText extends Span {
1271
+ type: "JSXText";
1272
+ value: string;
1273
+ raw: string | null;
1274
+ parent?: Node;
1275
+ }
1276
+ interface TSThisParameter extends Span {
1277
+ type: "Identifier";
1278
+ decorators: [];
1279
+ name: "this";
1280
+ optional: false;
1281
+ typeAnnotation: TSTypeAnnotation | null;
1282
+ parent?: Node;
1283
+ }
1284
+ interface TSEnumDeclaration extends Span {
1285
+ type: "TSEnumDeclaration";
1286
+ id: BindingIdentifier;
1287
+ body: TSEnumBody;
1288
+ const: boolean;
1289
+ declare: boolean;
1290
+ parent?: Node;
1291
+ }
1292
+ interface TSEnumBody extends Span {
1293
+ type: "TSEnumBody";
1294
+ members: Array<TSEnumMember>;
1295
+ parent?: Node;
1296
+ }
1297
+ interface TSEnumMember extends Span {
1298
+ type: "TSEnumMember";
1299
+ id: TSEnumMemberName;
1300
+ initializer: Expression | null;
1301
+ computed: boolean;
1302
+ parent?: Node;
1303
+ }
1304
+ type TSEnumMemberName = IdentifierName | StringLiteral | TemplateLiteral;
1305
+ interface TSTypeAnnotation extends Span {
1306
+ type: "TSTypeAnnotation";
1307
+ typeAnnotation: TSType;
1308
+ parent?: Node;
1309
+ }
1310
+ interface TSLiteralType extends Span {
1311
+ type: "TSLiteralType";
1312
+ literal: TSLiteral;
1313
+ parent?: Node;
1314
+ }
1315
+ type TSLiteral = BooleanLiteral | NumericLiteral | BigIntLiteral | StringLiteral | TemplateLiteral | UnaryExpression;
1316
+ 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;
1317
+ interface TSConditionalType extends Span {
1318
+ type: "TSConditionalType";
1319
+ checkType: TSType;
1320
+ extendsType: TSType;
1321
+ trueType: TSType;
1322
+ falseType: TSType;
1323
+ parent?: Node;
1324
+ }
1325
+ interface TSUnionType extends Span {
1326
+ type: "TSUnionType";
1327
+ types: Array<TSType>;
1328
+ parent?: Node;
1329
+ }
1330
+ interface TSIntersectionType extends Span {
1331
+ type: "TSIntersectionType";
1332
+ types: Array<TSType>;
1333
+ parent?: Node;
1334
+ }
1335
+ interface TSParenthesizedType extends Span {
1336
+ type: "TSParenthesizedType";
1337
+ typeAnnotation: TSType;
1338
+ parent?: Node;
1339
+ }
1340
+ interface TSTypeOperator extends Span {
1341
+ type: "TSTypeOperator";
1342
+ operator: TSTypeOperatorOperator;
1343
+ typeAnnotation: TSType;
1344
+ parent?: Node;
1345
+ }
1346
+ type TSTypeOperatorOperator = "keyof" | "unique" | "readonly";
1347
+ interface TSArrayType extends Span {
1348
+ type: "TSArrayType";
1349
+ elementType: TSType;
1350
+ parent?: Node;
1351
+ }
1352
+ interface TSIndexedAccessType extends Span {
1353
+ type: "TSIndexedAccessType";
1354
+ objectType: TSType;
1355
+ indexType: TSType;
1356
+ parent?: Node;
1357
+ }
1358
+ interface TSTupleType extends Span {
1359
+ type: "TSTupleType";
1360
+ elementTypes: Array<TSTupleElement>;
1361
+ parent?: Node;
1362
+ }
1363
+ interface TSNamedTupleMember extends Span {
1364
+ type: "TSNamedTupleMember";
1365
+ label: IdentifierName;
1366
+ elementType: TSTupleElement;
1367
+ optional: boolean;
1368
+ parent?: Node;
1369
+ }
1370
+ interface TSOptionalType extends Span {
1371
+ type: "TSOptionalType";
1372
+ typeAnnotation: TSType;
1373
+ parent?: Node;
1374
+ }
1375
+ interface TSRestType extends Span {
1376
+ type: "TSRestType";
1377
+ typeAnnotation: TSType;
1378
+ parent?: Node;
1379
+ }
1380
+ type TSTupleElement = TSOptionalType | TSRestType | TSType;
1381
+ interface TSAnyKeyword extends Span {
1382
+ type: "TSAnyKeyword";
1383
+ parent?: Node;
1384
+ }
1385
+ interface TSStringKeyword extends Span {
1386
+ type: "TSStringKeyword";
1387
+ parent?: Node;
1388
+ }
1389
+ interface TSBooleanKeyword extends Span {
1390
+ type: "TSBooleanKeyword";
1391
+ parent?: Node;
1392
+ }
1393
+ interface TSNumberKeyword extends Span {
1394
+ type: "TSNumberKeyword";
1395
+ parent?: Node;
1396
+ }
1397
+ interface TSNeverKeyword extends Span {
1398
+ type: "TSNeverKeyword";
1399
+ parent?: Node;
1400
+ }
1401
+ interface TSIntrinsicKeyword extends Span {
1402
+ type: "TSIntrinsicKeyword";
1403
+ parent?: Node;
1404
+ }
1405
+ interface TSUnknownKeyword extends Span {
1406
+ type: "TSUnknownKeyword";
1407
+ parent?: Node;
1408
+ }
1409
+ interface TSNullKeyword extends Span {
1410
+ type: "TSNullKeyword";
1411
+ parent?: Node;
1412
+ }
1413
+ interface TSUndefinedKeyword extends Span {
1414
+ type: "TSUndefinedKeyword";
1415
+ parent?: Node;
1416
+ }
1417
+ interface TSVoidKeyword extends Span {
1418
+ type: "TSVoidKeyword";
1419
+ parent?: Node;
1420
+ }
1421
+ interface TSSymbolKeyword extends Span {
1422
+ type: "TSSymbolKeyword";
1423
+ parent?: Node;
1424
+ }
1425
+ interface TSThisType extends Span {
1426
+ type: "TSThisType";
1427
+ parent?: Node;
1428
+ }
1429
+ interface TSObjectKeyword extends Span {
1430
+ type: "TSObjectKeyword";
1431
+ parent?: Node;
1432
+ }
1433
+ interface TSBigIntKeyword extends Span {
1434
+ type: "TSBigIntKeyword";
1435
+ parent?: Node;
1436
+ }
1437
+ interface TSTypeReference extends Span {
1438
+ type: "TSTypeReference";
1439
+ typeName: TSTypeName;
1440
+ typeArguments: TSTypeParameterInstantiation | null;
1441
+ parent?: Node;
1442
+ }
1443
+ type TSTypeName = IdentifierReference | TSQualifiedName | ThisExpression;
1444
+ interface TSQualifiedName extends Span {
1445
+ type: "TSQualifiedName";
1446
+ left: TSTypeName;
1447
+ right: IdentifierName;
1448
+ parent?: Node;
1449
+ }
1450
+ interface TSTypeParameterInstantiation extends Span {
1451
+ type: "TSTypeParameterInstantiation";
1452
+ params: Array<TSType>;
1453
+ parent?: Node;
1454
+ }
1455
+ interface TSTypeParameter extends Span {
1456
+ type: "TSTypeParameter";
1457
+ name: BindingIdentifier;
1458
+ constraint: TSType | null;
1459
+ default: TSType | null;
1460
+ in: boolean;
1461
+ out: boolean;
1462
+ const: boolean;
1463
+ parent?: Node;
1464
+ }
1465
+ interface TSTypeParameterDeclaration extends Span {
1466
+ type: "TSTypeParameterDeclaration";
1467
+ params: Array<TSTypeParameter>;
1468
+ parent?: Node;
1469
+ }
1470
+ interface TSTypeAliasDeclaration extends Span {
1471
+ type: "TSTypeAliasDeclaration";
1472
+ id: BindingIdentifier;
1473
+ typeParameters: TSTypeParameterDeclaration | null;
1474
+ typeAnnotation: TSType;
1475
+ declare: boolean;
1476
+ parent?: Node;
1477
+ }
1478
+ type TSAccessibility = "private" | "protected" | "public";
1479
+ interface TSClassImplements extends Span {
1480
+ type: "TSClassImplements";
1481
+ expression: IdentifierReference | ThisExpression | MemberExpression;
1482
+ typeArguments: TSTypeParameterInstantiation | null;
1483
+ parent?: Node;
1484
+ }
1485
+ interface TSInterfaceDeclaration extends Span {
1486
+ type: "TSInterfaceDeclaration";
1487
+ id: BindingIdentifier;
1488
+ typeParameters: TSTypeParameterDeclaration | null;
1489
+ extends: Array<TSInterfaceHeritage>;
1490
+ body: TSInterfaceBody;
1491
+ declare: boolean;
1492
+ parent?: Node;
1493
+ }
1494
+ interface TSInterfaceBody extends Span {
1495
+ type: "TSInterfaceBody";
1496
+ body: Array<TSSignature>;
1497
+ parent?: Node;
1498
+ }
1499
+ interface TSPropertySignature extends Span {
1500
+ type: "TSPropertySignature";
1501
+ computed: boolean;
1502
+ optional: boolean;
1503
+ readonly: boolean;
1504
+ key: PropertyKey;
1505
+ typeAnnotation: TSTypeAnnotation | null;
1506
+ accessibility: null;
1507
+ static: false;
1508
+ parent?: Node;
1509
+ }
1510
+ type TSSignature = TSIndexSignature | TSPropertySignature | TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSMethodSignature;
1511
+ interface TSIndexSignature extends Span {
1512
+ type: "TSIndexSignature";
1513
+ parameters: Array<TSIndexSignatureName>;
1514
+ typeAnnotation: TSTypeAnnotation;
1515
+ readonly: boolean;
1516
+ static: boolean;
1517
+ accessibility: null;
1518
+ parent?: Node;
1519
+ }
1520
+ interface TSCallSignatureDeclaration extends Span {
1521
+ type: "TSCallSignatureDeclaration";
1522
+ typeParameters: TSTypeParameterDeclaration | null;
1523
+ params: ParamPattern[];
1524
+ returnType: TSTypeAnnotation | null;
1525
+ parent?: Node;
1526
+ }
1527
+ type TSMethodSignatureKind = "method" | "get" | "set";
1528
+ interface TSMethodSignature extends Span {
1529
+ type: "TSMethodSignature";
1530
+ key: PropertyKey;
1531
+ computed: boolean;
1532
+ optional: boolean;
1533
+ kind: TSMethodSignatureKind;
1534
+ typeParameters: TSTypeParameterDeclaration | null;
1535
+ params: ParamPattern[];
1536
+ returnType: TSTypeAnnotation | null;
1537
+ accessibility: null;
1538
+ readonly: false;
1539
+ static: false;
1540
+ parent?: Node;
1541
+ }
1542
+ interface TSConstructSignatureDeclaration extends Span {
1543
+ type: "TSConstructSignatureDeclaration";
1544
+ typeParameters: TSTypeParameterDeclaration | null;
1545
+ params: ParamPattern[];
1546
+ returnType: TSTypeAnnotation | null;
1547
+ parent?: Node;
1548
+ }
1549
+ interface TSIndexSignatureName extends Span {
1550
+ type: "Identifier";
1551
+ decorators: [];
1552
+ name: string;
1553
+ optional: false;
1554
+ typeAnnotation: TSTypeAnnotation;
1555
+ parent?: Node;
1556
+ }
1557
+ interface TSInterfaceHeritage extends Span {
1558
+ type: "TSInterfaceHeritage";
1559
+ expression: Expression;
1560
+ typeArguments: TSTypeParameterInstantiation | null;
1561
+ parent?: Node;
1562
+ }
1563
+ interface TSTypePredicate extends Span {
1564
+ type: "TSTypePredicate";
1565
+ parameterName: TSTypePredicateName;
1566
+ asserts: boolean;
1567
+ typeAnnotation: TSTypeAnnotation | null;
1568
+ parent?: Node;
1569
+ }
1570
+ type TSTypePredicateName = IdentifierName | TSThisType;
1571
+ interface TSModuleDeclaration extends Span {
1572
+ type: "TSModuleDeclaration";
1573
+ id: BindingIdentifier | StringLiteral | TSQualifiedName;
1574
+ body: TSModuleBlock | null;
1575
+ kind: TSModuleDeclarationKind;
1576
+ declare: boolean;
1577
+ global: false;
1578
+ parent?: Node;
1579
+ }
1580
+ type TSModuleDeclarationKind = "module" | "namespace";
1581
+ interface TSGlobalDeclaration extends Span {
1582
+ type: "TSModuleDeclaration";
1583
+ id: IdentifierName;
1584
+ body: TSModuleBlock;
1585
+ kind: "global";
1586
+ declare: boolean;
1587
+ global: true;
1588
+ parent?: Node;
1589
+ }
1590
+ interface TSModuleBlock extends Span {
1591
+ type: "TSModuleBlock";
1592
+ body: Array<Directive | Statement>;
1593
+ parent?: Node;
1594
+ }
1595
+ interface TSTypeLiteral extends Span {
1596
+ type: "TSTypeLiteral";
1597
+ members: Array<TSSignature>;
1598
+ parent?: Node;
1599
+ }
1600
+ interface TSInferType extends Span {
1601
+ type: "TSInferType";
1602
+ typeParameter: TSTypeParameter;
1603
+ parent?: Node;
1604
+ }
1605
+ interface TSTypeQuery extends Span {
1606
+ type: "TSTypeQuery";
1607
+ exprName: TSTypeQueryExprName;
1608
+ typeArguments: TSTypeParameterInstantiation | null;
1609
+ parent?: Node;
1610
+ }
1611
+ type TSTypeQueryExprName = TSImportType | TSTypeName;
1612
+ interface TSImportType extends Span {
1613
+ type: "TSImportType";
1614
+ source: StringLiteral;
1615
+ options: ObjectExpression | null;
1616
+ qualifier: TSImportTypeQualifier | null;
1617
+ typeArguments: TSTypeParameterInstantiation | null;
1618
+ parent?: Node;
1619
+ }
1620
+ type TSImportTypeQualifier = IdentifierName | TSImportTypeQualifiedName;
1621
+ interface TSImportTypeQualifiedName extends Span {
1622
+ type: "TSQualifiedName";
1623
+ left: TSImportTypeQualifier;
1624
+ right: IdentifierName;
1625
+ parent?: Node;
1626
+ }
1627
+ interface TSFunctionType extends Span {
1628
+ type: "TSFunctionType";
1629
+ typeParameters: TSTypeParameterDeclaration | null;
1630
+ params: ParamPattern[];
1631
+ returnType: TSTypeAnnotation;
1632
+ parent?: Node;
1633
+ }
1634
+ interface TSConstructorType extends Span {
1635
+ type: "TSConstructorType";
1636
+ abstract: boolean;
1637
+ typeParameters: TSTypeParameterDeclaration | null;
1638
+ params: ParamPattern[];
1639
+ returnType: TSTypeAnnotation;
1640
+ parent?: Node;
1641
+ }
1642
+ interface TSMappedType extends Span {
1643
+ type: "TSMappedType";
1644
+ key: BindingIdentifier;
1645
+ constraint: TSType;
1646
+ nameType: TSType | null;
1647
+ typeAnnotation: TSType | null;
1648
+ optional: TSMappedTypeModifierOperator | false;
1649
+ readonly: TSMappedTypeModifierOperator | null;
1650
+ parent?: Node;
1651
+ }
1652
+ type TSMappedTypeModifierOperator = true | "+" | "-";
1653
+ interface TSTemplateLiteralType extends Span {
1654
+ type: "TSTemplateLiteralType";
1655
+ quasis: Array<TemplateElement>;
1656
+ types: Array<TSType>;
1657
+ parent?: Node;
1658
+ }
1659
+ interface TSAsExpression extends Span {
1660
+ type: "TSAsExpression";
1661
+ expression: Expression;
1662
+ typeAnnotation: TSType;
1663
+ parent?: Node;
1664
+ }
1665
+ interface TSSatisfiesExpression extends Span {
1666
+ type: "TSSatisfiesExpression";
1667
+ expression: Expression;
1668
+ typeAnnotation: TSType;
1669
+ parent?: Node;
1670
+ }
1671
+ interface TSTypeAssertion extends Span {
1672
+ type: "TSTypeAssertion";
1673
+ typeAnnotation: TSType;
1674
+ expression: Expression;
1675
+ parent?: Node;
1676
+ }
1677
+ interface TSImportEqualsDeclaration extends Span {
1678
+ type: "TSImportEqualsDeclaration";
1679
+ id: BindingIdentifier;
1680
+ moduleReference: TSModuleReference;
1681
+ importKind: ImportOrExportKind;
1682
+ parent?: Node;
1683
+ }
1684
+ type TSModuleReference = TSExternalModuleReference | IdentifierReference | TSQualifiedName;
1685
+ interface TSExternalModuleReference extends Span {
1686
+ type: "TSExternalModuleReference";
1687
+ expression: StringLiteral;
1688
+ parent?: Node;
1689
+ }
1690
+ interface TSNonNullExpression extends Span {
1691
+ type: "TSNonNullExpression";
1692
+ expression: Expression;
1693
+ parent?: Node;
1694
+ }
1695
+ interface Decorator extends Span {
1696
+ type: "Decorator";
1697
+ expression: Expression;
1698
+ parent?: Node;
1699
+ }
1700
+ interface TSExportAssignment extends Span {
1701
+ type: "TSExportAssignment";
1702
+ expression: Expression;
1703
+ parent?: Node;
1704
+ }
1705
+ interface TSNamespaceExportDeclaration extends Span {
1706
+ type: "TSNamespaceExportDeclaration";
1707
+ id: IdentifierName;
1708
+ parent?: Node;
1709
+ }
1710
+ interface TSInstantiationExpression extends Span {
1711
+ type: "TSInstantiationExpression";
1712
+ expression: Expression;
1713
+ typeArguments: TSTypeParameterInstantiation;
1714
+ parent?: Node;
1715
+ }
1716
+ type ImportOrExportKind = "value" | "type";
1717
+ interface JSDocNullableType extends Span {
1718
+ type: "TSJSDocNullableType";
1719
+ typeAnnotation: TSType;
1720
+ postfix: boolean;
1721
+ parent?: Node;
1722
+ }
1723
+ interface JSDocNonNullableType extends Span {
1724
+ type: "TSJSDocNonNullableType";
1725
+ typeAnnotation: TSType;
1726
+ postfix: boolean;
1727
+ parent?: Node;
1728
+ }
1729
+ interface JSDocUnknownType extends Span {
1730
+ type: "TSJSDocUnknownType";
1731
+ parent?: Node;
1732
+ }
1733
+ type ModuleKind = "script" | "module" | "commonjs";
1734
+ interface Span {
1735
+ start: number;
1736
+ end: number;
1737
+ range?: [number, number];
1738
+ }
1739
+ type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "||=" | "&&=" | "??=";
1740
+ type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "+" | "-" | "*" | "/" | "%" | "**" | "<<" | ">>" | ">>>" | "|" | "^" | "&" | "in" | "instanceof";
1741
+ type LogicalOperator = "||" | "&&" | "??";
1742
+ type UnaryOperator = "+" | "-" | "!" | "~" | "typeof" | "void" | "delete";
1743
+ type UpdateOperator = "++" | "--";
1744
+ 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;
1745
+ //#endregion
1746
+ //#region src/core/rules/lint/utils/oxc-node-type.d.ts
1747
+ type OxcNodeType = Node["type"];
1748
+ //#endregion
1749
+ //#region src/core/rules/lint/utils/es-tree-literal-node.d.ts
1750
+ interface EsTreeLiteralNode {
1751
+ type: "Literal" | "StringLiteral";
1752
+ value?: string | number | boolean | RegExp | null;
1753
+ raw?: string;
1754
+ parent?: EsTreeNode | null;
1755
+ [key: string]: any;
1756
+ }
1757
+ //#endregion
1758
+ //#region src/core/rules/lint/utils/es-tree-node-type.d.ts
1759
+ type EsTreeNodeType = OxcNodeType | EsTreeLiteralNode["type"] | EsTreeImportNode["type"];
1760
+ //#endregion
1761
+ //#region src/core/rules/lint/utils/es-tree-node.d.ts
1762
+ interface EsTreeNode {
1763
+ type: EsTreeNodeType;
1764
+ parent?: EsTreeNode | null;
1765
+ [key: string]: any;
1766
+ }
1767
+ //#endregion
1768
+ //#region src/core/rules/lint/utils/es-tree-import-node.d.ts
1769
+ interface EsTreeImportNode {
1770
+ type: "Import";
1771
+ parent?: EsTreeNode | null;
1772
+ [key: string]: any;
1773
+ }
1774
+ //#endregion
1775
+ //#region src/core/rules/lint/utils/report-descriptor.d.ts
1776
+ interface ReportDescriptor {
1777
+ node: EsTreeNode;
1778
+ message: string;
1779
+ }
1780
+ //#endregion
1781
+ //#region src/core/rules/lint/utils/rule-context.d.ts
1782
+ interface RuleContext {
1783
+ report: (descriptor: ReportDescriptor) => void;
1784
+ getFilename?: () => string;
1785
+ }
1786
+ //#endregion
1787
+ //#region src/core/rules/lint/utils/rule-visitors.d.ts
1788
+ interface RuleVisitors {
1789
+ [selector: string]: ((node: EsTreeNode) => void) | (() => void);
1790
+ }
1791
+ //#endregion
1792
+ //#region src/core/rules/index.d.ts
1793
+ declare const coreRules: ReactDoctorRule[];
1794
+ declare const createRuleRegistry: (options?: RuleRegistryOptions) => ReactDoctorRuleRegistry;
1795
+ declare const ruleRegistry: ReactDoctorRuleRegistry;
1796
+ //#endregion
1797
+ export { ReactProjectFramework as A, ReactDoctorIssue as C, ReactDoctorResult as D, ReactDoctorJsonReportSummary as E, SourceLocation as M, ReactDoctorRuleSelection as O, ReactDoctorIgnoreOverride as S, ReactDoctorJsonReport as T, LoadedReactDoctorConfig as _, RuleContext as a, ReactDoctorFailOnLevel as b, ReactDoctorRuleRegistry as c, ReactDoctorRule as d, ReactDoctorRuleContext as f, InspectReactProjectOptions as g, ReactDoctorRuleResult as h, RuleVisitors as i, ReactProjectInfo as j, ReactDoctorScore as k, RuleRegistryOptions as l, ReactDoctorRuleMetadata as m, createRuleRegistry as n, EsTreeNode as o, ReactDoctorRuleExample as p, ruleRegistry as r, reactProjectStructureRule as s, coreRules as t, defineRule as u, ReactDoctorCheckResult as v, ReactDoctorIssueSource as w, ReactDoctorIgnoreConfig as x, ReactDoctorConfig as y };
1798
+ //# sourceMappingURL=index-CFzh1cBi.d.ts.map