@eslint-react/core 1.17.2-next.4 → 1.17.2-next.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,12 +1,14 @@
1
1
  import * as AST from '@eslint-react/ast';
2
2
  import { O } from '@eslint-react/tools';
3
3
  import { TSESTree } from '@typescript-eslint/types';
4
+ import * as _eslint_react_types from '@eslint-react/types';
4
5
  import { RuleContext } from '@eslint-react/types';
5
6
  import { TSESTree as TSESTree$1 } from '@typescript-eslint/utils';
6
7
  import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
7
8
  import { ESLintReactSettings } from '@eslint-react/shared';
8
9
  import { Scope } from '@typescript-eslint/scope-manager';
9
10
  import * as birecord from 'birecord';
11
+ import { SyntaxKind } from 'typescript';
10
12
 
11
13
  interface ERSemanticNode {
12
14
  _: string;
@@ -250,7 +252,7 @@ declare function isCallFromReactMember(pragmaMemberName: string, name: string):
250
252
  * @param settings ESLint React settings
251
253
  * @returns Whether the identifier is initialized from React
252
254
  */
253
- declare function isInitializedFromReact(name: string, initialScope: Scope, settings: Partial<Pick<ESLintReactSettings, "importSource" | "strictImportCheck">>): boolean;
255
+ declare function isInitializedFromReact(name: string, initialScope: Scope, settings: ESLintReactSettings): boolean;
254
256
 
255
257
  declare function isReactAPIWithName(name: string): ReturnType<typeof isFromReact>;
256
258
  declare function isReactAPIWithName(name: string, member: string): ReturnType<typeof isFromReactMember>;
@@ -268,34 +270,2047 @@ declare const isInversePhase: {
268
270
  (a: ERPhaseKind): (b: ERPhaseKind) => boolean;
269
271
  (a: ERPhaseKind, b: ERPhaseKind): boolean;
270
272
  };
271
- declare function getPhaseKindOfFunction(node: AST.TSESTreeFunction): O.Option<ERPhaseKind>;
272
-
273
- type A = (node: TSESTree.Identifier | TSESTree.MemberExpression, context: RuleContext) => boolean;
274
- type B = (node: TSESTree.MemberExpression, context: RuleContext, pragma?: string) => boolean;
275
- type X = (node: TSESTree.CallExpression, context: RuleContext) => boolean;
276
- type Y = (node: TSESTree.CallExpression, context: RuleContext, pragma?: string) => boolean;
277
- declare const isChildrenCount: B;
278
- declare const isChildrenForEach: B;
279
- declare const isChildrenMap: B;
280
- declare const isChildrenOnly: B;
281
- declare const isChildrenToArray: B;
282
- declare const isCloneElement: A;
283
- declare const isCreateContext: A;
284
- declare const isCreateElement: A;
285
- declare const isCreateRef: A;
286
- declare const isForwardRef: A;
287
- declare const isMemo: A;
288
- declare const isChildrenCountCall: Y;
289
- declare const isChildrenForEachCall: Y;
290
- declare const isChildrenMapCall: Y;
291
- declare const isChildrenOnlyCall: Y;
292
- declare const isChildrenToArrayCall: Y;
293
- declare const isCloneElementCall: X;
294
- declare const isCreateContextCall: X;
295
- declare const isCreateElementCall: X;
296
- declare const isCreateRefCall: X;
297
- declare const isForwardRefCall: X;
298
- declare const isMemoCall: X;
273
+
274
+ /**********************************************
275
+ * DO NOT MODIFY THIS FILE MANUALLY *
276
+ * *
277
+ * THIS FILE HAS BEEN COPIED FROM ast-spec. *
278
+ * ANY CHANGES WILL BE LOST ON THE NEXT BUILD *
279
+ * *
280
+ * MAKE CHANGES TO ast-spec AND THEN RUN *
281
+ * yarn build *
282
+ **********************************************/
283
+
284
+ declare type Accessibility = 'private' | 'protected' | 'public';
285
+ declare type AccessorProperty = AccessorPropertyComputedName | AccessorPropertyNonComputedName;
286
+ declare interface AccessorPropertyComputedName extends PropertyDefinitionComputedNameBase {
287
+ type: AST_NODE_TYPES.AccessorProperty;
288
+ }
289
+ declare interface AccessorPropertyNonComputedName extends PropertyDefinitionNonComputedNameBase {
290
+ type: AST_NODE_TYPES.AccessorProperty;
291
+ }
292
+ declare interface ArrayExpression extends BaseNode {
293
+ type: AST_NODE_TYPES.ArrayExpression;
294
+ /**
295
+ * an element will be `null` in the case of a sparse array: `[1, ,3]`
296
+ */
297
+ elements: (Expression | SpreadElement | null)[];
298
+ }
299
+ declare interface ArrayPattern extends BaseNode {
300
+ type: AST_NODE_TYPES.ArrayPattern;
301
+ decorators: Decorator[];
302
+ elements: (DestructuringPattern | null)[];
303
+ optional: boolean;
304
+ typeAnnotation: TSTypeAnnotation | undefined;
305
+ }
306
+ declare interface ArrowFunctionExpression extends BaseNode {
307
+ type: AST_NODE_TYPES.ArrowFunctionExpression;
308
+ async: boolean;
309
+ body: BlockStatement | Expression;
310
+ expression: boolean;
311
+ generator: boolean;
312
+ id: null;
313
+ params: Parameter[];
314
+ returnType: TSTypeAnnotation | undefined;
315
+ typeParameters: TSTypeParameterDeclaration | undefined;
316
+ }
317
+ declare interface AssignmentExpression extends BaseNode {
318
+ type: AST_NODE_TYPES.AssignmentExpression;
319
+ left: Expression;
320
+ operator: ValueOf<AssignmentOperatorToText>;
321
+ right: Expression;
322
+ }
323
+ declare interface AssignmentOperatorToText {
324
+ [SyntaxKind.AmpersandAmpersandEqualsToken]: '&&=';
325
+ [SyntaxKind.AmpersandEqualsToken]: '&=';
326
+ [SyntaxKind.AsteriskAsteriskEqualsToken]: '**=';
327
+ [SyntaxKind.AsteriskEqualsToken]: '*=';
328
+ [SyntaxKind.BarBarEqualsToken]: '||=';
329
+ [SyntaxKind.BarEqualsToken]: '|=';
330
+ [SyntaxKind.CaretEqualsToken]: '^=';
331
+ [SyntaxKind.EqualsToken]: '=';
332
+ [SyntaxKind.GreaterThanGreaterThanEqualsToken]: '>>=';
333
+ [SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken]: '>>>=';
334
+ [SyntaxKind.LessThanLessThanEqualsToken]: '<<=';
335
+ [SyntaxKind.MinusEqualsToken]: '-=';
336
+ [SyntaxKind.PercentEqualsToken]: '%=';
337
+ [SyntaxKind.PlusEqualsToken]: '+=';
338
+ [SyntaxKind.QuestionQuestionEqualsToken]: '??=';
339
+ [SyntaxKind.SlashEqualsToken]: '/=';
340
+ }
341
+ declare interface AssignmentPattern extends BaseNode {
342
+ type: AST_NODE_TYPES.AssignmentPattern;
343
+ decorators: Decorator[];
344
+ left: BindingName;
345
+ optional: boolean;
346
+ right: Expression;
347
+ typeAnnotation: TSTypeAnnotation | undefined;
348
+ }
349
+ declare enum AST_NODE_TYPES {
350
+ AccessorProperty = "AccessorProperty",
351
+ ArrayExpression = "ArrayExpression",
352
+ ArrayPattern = "ArrayPattern",
353
+ ArrowFunctionExpression = "ArrowFunctionExpression",
354
+ AssignmentExpression = "AssignmentExpression",
355
+ AssignmentPattern = "AssignmentPattern",
356
+ AwaitExpression = "AwaitExpression",
357
+ BinaryExpression = "BinaryExpression",
358
+ BlockStatement = "BlockStatement",
359
+ BreakStatement = "BreakStatement",
360
+ CallExpression = "CallExpression",
361
+ CatchClause = "CatchClause",
362
+ ChainExpression = "ChainExpression",
363
+ ClassBody = "ClassBody",
364
+ ClassDeclaration = "ClassDeclaration",
365
+ ClassExpression = "ClassExpression",
366
+ ConditionalExpression = "ConditionalExpression",
367
+ ContinueStatement = "ContinueStatement",
368
+ DebuggerStatement = "DebuggerStatement",
369
+ Decorator = "Decorator",
370
+ DoWhileStatement = "DoWhileStatement",
371
+ EmptyStatement = "EmptyStatement",
372
+ ExportAllDeclaration = "ExportAllDeclaration",
373
+ ExportDefaultDeclaration = "ExportDefaultDeclaration",
374
+ ExportNamedDeclaration = "ExportNamedDeclaration",
375
+ ExportSpecifier = "ExportSpecifier",
376
+ ExpressionStatement = "ExpressionStatement",
377
+ ForInStatement = "ForInStatement",
378
+ ForOfStatement = "ForOfStatement",
379
+ ForStatement = "ForStatement",
380
+ FunctionDeclaration = "FunctionDeclaration",
381
+ FunctionExpression = "FunctionExpression",
382
+ Identifier = "Identifier",
383
+ IfStatement = "IfStatement",
384
+ ImportAttribute = "ImportAttribute",
385
+ ImportDeclaration = "ImportDeclaration",
386
+ ImportDefaultSpecifier = "ImportDefaultSpecifier",
387
+ ImportExpression = "ImportExpression",
388
+ ImportNamespaceSpecifier = "ImportNamespaceSpecifier",
389
+ ImportSpecifier = "ImportSpecifier",
390
+ JSXAttribute = "JSXAttribute",
391
+ JSXClosingElement = "JSXClosingElement",
392
+ JSXClosingFragment = "JSXClosingFragment",
393
+ JSXElement = "JSXElement",
394
+ JSXEmptyExpression = "JSXEmptyExpression",
395
+ JSXExpressionContainer = "JSXExpressionContainer",
396
+ JSXFragment = "JSXFragment",
397
+ JSXIdentifier = "JSXIdentifier",
398
+ JSXMemberExpression = "JSXMemberExpression",
399
+ JSXNamespacedName = "JSXNamespacedName",
400
+ JSXOpeningElement = "JSXOpeningElement",
401
+ JSXOpeningFragment = "JSXOpeningFragment",
402
+ JSXSpreadAttribute = "JSXSpreadAttribute",
403
+ JSXSpreadChild = "JSXSpreadChild",
404
+ JSXText = "JSXText",
405
+ LabeledStatement = "LabeledStatement",
406
+ Literal = "Literal",
407
+ LogicalExpression = "LogicalExpression",
408
+ MemberExpression = "MemberExpression",
409
+ MetaProperty = "MetaProperty",
410
+ MethodDefinition = "MethodDefinition",
411
+ NewExpression = "NewExpression",
412
+ ObjectExpression = "ObjectExpression",
413
+ ObjectPattern = "ObjectPattern",
414
+ PrivateIdentifier = "PrivateIdentifier",
415
+ Program = "Program",
416
+ Property = "Property",
417
+ PropertyDefinition = "PropertyDefinition",
418
+ RestElement = "RestElement",
419
+ ReturnStatement = "ReturnStatement",
420
+ SequenceExpression = "SequenceExpression",
421
+ SpreadElement = "SpreadElement",
422
+ StaticBlock = "StaticBlock",
423
+ Super = "Super",
424
+ SwitchCase = "SwitchCase",
425
+ SwitchStatement = "SwitchStatement",
426
+ TaggedTemplateExpression = "TaggedTemplateExpression",
427
+ TemplateElement = "TemplateElement",
428
+ TemplateLiteral = "TemplateLiteral",
429
+ ThisExpression = "ThisExpression",
430
+ ThrowStatement = "ThrowStatement",
431
+ TryStatement = "TryStatement",
432
+ UnaryExpression = "UnaryExpression",
433
+ UpdateExpression = "UpdateExpression",
434
+ VariableDeclaration = "VariableDeclaration",
435
+ VariableDeclarator = "VariableDeclarator",
436
+ WhileStatement = "WhileStatement",
437
+ WithStatement = "WithStatement",
438
+ YieldExpression = "YieldExpression",
439
+ TSAbstractAccessorProperty = "TSAbstractAccessorProperty",
440
+ TSAbstractKeyword = "TSAbstractKeyword",
441
+ TSAbstractMethodDefinition = "TSAbstractMethodDefinition",
442
+ TSAbstractPropertyDefinition = "TSAbstractPropertyDefinition",
443
+ TSAnyKeyword = "TSAnyKeyword",
444
+ TSArrayType = "TSArrayType",
445
+ TSAsExpression = "TSAsExpression",
446
+ TSAsyncKeyword = "TSAsyncKeyword",
447
+ TSBigIntKeyword = "TSBigIntKeyword",
448
+ TSBooleanKeyword = "TSBooleanKeyword",
449
+ TSCallSignatureDeclaration = "TSCallSignatureDeclaration",
450
+ TSClassImplements = "TSClassImplements",
451
+ TSConditionalType = "TSConditionalType",
452
+ TSConstructorType = "TSConstructorType",
453
+ TSConstructSignatureDeclaration = "TSConstructSignatureDeclaration",
454
+ TSDeclareFunction = "TSDeclareFunction",
455
+ TSDeclareKeyword = "TSDeclareKeyword",
456
+ TSEmptyBodyFunctionExpression = "TSEmptyBodyFunctionExpression",
457
+ TSEnumBody = "TSEnumBody",
458
+ TSEnumDeclaration = "TSEnumDeclaration",
459
+ TSEnumMember = "TSEnumMember",
460
+ TSExportAssignment = "TSExportAssignment",
461
+ TSExportKeyword = "TSExportKeyword",
462
+ TSExternalModuleReference = "TSExternalModuleReference",
463
+ TSFunctionType = "TSFunctionType",
464
+ TSImportEqualsDeclaration = "TSImportEqualsDeclaration",
465
+ TSImportType = "TSImportType",
466
+ TSIndexedAccessType = "TSIndexedAccessType",
467
+ TSIndexSignature = "TSIndexSignature",
468
+ TSInferType = "TSInferType",
469
+ TSInstantiationExpression = "TSInstantiationExpression",
470
+ TSInterfaceBody = "TSInterfaceBody",
471
+ TSInterfaceDeclaration = "TSInterfaceDeclaration",
472
+ TSInterfaceHeritage = "TSInterfaceHeritage",
473
+ TSIntersectionType = "TSIntersectionType",
474
+ TSIntrinsicKeyword = "TSIntrinsicKeyword",
475
+ TSLiteralType = "TSLiteralType",
476
+ TSMappedType = "TSMappedType",
477
+ TSMethodSignature = "TSMethodSignature",
478
+ TSModuleBlock = "TSModuleBlock",
479
+ TSModuleDeclaration = "TSModuleDeclaration",
480
+ TSNamedTupleMember = "TSNamedTupleMember",
481
+ TSNamespaceExportDeclaration = "TSNamespaceExportDeclaration",
482
+ TSNeverKeyword = "TSNeverKeyword",
483
+ TSNonNullExpression = "TSNonNullExpression",
484
+ TSNullKeyword = "TSNullKeyword",
485
+ TSNumberKeyword = "TSNumberKeyword",
486
+ TSObjectKeyword = "TSObjectKeyword",
487
+ TSOptionalType = "TSOptionalType",
488
+ TSParameterProperty = "TSParameterProperty",
489
+ TSPrivateKeyword = "TSPrivateKeyword",
490
+ TSPropertySignature = "TSPropertySignature",
491
+ TSProtectedKeyword = "TSProtectedKeyword",
492
+ TSPublicKeyword = "TSPublicKeyword",
493
+ TSQualifiedName = "TSQualifiedName",
494
+ TSReadonlyKeyword = "TSReadonlyKeyword",
495
+ TSRestType = "TSRestType",
496
+ TSSatisfiesExpression = "TSSatisfiesExpression",
497
+ TSStaticKeyword = "TSStaticKeyword",
498
+ TSStringKeyword = "TSStringKeyword",
499
+ TSSymbolKeyword = "TSSymbolKeyword",
500
+ TSTemplateLiteralType = "TSTemplateLiteralType",
501
+ TSThisType = "TSThisType",
502
+ TSTupleType = "TSTupleType",
503
+ TSTypeAliasDeclaration = "TSTypeAliasDeclaration",
504
+ TSTypeAnnotation = "TSTypeAnnotation",
505
+ TSTypeAssertion = "TSTypeAssertion",
506
+ TSTypeLiteral = "TSTypeLiteral",
507
+ TSTypeOperator = "TSTypeOperator",
508
+ TSTypeParameter = "TSTypeParameter",
509
+ TSTypeParameterDeclaration = "TSTypeParameterDeclaration",
510
+ TSTypeParameterInstantiation = "TSTypeParameterInstantiation",
511
+ TSTypePredicate = "TSTypePredicate",
512
+ TSTypeQuery = "TSTypeQuery",
513
+ TSTypeReference = "TSTypeReference",
514
+ TSUndefinedKeyword = "TSUndefinedKeyword",
515
+ TSUnionType = "TSUnionType",
516
+ TSUnknownKeyword = "TSUnknownKeyword",
517
+ TSVoidKeyword = "TSVoidKeyword"
518
+ }
519
+ declare interface AwaitExpression extends BaseNode {
520
+ type: AST_NODE_TYPES.AwaitExpression;
521
+ argument: Expression;
522
+ }
523
+ declare interface BaseNode extends NodeOrTokenData {
524
+ type: AST_NODE_TYPES;
525
+ }
526
+ declare interface BigIntLiteral extends LiteralBase {
527
+ bigint: string;
528
+ value: bigint | null;
529
+ }
530
+ declare interface BinaryExpression extends BaseNode {
531
+ type: AST_NODE_TYPES.BinaryExpression;
532
+ left: Expression | PrivateIdentifier;
533
+ operator: ValueOf<BinaryOperatorToText>;
534
+ right: Expression;
535
+ }
536
+ declare interface BinaryOperatorToText {
537
+ [SyntaxKind.AmpersandAmpersandToken]: '&&';
538
+ [SyntaxKind.AmpersandToken]: '&';
539
+ [SyntaxKind.AsteriskAsteriskToken]: '**';
540
+ [SyntaxKind.AsteriskToken]: '*';
541
+ [SyntaxKind.BarBarToken]: '||';
542
+ [SyntaxKind.BarToken]: '|';
543
+ [SyntaxKind.CaretToken]: '^';
544
+ [SyntaxKind.EqualsEqualsEqualsToken]: '===';
545
+ [SyntaxKind.EqualsEqualsToken]: '==';
546
+ [SyntaxKind.ExclamationEqualsEqualsToken]: '!==';
547
+ [SyntaxKind.ExclamationEqualsToken]: '!=';
548
+ [SyntaxKind.GreaterThanEqualsToken]: '>=';
549
+ [SyntaxKind.GreaterThanGreaterThanGreaterThanToken]: '>>>';
550
+ [SyntaxKind.GreaterThanGreaterThanToken]: '>>';
551
+ [SyntaxKind.GreaterThanToken]: '>';
552
+ [SyntaxKind.InKeyword]: 'in';
553
+ [SyntaxKind.InstanceOfKeyword]: 'instanceof';
554
+ [SyntaxKind.LessThanEqualsToken]: '<=';
555
+ [SyntaxKind.LessThanLessThanToken]: '<<';
556
+ [SyntaxKind.LessThanToken]: '<';
557
+ [SyntaxKind.MinusToken]: '-';
558
+ [SyntaxKind.PercentToken]: '%';
559
+ [SyntaxKind.PlusToken]: '+';
560
+ [SyntaxKind.SlashToken]: '/';
561
+ }
562
+ declare type BindingName = BindingPattern | Identifier;
563
+ declare type BindingPattern = ArrayPattern | ObjectPattern;
564
+ declare interface BlockStatement extends BaseNode {
565
+ type: AST_NODE_TYPES.BlockStatement;
566
+ body: Statement[];
567
+ }
568
+ declare interface BooleanLiteral extends LiteralBase {
569
+ raw: 'false' | 'true';
570
+ value: boolean;
571
+ }
572
+ declare interface BreakStatement extends BaseNode {
573
+ type: AST_NODE_TYPES.BreakStatement;
574
+ label: Identifier | null;
575
+ }
576
+ declare interface CallExpression extends BaseNode {
577
+ type: AST_NODE_TYPES.CallExpression;
578
+ arguments: CallExpressionArgument[];
579
+ callee: Expression;
580
+ optional: boolean;
581
+ typeArguments: TSTypeParameterInstantiation | undefined;
582
+ }
583
+ declare type CallExpressionArgument = Expression | SpreadElement;
584
+ declare interface CatchClause extends BaseNode {
585
+ type: AST_NODE_TYPES.CatchClause;
586
+ body: BlockStatement;
587
+ param: BindingName | null;
588
+ }
589
+ declare type ChainElement = CallExpression | MemberExpression | TSNonNullExpression;
590
+ declare interface ChainExpression extends BaseNode {
591
+ type: AST_NODE_TYPES.ChainExpression;
592
+ expression: ChainElement;
593
+ }
594
+ declare interface ClassBase extends BaseNode {
595
+ /**
596
+ * Whether the class is an abstract class.
597
+ * @example
598
+ * ```ts
599
+ * abstract class Foo {}
600
+ * ```
601
+ */
602
+ abstract: boolean;
603
+ /**
604
+ * The class body.
605
+ */
606
+ body: ClassBody;
607
+ /**
608
+ * Whether the class has been `declare`d:
609
+ * @example
610
+ * ```ts
611
+ * declare class Foo {}
612
+ * ```
613
+ */
614
+ declare: boolean;
615
+ /**
616
+ * The decorators declared for the class.
617
+ * @example
618
+ * ```ts
619
+ * @deco
620
+ * class Foo {}
621
+ * ```
622
+ */
623
+ decorators: Decorator[];
624
+ /**
625
+ * The class's name.
626
+ * - For a `ClassExpression` this may be `null` if the name is omitted.
627
+ * - For a `ClassDeclaration` this may be `null` if and only if the parent is
628
+ * an `ExportDefaultDeclaration`.
629
+ */
630
+ id: Identifier | null;
631
+ /**
632
+ * The implemented interfaces for the class.
633
+ */
634
+ implements: TSClassImplements[];
635
+ /**
636
+ * The super class this class extends.
637
+ */
638
+ superClass: LeftHandSideExpression | null;
639
+ /**
640
+ * The generic type parameters passed to the superClass.
641
+ */
642
+ superTypeArguments: TSTypeParameterInstantiation | undefined;
643
+ /**
644
+ * The generic type parameters declared for the class.
645
+ */
646
+ typeParameters: TSTypeParameterDeclaration | undefined;
647
+ }
648
+ declare interface ClassBody extends BaseNode {
649
+ type: AST_NODE_TYPES.ClassBody;
650
+ body: ClassElement[];
651
+ }
652
+ declare interface ClassDeclarationBase extends ClassBase {
653
+ type: AST_NODE_TYPES.ClassDeclaration;
654
+ }
655
+ /**
656
+ * A normal class declaration:
657
+ * ```
658
+ * class A {}
659
+ * ```
660
+ */
661
+ declare interface ClassDeclarationWithName extends ClassDeclarationBase {
662
+ id: Identifier;
663
+ }
664
+ /**
665
+ * Default-exported class declarations have optional names:
666
+ * ```
667
+ * export default class {}
668
+ * ```
669
+ */
670
+ declare interface ClassDeclarationWithOptionalName extends ClassDeclarationBase {
671
+ id: Identifier | null;
672
+ }
673
+ declare type ClassElement = AccessorProperty | MethodDefinition | PropertyDefinition | StaticBlock | TSAbstractAccessorProperty | TSAbstractMethodDefinition | TSAbstractPropertyDefinition | TSIndexSignature;
674
+ declare interface ClassExpression extends ClassBase {
675
+ type: AST_NODE_TYPES.ClassExpression;
676
+ abstract: false;
677
+ declare: false;
678
+ }
679
+ declare interface ClassMethodDefinitionNonComputedNameBase extends MethodDefinitionBase {
680
+ computed: false;
681
+ key: ClassPropertyNameNonComputed;
682
+ }
683
+ declare interface ClassPropertyDefinitionNonComputedNameBase extends PropertyDefinitionBase {
684
+ computed: false;
685
+ key: ClassPropertyNameNonComputed;
686
+ }
687
+ declare type ClassPropertyNameNonComputed = PrivateIdentifier | PropertyNameNonComputed;
688
+ declare interface ConditionalExpression extends BaseNode {
689
+ type: AST_NODE_TYPES.ConditionalExpression;
690
+ alternate: Expression;
691
+ consequent: Expression;
692
+ test: Expression;
693
+ }
694
+ declare interface ConstDeclaration extends LetOrConstOrVarDeclarationBase {
695
+ /**
696
+ * In a `declare const` declaration, the declarators may have initializers, but
697
+ * not definite assignment assertions. Each declarator cannot have both an
698
+ * initializer and a type annotation.
699
+ *
700
+ * Even if the declaration has no `declare`, it may still be ambient and have
701
+ * no initializer.
702
+ */
703
+ declarations: VariableDeclaratorMaybeInit[];
704
+ kind: 'const';
705
+ }
706
+ declare interface ContinueStatement extends BaseNode {
707
+ type: AST_NODE_TYPES.ContinueStatement;
708
+ label: Identifier | null;
709
+ }
710
+ declare interface DebuggerStatement extends BaseNode {
711
+ type: AST_NODE_TYPES.DebuggerStatement;
712
+ }
713
+ declare interface Decorator extends BaseNode {
714
+ type: AST_NODE_TYPES.Decorator;
715
+ expression: LeftHandSideExpression;
716
+ }
717
+ declare type DefaultExportDeclarations = ClassDeclarationWithOptionalName | Expression | FunctionDeclarationWithName | FunctionDeclarationWithOptionalName | TSDeclareFunction | TSEnumDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSTypeAliasDeclaration | VariableDeclaration;
718
+ declare type DestructuringPattern = ArrayPattern | AssignmentPattern | Identifier | MemberExpression | ObjectPattern | RestElement;
719
+ declare interface DoWhileStatement extends BaseNode {
720
+ type: AST_NODE_TYPES.DoWhileStatement;
721
+ body: Statement;
722
+ test: Expression;
723
+ }
724
+ declare interface EmptyStatement extends BaseNode {
725
+ type: AST_NODE_TYPES.EmptyStatement;
726
+ }
727
+ declare type EntityName = Identifier | ThisExpression | TSQualifiedName;
728
+ declare interface ExportAllDeclaration extends BaseNode {
729
+ type: AST_NODE_TYPES.ExportAllDeclaration;
730
+ /**
731
+ * The assertions declared for the export.
732
+ * @example
733
+ * ```ts
734
+ * export * from 'mod' assert \{ type: 'json' \};
735
+ * ```
736
+ * @deprecated Replaced with {@link `attributes`}.
737
+ */
738
+ assertions: ImportAttribute[];
739
+ /**
740
+ * The attributes declared for the export.
741
+ * @example
742
+ * ```ts
743
+ * export * from 'mod' with \{ type: 'json' \};
744
+ * ```
745
+ */
746
+ attributes: ImportAttribute[];
747
+ /**
748
+ * The name for the exported items (`as X`). `null` if no name is assigned.
749
+ */
750
+ exported: Identifier | null;
751
+ /**
752
+ * The kind of the export.
753
+ */
754
+ exportKind: ExportKind;
755
+ /**
756
+ * The source module being exported from.
757
+ */
758
+ source: StringLiteral;
759
+ }
760
+ declare type ExportAndImportKind = 'type' | 'value';
761
+ declare interface ExportDefaultDeclaration extends BaseNode {
762
+ type: AST_NODE_TYPES.ExportDefaultDeclaration;
763
+ /**
764
+ * The declaration being exported.
765
+ */
766
+ declaration: DefaultExportDeclarations;
767
+ /**
768
+ * The kind of the export. Always `value` for default exports.
769
+ */
770
+ exportKind: 'value';
771
+ }
772
+ declare type ExportKind = ExportAndImportKind;
773
+ declare type ExportNamedDeclaration = ExportNamedDeclarationWithoutSourceWithMultiple | ExportNamedDeclarationWithoutSourceWithSingle | ExportNamedDeclarationWithSource;
774
+ declare interface ExportNamedDeclarationBase extends BaseNode {
775
+ type: AST_NODE_TYPES.ExportNamedDeclaration;
776
+ /**
777
+ * The assertions declared for the export.
778
+ * @example
779
+ * ```ts
780
+ * export { foo } from 'mod' assert \{ type: 'json' \};
781
+ * ```
782
+ * This will be an empty array if `source` is `null`
783
+ * @deprecated Replaced with {@link `attributes`}.
784
+ */
785
+ assertions: ImportAttribute[];
786
+ /**
787
+ * The attributes declared for the export.
788
+ * @example
789
+ * ```ts
790
+ * export { foo } from 'mod' with \{ type: 'json' \};
791
+ * ```
792
+ * This will be an empty array if `source` is `null`
793
+ */
794
+ attributes: ImportAttribute[];
795
+ /**
796
+ * The exported declaration.
797
+ * @example
798
+ * ```ts
799
+ * export const x = 1;
800
+ * ```
801
+ * This will be `null` if `source` is not `null`, or if there are `specifiers`
802
+ */
803
+ declaration: NamedExportDeclarations | null;
804
+ /**
805
+ * The kind of the export.
806
+ */
807
+ exportKind: ExportKind;
808
+ /**
809
+ * The source module being exported from.
810
+ */
811
+ source: StringLiteral | null;
812
+ /**
813
+ * The specifiers being exported.
814
+ * @example
815
+ * ```ts
816
+ * export { a, b };
817
+ * ```
818
+ * This will be an empty array if `declaration` is not `null`
819
+ */
820
+ specifiers: ExportSpecifier[];
821
+ }
822
+ /**
823
+ * Exporting names from the current module.
824
+ * ```
825
+ * export {};
826
+ * export { a, b };
827
+ * ```
828
+ */
829
+ declare interface ExportNamedDeclarationWithoutSourceWithMultiple extends ExportNamedDeclarationBase {
830
+ /**
831
+ * This will always be an empty array.
832
+ * @deprecated Replaced with {@link `attributes`}.
833
+ */
834
+ assertions: ImportAttribute[];
835
+ /**
836
+ * This will always be an empty array.
837
+ */
838
+ attributes: ImportAttribute[];
839
+ declaration: null;
840
+ source: null;
841
+ specifiers: ExportSpecifierWithIdentifierLocal[];
842
+ }
843
+ /**
844
+ * Exporting a single named declaration.
845
+ * ```
846
+ * export const x = 1;
847
+ * ```
848
+ */
849
+ declare interface ExportNamedDeclarationWithoutSourceWithSingle extends ExportNamedDeclarationBase {
850
+ /**
851
+ * This will always be an empty array.
852
+ * @deprecated Replaced with {@link `attributes`}.
853
+ */
854
+ assertions: ImportAttribute[];
855
+ /**
856
+ * This will always be an empty array.
857
+ */
858
+ attributes: ImportAttribute[];
859
+ declaration: NamedExportDeclarations;
860
+ source: null;
861
+ /**
862
+ * This will always be an empty array.
863
+ */
864
+ specifiers: ExportSpecifierWithIdentifierLocal[];
865
+ }
866
+ /**
867
+ * Export names from another module.
868
+ * ```
869
+ * export { a, b } from 'mod';
870
+ * ```
871
+ */
872
+ declare interface ExportNamedDeclarationWithSource extends ExportNamedDeclarationBase {
873
+ declaration: null;
874
+ source: StringLiteral;
875
+ }
876
+ declare type ExportSpecifier = ExportSpecifierWithIdentifierLocal | ExportSpecifierWithStringOrLiteralLocal;
877
+ declare interface ExportSpecifierBase extends BaseNode {
878
+ type: AST_NODE_TYPES.ExportSpecifier;
879
+ exported: Identifier | StringLiteral;
880
+ exportKind: ExportKind;
881
+ local: Identifier | StringLiteral;
882
+ }
883
+ declare interface ExportSpecifierWithIdentifierLocal extends ExportSpecifierBase {
884
+ local: Identifier;
885
+ }
886
+ declare interface ExportSpecifierWithStringOrLiteralLocal extends ExportSpecifierBase {
887
+ local: Identifier | StringLiteral;
888
+ }
889
+ declare type Expression = ArrayExpression | ArrayPattern | ArrowFunctionExpression | AssignmentExpression | AwaitExpression | BinaryExpression | CallExpression | ChainExpression | ClassExpression | ConditionalExpression | FunctionExpression | Identifier | ImportExpression | JSXElement | JSXFragment | LiteralExpression | LogicalExpression | MemberExpression | MetaProperty | NewExpression | ObjectExpression | ObjectPattern | SequenceExpression | Super | TaggedTemplateExpression | TemplateLiteral | ThisExpression | TSAsExpression | TSInstantiationExpression | TSNonNullExpression | TSSatisfiesExpression | TSTypeAssertion | UnaryExpression | UpdateExpression | YieldExpression;
890
+ declare interface ExpressionStatement extends BaseNode {
891
+ type: AST_NODE_TYPES.ExpressionStatement;
892
+ directive: string | undefined;
893
+ expression: Expression;
894
+ }
895
+ declare type ForInitialiser = Expression | LetOrConstOrVarDeclaration;
896
+ declare interface ForInStatement extends BaseNode {
897
+ type: AST_NODE_TYPES.ForInStatement;
898
+ body: Statement;
899
+ left: ForInitialiser;
900
+ right: Expression;
901
+ }
902
+ declare type ForOfInitialiser = Expression | LetOrConstOrVarDeclaration | UsingInForOfDeclaration;
903
+ declare interface ForOfStatement extends BaseNode {
904
+ type: AST_NODE_TYPES.ForOfStatement;
905
+ await: boolean;
906
+ body: Statement;
907
+ left: ForOfInitialiser;
908
+ right: Expression;
909
+ }
910
+ declare interface ForStatement extends BaseNode {
911
+ type: AST_NODE_TYPES.ForStatement;
912
+ body: Statement;
913
+ init: Expression | ForInitialiser | null;
914
+ test: Expression | null;
915
+ update: Expression | null;
916
+ }
917
+ declare interface FunctionBase extends BaseNode {
918
+ /**
919
+ * Whether the function is async:
920
+ * ```
921
+ * async function foo() {}
922
+ * const x = async function () {}
923
+ * const x = async () => {}
924
+ * ```
925
+ */
926
+ async: boolean;
927
+ /**
928
+ * The body of the function.
929
+ * - For an `ArrowFunctionExpression` this may be an `Expression` or `BlockStatement`.
930
+ * - For a `FunctionDeclaration` or `FunctionExpression` this is always a `BlockStatement`.
931
+ * - For a `TSDeclareFunction` this is always `undefined`.
932
+ * - For a `TSEmptyBodyFunctionExpression` this is always `null`.
933
+ */
934
+ body: BlockStatement | Expression | null | undefined;
935
+ /**
936
+ * This is only `true` if and only if the node is a `TSDeclareFunction` and it has `declare`:
937
+ * ```
938
+ * declare function foo() {}
939
+ * ```
940
+ */
941
+ declare: boolean;
942
+ /**
943
+ * This is only ever `true` if and only the node is an `ArrowFunctionExpression` and the body
944
+ * is an expression:
945
+ * ```
946
+ * (() => 1)
947
+ * ```
948
+ */
949
+ expression: boolean;
950
+ /**
951
+ * Whether the function is a generator function:
952
+ * ```
953
+ * function *foo() {}
954
+ * const x = function *() {}
955
+ * ```
956
+ * This is always `false` for arrow functions as they cannot be generators.
957
+ */
958
+ generator: boolean;
959
+ /**
960
+ * The function's name.
961
+ * - For an `ArrowFunctionExpression` this is always `null`.
962
+ * - For a `FunctionExpression` this may be `null` if the name is omitted.
963
+ * - For a `FunctionDeclaration` or `TSDeclareFunction` this may be `null` if
964
+ * and only if the parent is an `ExportDefaultDeclaration`.
965
+ */
966
+ id: Identifier | null;
967
+ /**
968
+ * The list of parameters declared for the function.
969
+ */
970
+ params: Parameter[];
971
+ /**
972
+ * The return type annotation for the function.
973
+ */
974
+ returnType: TSTypeAnnotation | undefined;
975
+ /**
976
+ * The generic type parameter declaration for the function.
977
+ */
978
+ typeParameters: TSTypeParameterDeclaration | undefined;
979
+ }
980
+ declare interface FunctionDeclarationBase extends FunctionBase {
981
+ type: AST_NODE_TYPES.FunctionDeclaration;
982
+ body: BlockStatement;
983
+ declare: false;
984
+ expression: false;
985
+ }
986
+ /**
987
+ * A normal function declaration:
988
+ * ```
989
+ * function f() {}
990
+ * ```
991
+ */
992
+ declare interface FunctionDeclarationWithName extends FunctionDeclarationBase {
993
+ id: Identifier;
994
+ }
995
+ /**
996
+ * Default-exported function declarations have optional names:
997
+ * ```
998
+ * export default function () {}
999
+ * ```
1000
+ */
1001
+ declare interface FunctionDeclarationWithOptionalName extends FunctionDeclarationBase {
1002
+ id: Identifier | null;
1003
+ }
1004
+ declare interface FunctionExpression extends FunctionBase {
1005
+ type: AST_NODE_TYPES.FunctionExpression;
1006
+ body: BlockStatement;
1007
+ expression: false;
1008
+ }
1009
+ declare interface Identifier extends BaseNode {
1010
+ type: AST_NODE_TYPES.Identifier;
1011
+ decorators: Decorator[];
1012
+ name: string;
1013
+ optional: boolean;
1014
+ typeAnnotation: TSTypeAnnotation | undefined;
1015
+ }
1016
+ declare interface IfStatement extends BaseNode {
1017
+ type: AST_NODE_TYPES.IfStatement;
1018
+ alternate: Statement | null;
1019
+ consequent: Statement;
1020
+ test: Expression;
1021
+ }
1022
+ declare interface ImportAttribute extends BaseNode {
1023
+ type: AST_NODE_TYPES.ImportAttribute;
1024
+ key: Identifier | Literal;
1025
+ value: Literal;
1026
+ }
1027
+ declare type ImportClause = ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier;
1028
+ declare interface ImportDeclaration extends BaseNode {
1029
+ type: AST_NODE_TYPES.ImportDeclaration;
1030
+ /**
1031
+ * The assertions declared for the export.
1032
+ * @example
1033
+ * ```ts
1034
+ * import * from 'mod' assert \{ type: 'json' \};
1035
+ * ```
1036
+ * @deprecated Replaced with {@link `attributes`}.
1037
+ */
1038
+ assertions: ImportAttribute[];
1039
+ /**
1040
+ * The attributes declared for the export.
1041
+ * @example
1042
+ * ```ts
1043
+ * import * from 'mod' with \{ type: 'json' \};
1044
+ * ```
1045
+ */
1046
+ attributes: ImportAttribute[];
1047
+ /**
1048
+ * The kind of the import.
1049
+ */
1050
+ importKind: ImportKind;
1051
+ /**
1052
+ * The source module being imported from.
1053
+ */
1054
+ source: StringLiteral;
1055
+ /**
1056
+ * The specifiers being imported.
1057
+ * If this is an empty array then either there are no specifiers:
1058
+ * ```
1059
+ * import {} from 'mod';
1060
+ * ```
1061
+ * Or it is a side-effect import:
1062
+ * ```
1063
+ * import 'mod';
1064
+ * ```
1065
+ */
1066
+ specifiers: ImportClause[];
1067
+ }
1068
+ declare interface ImportDefaultSpecifier extends BaseNode {
1069
+ type: AST_NODE_TYPES.ImportDefaultSpecifier;
1070
+ local: Identifier;
1071
+ }
1072
+ declare interface ImportExpression extends BaseNode {
1073
+ type: AST_NODE_TYPES.ImportExpression;
1074
+ /**
1075
+ * The attributes declared for the dynamic import.
1076
+ * @example
1077
+ * ```ts
1078
+ * import('mod', \{ assert: \{ type: 'json' \} \});
1079
+ * ```
1080
+ * @deprecated Replaced with {@link `options`}.
1081
+ */
1082
+ attributes: Expression | null;
1083
+ /**
1084
+ * The options bag declared for the dynamic import.
1085
+ * @example
1086
+ * ```ts
1087
+ * import('mod', \{ assert: \{ type: 'json' \} \});
1088
+ * ```
1089
+ */
1090
+ options: Expression | null;
1091
+ source: Expression;
1092
+ }
1093
+ declare type ImportKind = ExportAndImportKind;
1094
+ declare interface ImportNamespaceSpecifier extends BaseNode {
1095
+ type: AST_NODE_TYPES.ImportNamespaceSpecifier;
1096
+ local: Identifier;
1097
+ }
1098
+ declare interface ImportSpecifier extends BaseNode {
1099
+ type: AST_NODE_TYPES.ImportSpecifier;
1100
+ imported: Identifier | StringLiteral;
1101
+ importKind: ImportKind;
1102
+ local: Identifier;
1103
+ }
1104
+ declare interface JSXAttribute extends BaseNode {
1105
+ type: AST_NODE_TYPES.JSXAttribute;
1106
+ name: JSXIdentifier | JSXNamespacedName;
1107
+ value: JSXElement | JSXExpression | Literal | null;
1108
+ }
1109
+ declare type JSXChild = JSXElement | JSXExpression | JSXFragment | JSXText;
1110
+ declare interface JSXClosingElement extends BaseNode {
1111
+ type: AST_NODE_TYPES.JSXClosingElement;
1112
+ name: JSXTagNameExpression;
1113
+ }
1114
+ declare interface JSXClosingFragment extends BaseNode {
1115
+ type: AST_NODE_TYPES.JSXClosingFragment;
1116
+ }
1117
+ declare interface JSXElement extends BaseNode {
1118
+ type: AST_NODE_TYPES.JSXElement;
1119
+ children: JSXChild[];
1120
+ closingElement: JSXClosingElement | null;
1121
+ openingElement: JSXOpeningElement;
1122
+ }
1123
+ declare interface JSXEmptyExpression extends BaseNode {
1124
+ type: AST_NODE_TYPES.JSXEmptyExpression;
1125
+ }
1126
+ declare type JSXExpression = JSXExpressionContainer | JSXSpreadChild;
1127
+ declare interface JSXExpressionContainer extends BaseNode {
1128
+ type: AST_NODE_TYPES.JSXExpressionContainer;
1129
+ expression: Expression | JSXEmptyExpression;
1130
+ }
1131
+ declare interface JSXFragment extends BaseNode {
1132
+ type: AST_NODE_TYPES.JSXFragment;
1133
+ children: JSXChild[];
1134
+ closingFragment: JSXClosingFragment;
1135
+ openingFragment: JSXOpeningFragment;
1136
+ }
1137
+ declare interface JSXIdentifier extends BaseNode {
1138
+ type: AST_NODE_TYPES.JSXIdentifier;
1139
+ name: string;
1140
+ }
1141
+ declare interface JSXMemberExpression extends BaseNode {
1142
+ type: AST_NODE_TYPES.JSXMemberExpression;
1143
+ object: JSXTagNameExpression;
1144
+ property: JSXIdentifier;
1145
+ }
1146
+ declare interface JSXNamespacedName extends BaseNode {
1147
+ type: AST_NODE_TYPES.JSXNamespacedName;
1148
+ name: JSXIdentifier;
1149
+ namespace: JSXIdentifier;
1150
+ }
1151
+ declare interface JSXOpeningElement extends BaseNode {
1152
+ type: AST_NODE_TYPES.JSXOpeningElement;
1153
+ attributes: (JSXAttribute | JSXSpreadAttribute)[];
1154
+ name: JSXTagNameExpression;
1155
+ selfClosing: boolean;
1156
+ typeArguments: TSTypeParameterInstantiation | undefined;
1157
+ }
1158
+ declare interface JSXOpeningFragment extends BaseNode {
1159
+ type: AST_NODE_TYPES.JSXOpeningFragment;
1160
+ }
1161
+ declare interface JSXSpreadAttribute extends BaseNode {
1162
+ type: AST_NODE_TYPES.JSXSpreadAttribute;
1163
+ argument: Expression;
1164
+ }
1165
+ declare interface JSXSpreadChild extends BaseNode {
1166
+ type: AST_NODE_TYPES.JSXSpreadChild;
1167
+ expression: Expression | JSXEmptyExpression;
1168
+ }
1169
+ declare type JSXTagNameExpression = JSXIdentifier | JSXMemberExpression | JSXNamespacedName;
1170
+ declare interface JSXText extends BaseNode {
1171
+ type: AST_NODE_TYPES.JSXText;
1172
+ raw: string;
1173
+ value: string;
1174
+ }
1175
+ declare interface LabeledStatement extends BaseNode {
1176
+ type: AST_NODE_TYPES.LabeledStatement;
1177
+ body: Statement;
1178
+ label: Identifier;
1179
+ }
1180
+ declare type LeftHandSideExpression = ArrayExpression | ArrayPattern | ArrowFunctionExpression | CallExpression | ClassExpression | FunctionExpression | Identifier | JSXElement | JSXFragment | LiteralExpression | MemberExpression | MetaProperty | ObjectExpression | ObjectPattern | SequenceExpression | Super | TaggedTemplateExpression | ThisExpression | TSAsExpression | TSNonNullExpression | TSTypeAssertion;
1181
+ declare type LetOrConstOrVarDeclaration = ConstDeclaration | LetOrVarDeclaredDeclaration | LetOrVarNonDeclaredDeclaration;
1182
+ declare interface LetOrConstOrVarDeclarationBase extends BaseNode {
1183
+ type: AST_NODE_TYPES.VariableDeclaration;
1184
+ /**
1185
+ * The variables declared by this declaration.
1186
+ * Always non-empty.
1187
+ * @example
1188
+ * ```ts
1189
+ * let x;
1190
+ * let y, z;
1191
+ * ```
1192
+ */
1193
+ declarations: LetOrConstOrVarDeclarator[];
1194
+ /**
1195
+ * Whether the declaration is `declare`d
1196
+ * @example
1197
+ * ```ts
1198
+ * declare const x = 1;
1199
+ * ```
1200
+ */
1201
+ declare: boolean;
1202
+ /**
1203
+ * The keyword used to declare the variable(s)
1204
+ * @example
1205
+ * ```ts
1206
+ * const x = 1;
1207
+ * let y = 2;
1208
+ * var z = 3;
1209
+ * ```
1210
+ */
1211
+ kind: 'const' | 'let' | 'var';
1212
+ }
1213
+ declare type LetOrConstOrVarDeclarator = VariableDeclaratorDefiniteAssignment | VariableDeclaratorMaybeInit | VariableDeclaratorNoInit;
1214
+ declare interface LetOrVarDeclaredDeclaration extends LetOrConstOrVarDeclarationBase {
1215
+ /**
1216
+ * In a `declare let` declaration, the declarators must not have definite assignment
1217
+ * assertions or initializers.
1218
+ *
1219
+ * @example
1220
+ * ```ts
1221
+ * using x = 1;
1222
+ * using y =1, z = 2;
1223
+ * ```
1224
+ */
1225
+ declarations: VariableDeclaratorNoInit[];
1226
+ declare: true;
1227
+ kind: 'let' | 'var';
1228
+ }
1229
+ declare interface LetOrVarNonDeclaredDeclaration extends LetOrConstOrVarDeclarationBase {
1230
+ /**
1231
+ * In a `let`/`var` declaration, the declarators may have definite assignment
1232
+ * assertions or initializers, but not both.
1233
+ */
1234
+ declarations: (VariableDeclaratorDefiniteAssignment | VariableDeclaratorMaybeInit)[];
1235
+ declare: false;
1236
+ kind: 'let' | 'var';
1237
+ }
1238
+ declare type Literal = BigIntLiteral | BooleanLiteral | NullLiteral | NumberLiteral | RegExpLiteral | StringLiteral;
1239
+ declare interface LiteralBase extends BaseNode {
1240
+ type: AST_NODE_TYPES.Literal;
1241
+ raw: string;
1242
+ value: bigint | boolean | number | string | RegExp | null;
1243
+ }
1244
+ declare type LiteralExpression = Literal | TemplateLiteral;
1245
+ declare interface LogicalExpression extends BaseNode {
1246
+ type: AST_NODE_TYPES.LogicalExpression;
1247
+ left: Expression;
1248
+ operator: '&&' | '??' | '||';
1249
+ right: Expression;
1250
+ }
1251
+ declare type MemberExpression = MemberExpressionComputedName | MemberExpressionNonComputedName;
1252
+ declare interface MemberExpressionBase extends BaseNode {
1253
+ computed: boolean;
1254
+ object: Expression;
1255
+ optional: boolean;
1256
+ property: Expression | Identifier | PrivateIdentifier;
1257
+ }
1258
+ declare interface MemberExpressionComputedName extends MemberExpressionBase {
1259
+ type: AST_NODE_TYPES.MemberExpression;
1260
+ computed: true;
1261
+ property: Expression;
1262
+ }
1263
+ declare interface MemberExpressionNonComputedName extends MemberExpressionBase {
1264
+ type: AST_NODE_TYPES.MemberExpression;
1265
+ computed: false;
1266
+ property: Identifier | PrivateIdentifier;
1267
+ }
1268
+ declare interface MetaProperty extends BaseNode {
1269
+ type: AST_NODE_TYPES.MetaProperty;
1270
+ meta: Identifier;
1271
+ property: Identifier;
1272
+ }
1273
+ declare type MethodDefinition = MethodDefinitionComputedName | MethodDefinitionNonComputedName;
1274
+ /** this should not be directly used - instead use MethodDefinitionComputedNameBase or MethodDefinitionNonComputedNameBase */
1275
+ declare interface MethodDefinitionBase extends BaseNode {
1276
+ accessibility: Accessibility | undefined;
1277
+ computed: boolean;
1278
+ decorators: Decorator[];
1279
+ key: PropertyName;
1280
+ kind: 'constructor' | 'get' | 'method' | 'set';
1281
+ optional: boolean;
1282
+ override: boolean;
1283
+ static: boolean;
1284
+ value: FunctionExpression | TSEmptyBodyFunctionExpression;
1285
+ }
1286
+ declare interface MethodDefinitionComputedName extends MethodDefinitionComputedNameBase {
1287
+ type: AST_NODE_TYPES.MethodDefinition;
1288
+ }
1289
+ declare interface MethodDefinitionComputedNameBase extends MethodDefinitionBase {
1290
+ computed: true;
1291
+ key: PropertyNameComputed;
1292
+ }
1293
+ declare interface MethodDefinitionNonComputedName extends ClassMethodDefinitionNonComputedNameBase {
1294
+ type: AST_NODE_TYPES.MethodDefinition;
1295
+ }
1296
+ declare interface MethodDefinitionNonComputedNameBase extends MethodDefinitionBase {
1297
+ computed: false;
1298
+ key: PropertyNameNonComputed;
1299
+ }
1300
+ declare type NamedExportDeclarations = ClassDeclarationWithName | ClassDeclarationWithOptionalName | FunctionDeclarationWithName | FunctionDeclarationWithOptionalName | TSDeclareFunction | TSEnumDeclaration | TSImportEqualsDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSTypeAliasDeclaration | VariableDeclaration;
1301
+ declare interface NewExpression extends BaseNode {
1302
+ type: AST_NODE_TYPES.NewExpression;
1303
+ arguments: CallExpressionArgument[];
1304
+ callee: Expression;
1305
+ typeArguments: TSTypeParameterInstantiation | undefined;
1306
+ }
1307
+ declare interface NodeOrTokenData {
1308
+ type: string;
1309
+ /**
1310
+ * The source location information of the node.
1311
+ *
1312
+ * The loc property is defined as nullable by ESTree, but ESLint requires this property.
1313
+ */
1314
+ loc: SourceLocation;
1315
+ range: Range;
1316
+ }
1317
+ declare interface NullLiteral extends LiteralBase {
1318
+ raw: 'null';
1319
+ value: null;
1320
+ }
1321
+ declare interface NumberLiteral extends LiteralBase {
1322
+ value: number;
1323
+ }
1324
+ declare interface ObjectExpression extends BaseNode {
1325
+ type: AST_NODE_TYPES.ObjectExpression;
1326
+ properties: ObjectLiteralElement[];
1327
+ }
1328
+ declare type ObjectLiteralElement = Property | SpreadElement;
1329
+ declare interface ObjectPattern extends BaseNode {
1330
+ type: AST_NODE_TYPES.ObjectPattern;
1331
+ decorators: Decorator[];
1332
+ optional: boolean;
1333
+ properties: (Property | RestElement)[];
1334
+ typeAnnotation: TSTypeAnnotation | undefined;
1335
+ }
1336
+ declare type Parameter = ArrayPattern | AssignmentPattern | Identifier | ObjectPattern | RestElement | TSParameterProperty;
1337
+ declare interface Position {
1338
+ /**
1339
+ * Column number on the line (0-indexed)
1340
+ */
1341
+ column: number;
1342
+ /**
1343
+ * Line number (1-indexed)
1344
+ */
1345
+ line: number;
1346
+ }
1347
+ declare interface PrivateIdentifier extends BaseNode {
1348
+ type: AST_NODE_TYPES.PrivateIdentifier;
1349
+ name: string;
1350
+ }
1351
+ declare type ProgramStatement = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ImportDeclaration | Statement | TSImportEqualsDeclaration | TSNamespaceExportDeclaration;
1352
+ declare type Property = PropertyComputedName | PropertyNonComputedName;
1353
+ declare interface PropertyBase extends BaseNode {
1354
+ type: AST_NODE_TYPES.Property;
1355
+ computed: boolean;
1356
+ key: PropertyName;
1357
+ kind: 'get' | 'init' | 'set';
1358
+ method: boolean;
1359
+ optional: boolean;
1360
+ shorthand: boolean;
1361
+ value: AssignmentPattern | BindingName | Expression | TSEmptyBodyFunctionExpression;
1362
+ }
1363
+ declare interface PropertyComputedName extends PropertyBase {
1364
+ computed: true;
1365
+ key: PropertyNameComputed;
1366
+ }
1367
+ declare type PropertyDefinition = PropertyDefinitionComputedName | PropertyDefinitionNonComputedName;
1368
+ declare interface PropertyDefinitionBase extends BaseNode {
1369
+ accessibility: Accessibility | undefined;
1370
+ computed: boolean;
1371
+ declare: boolean;
1372
+ decorators: Decorator[];
1373
+ definite: boolean;
1374
+ key: PropertyName;
1375
+ optional: boolean;
1376
+ override: boolean;
1377
+ readonly: boolean;
1378
+ static: boolean;
1379
+ typeAnnotation: TSTypeAnnotation | undefined;
1380
+ value: Expression | null;
1381
+ }
1382
+ declare interface PropertyDefinitionComputedName extends PropertyDefinitionComputedNameBase {
1383
+ type: AST_NODE_TYPES.PropertyDefinition;
1384
+ }
1385
+ declare interface PropertyDefinitionComputedNameBase extends PropertyDefinitionBase {
1386
+ computed: true;
1387
+ key: PropertyNameComputed;
1388
+ }
1389
+ declare interface PropertyDefinitionNonComputedName extends ClassPropertyDefinitionNonComputedNameBase {
1390
+ type: AST_NODE_TYPES.PropertyDefinition;
1391
+ }
1392
+ declare interface PropertyDefinitionNonComputedNameBase extends PropertyDefinitionBase {
1393
+ computed: false;
1394
+ key: PropertyNameNonComputed;
1395
+ }
1396
+ declare type PropertyName = ClassPropertyNameNonComputed | PropertyNameComputed | PropertyNameNonComputed;
1397
+ declare type PropertyNameComputed = Expression;
1398
+ declare type PropertyNameNonComputed = Identifier | NumberLiteral | StringLiteral;
1399
+ declare interface PropertyNonComputedName extends PropertyBase {
1400
+ computed: false;
1401
+ key: PropertyNameNonComputed;
1402
+ }
1403
+ /**
1404
+ * An array of two numbers.
1405
+ * Both numbers are a 0-based index which is the position in the array of source code characters.
1406
+ * The first is the start position of the node, the second is the end position of the node.
1407
+ */
1408
+ declare type Range = [number, number];
1409
+ declare interface RegExpLiteral extends LiteralBase {
1410
+ regex: {
1411
+ flags: string;
1412
+ pattern: string;
1413
+ };
1414
+ value: RegExp | null;
1415
+ }
1416
+ declare interface RestElement extends BaseNode {
1417
+ type: AST_NODE_TYPES.RestElement;
1418
+ argument: DestructuringPattern;
1419
+ decorators: Decorator[];
1420
+ optional: boolean;
1421
+ typeAnnotation: TSTypeAnnotation | undefined;
1422
+ value: AssignmentPattern | undefined;
1423
+ }
1424
+ declare interface ReturnStatement extends BaseNode {
1425
+ type: AST_NODE_TYPES.ReturnStatement;
1426
+ argument: Expression | null;
1427
+ }
1428
+ declare interface SequenceExpression extends BaseNode {
1429
+ type: AST_NODE_TYPES.SequenceExpression;
1430
+ expressions: Expression[];
1431
+ }
1432
+ declare interface SourceLocation {
1433
+ /**
1434
+ * The position of the first character after the parsed source region
1435
+ */
1436
+ end: Position;
1437
+ /**
1438
+ * The position of the first character of the parsed source region
1439
+ */
1440
+ start: Position;
1441
+ }
1442
+ declare interface SpreadElement extends BaseNode {
1443
+ type: AST_NODE_TYPES.SpreadElement;
1444
+ argument: Expression;
1445
+ }
1446
+ declare type Statement = BlockStatement | BreakStatement | ClassDeclarationWithName | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclarationWithName | IfStatement | ImportDeclaration | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | TSDeclareFunction | TSEnumDeclaration | TSExportAssignment | TSImportEqualsDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSNamespaceExportDeclaration | TSTypeAliasDeclaration | VariableDeclaration | WhileStatement | WithStatement;
1447
+ declare interface StaticBlock extends BaseNode {
1448
+ type: AST_NODE_TYPES.StaticBlock;
1449
+ body: Statement[];
1450
+ }
1451
+ declare interface StringLiteral extends LiteralBase {
1452
+ value: string;
1453
+ }
1454
+ declare interface Super extends BaseNode {
1455
+ type: AST_NODE_TYPES.Super;
1456
+ }
1457
+ declare interface SwitchCase extends BaseNode {
1458
+ type: AST_NODE_TYPES.SwitchCase;
1459
+ consequent: Statement[];
1460
+ test: Expression | null;
1461
+ }
1462
+ declare interface SwitchStatement extends BaseNode {
1463
+ type: AST_NODE_TYPES.SwitchStatement;
1464
+ cases: SwitchCase[];
1465
+ discriminant: Expression;
1466
+ }
1467
+ declare interface TaggedTemplateExpression extends BaseNode {
1468
+ type: AST_NODE_TYPES.TaggedTemplateExpression;
1469
+ quasi: TemplateLiteral;
1470
+ tag: Expression;
1471
+ typeArguments: TSTypeParameterInstantiation | undefined;
1472
+ }
1473
+ declare interface TemplateElement extends BaseNode {
1474
+ type: AST_NODE_TYPES.TemplateElement;
1475
+ tail: boolean;
1476
+ value: {
1477
+ cooked: string;
1478
+ raw: string;
1479
+ };
1480
+ }
1481
+ declare interface TemplateLiteral extends BaseNode {
1482
+ type: AST_NODE_TYPES.TemplateLiteral;
1483
+ expressions: Expression[];
1484
+ quasis: TemplateElement[];
1485
+ }
1486
+ declare interface ThisExpression extends BaseNode {
1487
+ type: AST_NODE_TYPES.ThisExpression;
1488
+ }
1489
+ declare interface ThrowStatement extends BaseNode {
1490
+ type: AST_NODE_TYPES.ThrowStatement;
1491
+ argument: Expression;
1492
+ }
1493
+ declare interface TryStatement extends BaseNode {
1494
+ type: AST_NODE_TYPES.TryStatement;
1495
+ block: BlockStatement;
1496
+ finalizer: BlockStatement | null;
1497
+ handler: CatchClause | null;
1498
+ }
1499
+ declare type TSAbstractAccessorProperty = TSAbstractAccessorPropertyComputedName | TSAbstractAccessorPropertyNonComputedName;
1500
+ declare interface TSAbstractAccessorPropertyComputedName extends PropertyDefinitionComputedNameBase {
1501
+ type: AST_NODE_TYPES.TSAbstractAccessorProperty;
1502
+ value: null;
1503
+ }
1504
+ declare interface TSAbstractAccessorPropertyNonComputedName extends PropertyDefinitionNonComputedNameBase {
1505
+ type: AST_NODE_TYPES.TSAbstractAccessorProperty;
1506
+ value: null;
1507
+ }
1508
+ declare interface TSAbstractKeyword extends BaseNode {
1509
+ type: AST_NODE_TYPES.TSAbstractKeyword;
1510
+ }
1511
+ declare type TSAbstractMethodDefinition = TSAbstractMethodDefinitionComputedName | TSAbstractMethodDefinitionNonComputedName;
1512
+ declare interface TSAbstractMethodDefinitionComputedName extends MethodDefinitionComputedNameBase {
1513
+ type: AST_NODE_TYPES.TSAbstractMethodDefinition;
1514
+ }
1515
+ declare interface TSAbstractMethodDefinitionNonComputedName extends MethodDefinitionNonComputedNameBase {
1516
+ type: AST_NODE_TYPES.TSAbstractMethodDefinition;
1517
+ }
1518
+ declare type TSAbstractPropertyDefinition = TSAbstractPropertyDefinitionComputedName | TSAbstractPropertyDefinitionNonComputedName;
1519
+ declare interface TSAbstractPropertyDefinitionComputedName extends PropertyDefinitionComputedNameBase {
1520
+ type: AST_NODE_TYPES.TSAbstractPropertyDefinition;
1521
+ value: null;
1522
+ }
1523
+ declare interface TSAbstractPropertyDefinitionNonComputedName extends PropertyDefinitionNonComputedNameBase {
1524
+ type: AST_NODE_TYPES.TSAbstractPropertyDefinition;
1525
+ value: null;
1526
+ }
1527
+ declare interface TSAnyKeyword extends BaseNode {
1528
+ type: AST_NODE_TYPES.TSAnyKeyword;
1529
+ }
1530
+ declare interface TSArrayType extends BaseNode {
1531
+ type: AST_NODE_TYPES.TSArrayType;
1532
+ elementType: TypeNode;
1533
+ }
1534
+ declare interface TSAsExpression extends BaseNode {
1535
+ type: AST_NODE_TYPES.TSAsExpression;
1536
+ expression: Expression;
1537
+ typeAnnotation: TypeNode;
1538
+ }
1539
+ declare interface TSAsyncKeyword extends BaseNode {
1540
+ type: AST_NODE_TYPES.TSAsyncKeyword;
1541
+ }
1542
+ declare interface TSBigIntKeyword extends BaseNode {
1543
+ type: AST_NODE_TYPES.TSBigIntKeyword;
1544
+ }
1545
+ declare interface TSBooleanKeyword extends BaseNode {
1546
+ type: AST_NODE_TYPES.TSBooleanKeyword;
1547
+ }
1548
+ declare interface TSCallSignatureDeclaration extends TSFunctionSignatureBase {
1549
+ type: AST_NODE_TYPES.TSCallSignatureDeclaration;
1550
+ }
1551
+ declare interface TSClassImplements extends TSHeritageBase {
1552
+ type: AST_NODE_TYPES.TSClassImplements;
1553
+ }
1554
+ declare interface TSConditionalType extends BaseNode {
1555
+ type: AST_NODE_TYPES.TSConditionalType;
1556
+ checkType: TypeNode;
1557
+ extendsType: TypeNode;
1558
+ falseType: TypeNode;
1559
+ trueType: TypeNode;
1560
+ }
1561
+ declare interface TSConstructorType extends TSFunctionSignatureBase {
1562
+ type: AST_NODE_TYPES.TSConstructorType;
1563
+ abstract: boolean;
1564
+ }
1565
+ declare interface TSConstructSignatureDeclaration extends TSFunctionSignatureBase {
1566
+ type: AST_NODE_TYPES.TSConstructSignatureDeclaration;
1567
+ }
1568
+ declare type TSDeclareFunction = TSDeclareFunctionNoDeclare | TSDeclareFunctionWithDeclare;
1569
+ declare interface TSDeclareFunctionBase extends FunctionBase {
1570
+ type: AST_NODE_TYPES.TSDeclareFunction;
1571
+ /**
1572
+ * TS1183: An implementation cannot be declared in ambient contexts.
1573
+ */
1574
+ body: undefined;
1575
+ /**
1576
+ * Whether the declaration has `declare` modifier.
1577
+ */
1578
+ declare: boolean;
1579
+ expression: false;
1580
+ }
1581
+ /**
1582
+ * Function declaration without the `declare` keyword:
1583
+ * ```
1584
+ * function foo(): void;
1585
+ * ```
1586
+ * This can either be an overload signature or a declaration in an ambient context
1587
+ * (e.g. `declare module`)
1588
+ */
1589
+ declare interface TSDeclareFunctionNoDeclare extends TSDeclareFunctionBase {
1590
+ declare: false;
1591
+ /**
1592
+ * - TS1221: Generators are not allowed in an ambient context.
1593
+ * - TS1222: An overload signature cannot be declared as a generator.
1594
+ */
1595
+ generator: false;
1596
+ }
1597
+ /**
1598
+ * Function declaration with the `declare` keyword:
1599
+ * ```
1600
+ * declare function foo(): void;
1601
+ * ```
1602
+ */
1603
+ declare interface TSDeclareFunctionWithDeclare extends TSDeclareFunctionBase {
1604
+ /**
1605
+ * TS1040: 'async' modifier cannot be used in an ambient context.
1606
+ */
1607
+ async: false;
1608
+ declare: true;
1609
+ /**
1610
+ * TS1221: Generators are not allowed in an ambient context.
1611
+ */
1612
+ generator: false;
1613
+ }
1614
+ declare interface TSDeclareKeyword extends BaseNode {
1615
+ type: AST_NODE_TYPES.TSDeclareKeyword;
1616
+ }
1617
+ declare interface TSEmptyBodyFunctionExpression extends FunctionBase {
1618
+ type: AST_NODE_TYPES.TSEmptyBodyFunctionExpression;
1619
+ body: null;
1620
+ id: null;
1621
+ }
1622
+ declare interface TSEnumBody extends BaseNode {
1623
+ type: AST_NODE_TYPES.TSEnumBody;
1624
+ members: TSEnumMember[];
1625
+ }
1626
+ declare interface TSEnumDeclaration extends BaseNode {
1627
+ type: AST_NODE_TYPES.TSEnumDeclaration;
1628
+ /**
1629
+ * The body of the enum.
1630
+ */
1631
+ body: TSEnumBody;
1632
+ /**
1633
+ * Whether this is a `const` enum.
1634
+ * @example
1635
+ * ```ts
1636
+ * const enum Foo {}
1637
+ * ```
1638
+ */
1639
+ const: boolean;
1640
+ /**
1641
+ * Whether this is a `declare`d enum.
1642
+ * @example
1643
+ * ```ts
1644
+ * declare enum Foo {}
1645
+ * ```
1646
+ */
1647
+ declare: boolean;
1648
+ /**
1649
+ * The enum name.
1650
+ */
1651
+ id: Identifier;
1652
+ /**
1653
+ * The enum members.
1654
+ * @deprecated Use {@link body} instead.
1655
+ */
1656
+ members: TSEnumMember[];
1657
+ }
1658
+ declare type TSEnumMember = TSEnumMemberComputedName | TSEnumMemberNonComputedName;
1659
+ declare interface TSEnumMemberBase extends BaseNode {
1660
+ type: AST_NODE_TYPES.TSEnumMember;
1661
+ computed: boolean;
1662
+ id: PropertyNameComputed | PropertyNameNonComputed;
1663
+ initializer: Expression | undefined;
1664
+ }
1665
+ /**
1666
+ * this should only really happen in semantically invalid code (errors 1164 and 2452)
1667
+ *
1668
+ * @example
1669
+ * ```ts
1670
+ * // VALID:
1671
+ * enum Foo { ['a'] }
1672
+ *
1673
+ * // INVALID:
1674
+ * const x = 'a';
1675
+ * enum Foo { [x] }
1676
+ * enum Bar { ['a' + 'b'] }
1677
+ * ```
1678
+ */
1679
+ declare interface TSEnumMemberComputedName extends TSEnumMemberBase {
1680
+ computed: true;
1681
+ id: PropertyNameComputed;
1682
+ }
1683
+ declare interface TSEnumMemberNonComputedName extends TSEnumMemberBase {
1684
+ computed: false;
1685
+ id: PropertyNameNonComputed;
1686
+ }
1687
+ declare interface TSExportAssignment extends BaseNode {
1688
+ type: AST_NODE_TYPES.TSExportAssignment;
1689
+ expression: Expression;
1690
+ }
1691
+ declare interface TSExportKeyword extends BaseNode {
1692
+ type: AST_NODE_TYPES.TSExportKeyword;
1693
+ }
1694
+ declare interface TSExternalModuleReference extends BaseNode {
1695
+ type: AST_NODE_TYPES.TSExternalModuleReference;
1696
+ expression: StringLiteral;
1697
+ }
1698
+ declare interface TSFunctionSignatureBase extends BaseNode {
1699
+ params: Parameter[];
1700
+ returnType: TSTypeAnnotation | undefined;
1701
+ typeParameters: TSTypeParameterDeclaration | undefined;
1702
+ }
1703
+ declare interface TSFunctionType extends TSFunctionSignatureBase {
1704
+ type: AST_NODE_TYPES.TSFunctionType;
1705
+ }
1706
+ declare interface TSHeritageBase extends BaseNode {
1707
+ expression: Expression;
1708
+ typeArguments: TSTypeParameterInstantiation | undefined;
1709
+ }
1710
+ declare type TSImportEqualsDeclaration = TSImportEqualsNamespaceDeclaration | TSImportEqualsRequireDeclaration;
1711
+ declare interface TSImportEqualsDeclarationBase extends BaseNode {
1712
+ type: AST_NODE_TYPES.TSImportEqualsDeclaration;
1713
+ /**
1714
+ * The locally imported name.
1715
+ */
1716
+ id: Identifier;
1717
+ /**
1718
+ * The kind of the import. Always `'value'` unless `moduleReference` is a
1719
+ * `TSExternalModuleReference`.
1720
+ */
1721
+ importKind: ImportKind;
1722
+ /**
1723
+ * The value being aliased.
1724
+ * @example
1725
+ * ```ts
1726
+ * import F1 = A;
1727
+ * import F2 = A.B.C;
1728
+ * import F3 = require('mod');
1729
+ * ```
1730
+ */
1731
+ moduleReference: Identifier | TSExternalModuleReference | TSQualifiedName;
1732
+ }
1733
+ declare interface TSImportEqualsNamespaceDeclaration extends TSImportEqualsDeclarationBase {
1734
+ /**
1735
+ * The kind of the import.
1736
+ */
1737
+ importKind: 'value';
1738
+ /**
1739
+ * The value being aliased.
1740
+ * ```
1741
+ * import F1 = A;
1742
+ * import F2 = A.B.C;
1743
+ * ```
1744
+ */
1745
+ moduleReference: Identifier | TSQualifiedName;
1746
+ }
1747
+ declare interface TSImportEqualsRequireDeclaration extends TSImportEqualsDeclarationBase {
1748
+ /**
1749
+ * The kind of the import.
1750
+ */
1751
+ importKind: ImportKind;
1752
+ /**
1753
+ * The value being aliased.
1754
+ * ```
1755
+ * import F3 = require('mod');
1756
+ * ```
1757
+ */
1758
+ moduleReference: TSExternalModuleReference;
1759
+ }
1760
+ declare interface TSImportType extends BaseNode {
1761
+ type: AST_NODE_TYPES.TSImportType;
1762
+ argument: TypeNode;
1763
+ qualifier: EntityName | null;
1764
+ typeArguments: TSTypeParameterInstantiation | null;
1765
+ }
1766
+ declare interface TSIndexedAccessType extends BaseNode {
1767
+ type: AST_NODE_TYPES.TSIndexedAccessType;
1768
+ indexType: TypeNode;
1769
+ objectType: TypeNode;
1770
+ }
1771
+ declare interface TSIndexSignature extends BaseNode {
1772
+ type: AST_NODE_TYPES.TSIndexSignature;
1773
+ accessibility: Accessibility | undefined;
1774
+ parameters: Parameter[];
1775
+ readonly: boolean;
1776
+ static: boolean;
1777
+ typeAnnotation: TSTypeAnnotation | undefined;
1778
+ }
1779
+ declare interface TSInferType extends BaseNode {
1780
+ type: AST_NODE_TYPES.TSInferType;
1781
+ typeParameter: TSTypeParameter;
1782
+ }
1783
+ declare interface TSInstantiationExpression extends BaseNode {
1784
+ type: AST_NODE_TYPES.TSInstantiationExpression;
1785
+ expression: Expression;
1786
+ typeArguments: TSTypeParameterInstantiation;
1787
+ }
1788
+ declare interface TSInterfaceBody extends BaseNode {
1789
+ type: AST_NODE_TYPES.TSInterfaceBody;
1790
+ body: TypeElement[];
1791
+ }
1792
+ declare interface TSInterfaceDeclaration extends BaseNode {
1793
+ type: AST_NODE_TYPES.TSInterfaceDeclaration;
1794
+ /**
1795
+ * The body of the interface
1796
+ */
1797
+ body: TSInterfaceBody;
1798
+ /**
1799
+ * Whether the interface was `declare`d
1800
+ */
1801
+ declare: boolean;
1802
+ /**
1803
+ * The types this interface `extends`
1804
+ */
1805
+ extends: TSInterfaceHeritage[];
1806
+ /**
1807
+ * The name of this interface
1808
+ */
1809
+ id: Identifier;
1810
+ /**
1811
+ * The generic type parameters declared for the interface. Empty declaration
1812
+ * (`<>`) is different from no declaration.
1813
+ */
1814
+ typeParameters: TSTypeParameterDeclaration | undefined;
1815
+ }
1816
+ declare interface TSInterfaceHeritage extends TSHeritageBase {
1817
+ type: AST_NODE_TYPES.TSInterfaceHeritage;
1818
+ }
1819
+ declare interface TSIntersectionType extends BaseNode {
1820
+ type: AST_NODE_TYPES.TSIntersectionType;
1821
+ types: TypeNode[];
1822
+ }
1823
+ declare interface TSIntrinsicKeyword extends BaseNode {
1824
+ type: AST_NODE_TYPES.TSIntrinsicKeyword;
1825
+ }
1826
+ declare interface TSLiteralType extends BaseNode {
1827
+ type: AST_NODE_TYPES.TSLiteralType;
1828
+ literal: LiteralExpression | UnaryExpression | UpdateExpression;
1829
+ }
1830
+ declare interface TSMappedType extends BaseNode {
1831
+ type: AST_NODE_TYPES.TSMappedType;
1832
+ constraint: TypeNode;
1833
+ key: Identifier;
1834
+ nameType: TypeNode | null;
1835
+ optional: boolean | '+' | '-' | undefined;
1836
+ readonly: boolean | '+' | '-' | undefined;
1837
+ typeAnnotation: TypeNode | undefined;
1838
+ /** @deprecated Use {@link `constraint`} and {@link `key`} instead. */
1839
+ typeParameter: TSTypeParameter;
1840
+ }
1841
+ declare type TSMethodSignature = TSMethodSignatureComputedName | TSMethodSignatureNonComputedName;
1842
+ declare interface TSMethodSignatureBase extends BaseNode {
1843
+ type: AST_NODE_TYPES.TSMethodSignature;
1844
+ accessibility: Accessibility | undefined;
1845
+ computed: boolean;
1846
+ key: PropertyName;
1847
+ kind: 'get' | 'method' | 'set';
1848
+ optional: boolean;
1849
+ params: Parameter[];
1850
+ readonly: boolean;
1851
+ returnType: TSTypeAnnotation | undefined;
1852
+ static: boolean;
1853
+ typeParameters: TSTypeParameterDeclaration | undefined;
1854
+ }
1855
+ declare interface TSMethodSignatureComputedName extends TSMethodSignatureBase {
1856
+ computed: true;
1857
+ key: PropertyNameComputed;
1858
+ }
1859
+ declare interface TSMethodSignatureNonComputedName extends TSMethodSignatureBase {
1860
+ computed: false;
1861
+ key: PropertyNameNonComputed;
1862
+ }
1863
+ declare interface TSModuleBlock extends BaseNode {
1864
+ type: AST_NODE_TYPES.TSModuleBlock;
1865
+ body: ProgramStatement[];
1866
+ }
1867
+ declare type TSModuleDeclaration = TSModuleDeclarationGlobal | TSModuleDeclarationModule | TSModuleDeclarationNamespace;
1868
+ declare interface TSModuleDeclarationBase extends BaseNode {
1869
+ type: AST_NODE_TYPES.TSModuleDeclaration;
1870
+ /**
1871
+ * The body of the module.
1872
+ * This can only be `undefined` for the code `declare module 'mod';`
1873
+ */
1874
+ body?: TSModuleBlock;
1875
+ /**
1876
+ * Whether the module is `declare`d
1877
+ * @example
1878
+ * ```ts
1879
+ * declare namespace F {}
1880
+ * ```
1881
+ */
1882
+ declare: boolean;
1883
+ /**
1884
+ * Whether this is a global declaration
1885
+ * @example
1886
+ * ```ts
1887
+ * declare global {}
1888
+ * ```
1889
+ *
1890
+ * @deprecated Use {@link kind} instead
1891
+ */
1892
+ global: boolean;
1893
+ /**
1894
+ * The name of the module
1895
+ * ```
1896
+ * namespace A {}
1897
+ * namespace A.B.C {}
1898
+ * module 'a' {}
1899
+ * ```
1900
+ */
1901
+ id: Identifier | Literal | TSQualifiedName;
1902
+ /**
1903
+ * The keyword used to define this module declaration
1904
+ * @example
1905
+ * ```ts
1906
+ * namespace Foo {}
1907
+ * ^^^^^^^^^
1908
+ *
1909
+ * module 'foo' {}
1910
+ * ^^^^^^
1911
+ *
1912
+ * global {}
1913
+ * ^^^^^^
1914
+ * ```
1915
+ */
1916
+ kind: TSModuleDeclarationKind;
1917
+ }
1918
+ declare interface TSModuleDeclarationGlobal extends TSModuleDeclarationBase {
1919
+ body: TSModuleBlock;
1920
+ /**
1921
+ * This will always be an Identifier with name `global`
1922
+ */
1923
+ id: Identifier;
1924
+ kind: 'global';
1925
+ }
1926
+ declare type TSModuleDeclarationKind = 'global' | 'module' | 'namespace';
1927
+ declare type TSModuleDeclarationModule = TSModuleDeclarationModuleWithIdentifierId | TSModuleDeclarationModuleWithStringId;
1928
+ declare interface TSModuleDeclarationModuleBase extends TSModuleDeclarationBase {
1929
+ kind: 'module';
1930
+ }
1931
+ /**
1932
+ * The legacy module declaration, replaced with namespace declarations.
1933
+ * ```
1934
+ * module A {}
1935
+ * ```
1936
+ */
1937
+ declare interface TSModuleDeclarationModuleWithIdentifierId extends TSModuleDeclarationModuleBase {
1938
+ body: TSModuleBlock;
1939
+ id: Identifier;
1940
+ kind: 'module';
1941
+ }
1942
+ declare type TSModuleDeclarationModuleWithStringId = TSModuleDeclarationModuleWithStringIdDeclared | TSModuleDeclarationModuleWithStringIdNotDeclared;
1943
+ /**
1944
+ * A string module declaration that is declared:
1945
+ * ```
1946
+ * declare module 'foo' {}
1947
+ * declare module 'foo';
1948
+ * ```
1949
+ */
1950
+ declare interface TSModuleDeclarationModuleWithStringIdDeclared extends TSModuleDeclarationModuleBase {
1951
+ body?: TSModuleBlock;
1952
+ declare: true;
1953
+ id: StringLiteral;
1954
+ kind: 'module';
1955
+ }
1956
+ /**
1957
+ * A string module declaration that is not declared:
1958
+ * ```
1959
+ * module 'foo' {}
1960
+ * ```
1961
+ */
1962
+ declare interface TSModuleDeclarationModuleWithStringIdNotDeclared extends TSModuleDeclarationModuleBase {
1963
+ body: TSModuleBlock;
1964
+ declare: false;
1965
+ id: StringLiteral;
1966
+ kind: 'module';
1967
+ }
1968
+ declare interface TSModuleDeclarationNamespace extends TSModuleDeclarationBase {
1969
+ body: TSModuleBlock;
1970
+ id: Identifier | TSQualifiedName;
1971
+ kind: 'namespace';
1972
+ }
1973
+ declare interface TSNamedTupleMember extends BaseNode {
1974
+ type: AST_NODE_TYPES.TSNamedTupleMember;
1975
+ elementType: TypeNode;
1976
+ label: Identifier;
1977
+ optional: boolean;
1978
+ }
1979
+ /**
1980
+ * For the following declaration:
1981
+ * ```
1982
+ * export as namespace X;
1983
+ * ```
1984
+ */
1985
+ declare interface TSNamespaceExportDeclaration extends BaseNode {
1986
+ type: AST_NODE_TYPES.TSNamespaceExportDeclaration;
1987
+ /**
1988
+ * The name of the global variable that's exported as namespace
1989
+ */
1990
+ id: Identifier;
1991
+ }
1992
+ declare interface TSNeverKeyword extends BaseNode {
1993
+ type: AST_NODE_TYPES.TSNeverKeyword;
1994
+ }
1995
+ declare interface TSNonNullExpression extends BaseNode {
1996
+ type: AST_NODE_TYPES.TSNonNullExpression;
1997
+ expression: Expression;
1998
+ }
1999
+ declare interface TSNullKeyword extends BaseNode {
2000
+ type: AST_NODE_TYPES.TSNullKeyword;
2001
+ }
2002
+ declare interface TSNumberKeyword extends BaseNode {
2003
+ type: AST_NODE_TYPES.TSNumberKeyword;
2004
+ }
2005
+ declare interface TSObjectKeyword extends BaseNode {
2006
+ type: AST_NODE_TYPES.TSObjectKeyword;
2007
+ }
2008
+ declare interface TSOptionalType extends BaseNode {
2009
+ type: AST_NODE_TYPES.TSOptionalType;
2010
+ typeAnnotation: TypeNode;
2011
+ }
2012
+ declare interface TSParameterProperty extends BaseNode {
2013
+ type: AST_NODE_TYPES.TSParameterProperty;
2014
+ accessibility: Accessibility | undefined;
2015
+ decorators: Decorator[];
2016
+ override: boolean;
2017
+ parameter: AssignmentPattern | BindingName | RestElement;
2018
+ readonly: boolean;
2019
+ static: boolean;
2020
+ }
2021
+ declare interface TSPrivateKeyword extends BaseNode {
2022
+ type: AST_NODE_TYPES.TSPrivateKeyword;
2023
+ }
2024
+ declare type TSPropertySignature = TSPropertySignatureComputedName | TSPropertySignatureNonComputedName;
2025
+ declare interface TSPropertySignatureBase extends BaseNode {
2026
+ type: AST_NODE_TYPES.TSPropertySignature;
2027
+ accessibility: Accessibility | undefined;
2028
+ computed: boolean;
2029
+ key: PropertyName;
2030
+ optional: boolean;
2031
+ readonly: boolean;
2032
+ static: boolean;
2033
+ typeAnnotation: TSTypeAnnotation | undefined;
2034
+ }
2035
+ declare interface TSPropertySignatureComputedName extends TSPropertySignatureBase {
2036
+ computed: true;
2037
+ key: PropertyNameComputed;
2038
+ }
2039
+ declare interface TSPropertySignatureNonComputedName extends TSPropertySignatureBase {
2040
+ computed: false;
2041
+ key: PropertyNameNonComputed;
2042
+ }
2043
+ declare interface TSProtectedKeyword extends BaseNode {
2044
+ type: AST_NODE_TYPES.TSProtectedKeyword;
2045
+ }
2046
+ declare interface TSPublicKeyword extends BaseNode {
2047
+ type: AST_NODE_TYPES.TSPublicKeyword;
2048
+ }
2049
+ declare interface TSQualifiedName extends BaseNode {
2050
+ type: AST_NODE_TYPES.TSQualifiedName;
2051
+ left: EntityName;
2052
+ right: Identifier;
2053
+ }
2054
+ declare interface TSReadonlyKeyword extends BaseNode {
2055
+ type: AST_NODE_TYPES.TSReadonlyKeyword;
2056
+ }
2057
+ declare interface TSRestType extends BaseNode {
2058
+ type: AST_NODE_TYPES.TSRestType;
2059
+ typeAnnotation: TypeNode;
2060
+ }
2061
+ declare interface TSSatisfiesExpression extends BaseNode {
2062
+ type: AST_NODE_TYPES.TSSatisfiesExpression;
2063
+ expression: Expression;
2064
+ typeAnnotation: TypeNode;
2065
+ }
2066
+ declare interface TSStaticKeyword extends BaseNode {
2067
+ type: AST_NODE_TYPES.TSStaticKeyword;
2068
+ }
2069
+ declare interface TSStringKeyword extends BaseNode {
2070
+ type: AST_NODE_TYPES.TSStringKeyword;
2071
+ }
2072
+ declare interface TSSymbolKeyword extends BaseNode {
2073
+ type: AST_NODE_TYPES.TSSymbolKeyword;
2074
+ }
2075
+ declare interface TSTemplateLiteralType extends BaseNode {
2076
+ type: AST_NODE_TYPES.TSTemplateLiteralType;
2077
+ quasis: TemplateElement[];
2078
+ types: TypeNode[];
2079
+ }
2080
+ declare interface TSThisType extends BaseNode {
2081
+ type: AST_NODE_TYPES.TSThisType;
2082
+ }
2083
+ declare interface TSTupleType extends BaseNode {
2084
+ type: AST_NODE_TYPES.TSTupleType;
2085
+ elementTypes: TypeNode[];
2086
+ }
2087
+ declare interface TSTypeAliasDeclaration extends BaseNode {
2088
+ type: AST_NODE_TYPES.TSTypeAliasDeclaration;
2089
+ /**
2090
+ * Whether the type was `declare`d.
2091
+ * @example
2092
+ * ```ts
2093
+ * declare type T = 1;
2094
+ * ```
2095
+ */
2096
+ declare: boolean;
2097
+ /**
2098
+ * The name of the type.
2099
+ */
2100
+ id: Identifier;
2101
+ /**
2102
+ * The "value" (type) of the declaration
2103
+ */
2104
+ typeAnnotation: TypeNode;
2105
+ /**
2106
+ * The generic type parameters declared for the type. Empty declaration
2107
+ * (`<>`) is different from no declaration.
2108
+ */
2109
+ typeParameters: TSTypeParameterDeclaration | undefined;
2110
+ }
2111
+ declare interface TSTypeAnnotation extends BaseNode {
2112
+ type: AST_NODE_TYPES.TSTypeAnnotation;
2113
+ typeAnnotation: TypeNode;
2114
+ }
2115
+ declare interface TSTypeAssertion extends BaseNode {
2116
+ type: AST_NODE_TYPES.TSTypeAssertion;
2117
+ expression: Expression;
2118
+ typeAnnotation: TypeNode;
2119
+ }
2120
+ declare interface TSTypeLiteral extends BaseNode {
2121
+ type: AST_NODE_TYPES.TSTypeLiteral;
2122
+ members: TypeElement[];
2123
+ }
2124
+ declare interface TSTypeOperator extends BaseNode {
2125
+ type: AST_NODE_TYPES.TSTypeOperator;
2126
+ operator: 'keyof' | 'readonly' | 'unique';
2127
+ typeAnnotation: TypeNode | undefined;
2128
+ }
2129
+ declare interface TSTypeParameter extends BaseNode {
2130
+ type: AST_NODE_TYPES.TSTypeParameter;
2131
+ const: boolean;
2132
+ constraint: TypeNode | undefined;
2133
+ default: TypeNode | undefined;
2134
+ in: boolean;
2135
+ name: Identifier;
2136
+ out: boolean;
2137
+ }
2138
+ declare interface TSTypeParameterDeclaration extends BaseNode {
2139
+ type: AST_NODE_TYPES.TSTypeParameterDeclaration;
2140
+ params: TSTypeParameter[];
2141
+ }
2142
+ declare interface TSTypeParameterInstantiation extends BaseNode {
2143
+ type: AST_NODE_TYPES.TSTypeParameterInstantiation;
2144
+ params: TypeNode[];
2145
+ }
2146
+ declare interface TSTypePredicate extends BaseNode {
2147
+ type: AST_NODE_TYPES.TSTypePredicate;
2148
+ asserts: boolean;
2149
+ parameterName: Identifier | TSThisType;
2150
+ typeAnnotation: TSTypeAnnotation | null;
2151
+ }
2152
+ declare interface TSTypeQuery extends BaseNode {
2153
+ type: AST_NODE_TYPES.TSTypeQuery;
2154
+ exprName: EntityName | TSImportType;
2155
+ typeArguments: TSTypeParameterInstantiation | undefined;
2156
+ }
2157
+ declare interface TSTypeReference extends BaseNode {
2158
+ type: AST_NODE_TYPES.TSTypeReference;
2159
+ typeArguments: TSTypeParameterInstantiation | undefined;
2160
+ typeName: EntityName;
2161
+ }
2162
+ declare interface TSUndefinedKeyword extends BaseNode {
2163
+ type: AST_NODE_TYPES.TSUndefinedKeyword;
2164
+ }
2165
+ declare interface TSUnionType extends BaseNode {
2166
+ type: AST_NODE_TYPES.TSUnionType;
2167
+ types: TypeNode[];
2168
+ }
2169
+ declare interface TSUnknownKeyword extends BaseNode {
2170
+ type: AST_NODE_TYPES.TSUnknownKeyword;
2171
+ }
2172
+ declare interface TSVoidKeyword extends BaseNode {
2173
+ type: AST_NODE_TYPES.TSVoidKeyword;
2174
+ }
2175
+ declare type TypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSIndexSignature | TSMethodSignature | TSPropertySignature;
2176
+ declare type TypeNode = TSAbstractKeyword | TSAnyKeyword | TSArrayType | TSAsyncKeyword | TSBigIntKeyword | TSBooleanKeyword | TSConditionalType | TSConstructorType | TSDeclareKeyword | TSExportKeyword | TSFunctionType | TSImportType | TSIndexedAccessType | TSInferType | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSNamedTupleMember | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSPrivateKeyword | TSProtectedKeyword | TSPublicKeyword | TSQualifiedName | TSReadonlyKeyword | TSRestType | TSStaticKeyword | TSStringKeyword | TSSymbolKeyword | TSTemplateLiteralType | TSThisType | TSTupleType | TSTypeLiteral | TSTypeOperator | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword;
2177
+ declare interface UnaryExpression extends UnaryExpressionBase {
2178
+ type: AST_NODE_TYPES.UnaryExpression;
2179
+ operator: '!' | '+' | '~' | '-' | 'delete' | 'typeof' | 'void';
2180
+ }
2181
+ declare interface UnaryExpressionBase extends BaseNode {
2182
+ argument: Expression;
2183
+ operator: string;
2184
+ prefix: boolean;
2185
+ }
2186
+ declare interface UpdateExpression extends UnaryExpressionBase {
2187
+ type: AST_NODE_TYPES.UpdateExpression;
2188
+ operator: '++' | '--';
2189
+ }
2190
+ declare type UsingDeclaration = UsingInForOfDeclaration | UsingInNormalContextDeclaration;
2191
+ declare interface UsingDeclarationBase extends BaseNode {
2192
+ type: AST_NODE_TYPES.VariableDeclaration;
2193
+ /**
2194
+ * This value will always be `false`
2195
+ * because 'declare' modifier cannot appear on a 'using' declaration.
2196
+ */
2197
+ declare: false;
2198
+ /**
2199
+ * The keyword used to declare the variable(s)
2200
+ * @example
2201
+ * ```ts
2202
+ * using x = 1;
2203
+ * await using y = 2;
2204
+ * ```
2205
+ */
2206
+ kind: 'await using' | 'using';
2207
+ }
2208
+ declare interface UsingInForOfDeclaration extends UsingDeclarationBase {
2209
+ /**
2210
+ * The variables declared by this declaration.
2211
+ * Always has exactly one element.
2212
+ * @example
2213
+ * ```ts
2214
+ * for (using x of y) {}
2215
+ * ```
2216
+ */
2217
+ declarations: [UsingInForOfDeclarator];
2218
+ }
2219
+ declare interface UsingInForOfDeclarator extends VariableDeclaratorBase {
2220
+ definite: false;
2221
+ id: Identifier;
2222
+ init: null;
2223
+ }
2224
+ declare interface UsingInNormalContextDeclaration extends UsingDeclarationBase {
2225
+ /**
2226
+ * The variables declared by this declaration.
2227
+ * Always non-empty.
2228
+ * @example
2229
+ * ```ts
2230
+ * using x = 1;
2231
+ * using y = 1, z = 2;
2232
+ * ```
2233
+ */
2234
+ declarations: UsingInNormalContextDeclarator[];
2235
+ }
2236
+ declare interface UsingInNormalContextDeclarator extends VariableDeclaratorBase {
2237
+ definite: false;
2238
+ id: Identifier;
2239
+ init: Expression;
2240
+ }
2241
+ declare type ValueOf<T> = T[keyof T];
2242
+ declare type VariableDeclaration = LetOrConstOrVarDeclaration | UsingDeclaration;
2243
+ declare interface VariableDeclaratorBase extends BaseNode {
2244
+ type: AST_NODE_TYPES.VariableDeclarator;
2245
+ /**
2246
+ * Whether there's definite assignment assertion (`let x!: number`).
2247
+ * If `true`, then: `id` must be an identifier with a type annotation,
2248
+ * `init` must be `null`, and the declarator must be a `var`/`let` declarator.
2249
+ */
2250
+ definite: boolean;
2251
+ /**
2252
+ * The name(s) of the variable(s).
2253
+ */
2254
+ id: BindingName;
2255
+ /**
2256
+ * The initializer expression of the variable. Must be present for `const` unless
2257
+ * in a `declare const`.
2258
+ */
2259
+ init: Expression | null;
2260
+ }
2261
+ declare interface VariableDeclaratorDefiniteAssignment extends VariableDeclaratorBase {
2262
+ definite: true;
2263
+ /**
2264
+ * The name of the variable. Must have a type annotation.
2265
+ */
2266
+ id: Identifier;
2267
+ init: null;
2268
+ }
2269
+ declare interface VariableDeclaratorMaybeInit extends VariableDeclaratorBase {
2270
+ definite: false;
2271
+ }
2272
+ declare interface VariableDeclaratorNoInit extends VariableDeclaratorBase {
2273
+ definite: false;
2274
+ init: null;
2275
+ }
2276
+ declare interface WhileStatement extends BaseNode {
2277
+ type: AST_NODE_TYPES.WhileStatement;
2278
+ body: Statement;
2279
+ test: Expression;
2280
+ }
2281
+ declare interface WithStatement extends BaseNode {
2282
+ type: AST_NODE_TYPES.WithStatement;
2283
+ body: Statement;
2284
+ object: Expression;
2285
+ }
2286
+ declare interface YieldExpression extends BaseNode {
2287
+ type: AST_NODE_TYPES.YieldExpression;
2288
+ argument: Expression | undefined;
2289
+ delegate: boolean;
2290
+ }
2291
+
2292
+ declare const isChildrenCount: (node: MemberExpression, context: _eslint_react_types.RuleContext) => boolean;
2293
+ declare const isChildrenForEach: (node: MemberExpression, context: _eslint_react_types.RuleContext) => boolean;
2294
+ declare const isChildrenMap: (node: MemberExpression, context: _eslint_react_types.RuleContext) => boolean;
2295
+ declare const isChildrenOnly: (node: MemberExpression, context: _eslint_react_types.RuleContext) => boolean;
2296
+ declare const isChildrenToArray: (node: MemberExpression, context: _eslint_react_types.RuleContext) => boolean;
2297
+ declare const isCloneElement: (node: Identifier | MemberExpression, context: _eslint_react_types.RuleContext) => boolean;
2298
+ declare const isCreateContext: (node: Identifier | MemberExpression, context: _eslint_react_types.RuleContext) => boolean;
2299
+ declare const isCreateElement: (node: Identifier | MemberExpression, context: _eslint_react_types.RuleContext) => boolean;
2300
+ declare const isCreateRef: (node: Identifier | MemberExpression, context: _eslint_react_types.RuleContext) => boolean;
2301
+ declare const isForwardRef: (node: Identifier | MemberExpression, context: _eslint_react_types.RuleContext) => boolean;
2302
+ declare const isMemo: (node: Identifier | MemberExpression, context: _eslint_react_types.RuleContext) => boolean;
2303
+ declare const isChildrenCountCall: (node: CallExpression, context: _eslint_react_types.RuleContext) => boolean;
2304
+ declare const isChildrenForEachCall: (node: CallExpression, context: _eslint_react_types.RuleContext) => boolean;
2305
+ declare const isChildrenMapCall: (node: CallExpression, context: _eslint_react_types.RuleContext) => boolean;
2306
+ declare const isChildrenOnlyCall: (node: CallExpression, context: _eslint_react_types.RuleContext) => boolean;
2307
+ declare const isChildrenToArrayCall: (node: CallExpression, context: _eslint_react_types.RuleContext) => boolean;
2308
+ declare const isCloneElementCall: (node: CallExpression, context: _eslint_react_types.RuleContext) => boolean;
2309
+ declare const isCreateContextCall: (node: CallExpression, context: _eslint_react_types.RuleContext) => boolean;
2310
+ declare const isCreateElementCall: (node: CallExpression, context: _eslint_react_types.RuleContext) => boolean;
2311
+ declare const isCreateRefCall: (node: CallExpression, context: _eslint_react_types.RuleContext) => boolean;
2312
+ declare const isForwardRefCall: (node: CallExpression, context: _eslint_react_types.RuleContext) => boolean;
2313
+ declare const isMemoCall: (node: CallExpression, context: _eslint_react_types.RuleContext) => boolean;
299
2314
 
300
2315
  /**
301
2316
  * Unsafe check whether given node is declared directly inside a render property
@@ -357,4 +2372,4 @@ declare function isThisSetState(node: TSESTree.CallExpression): boolean;
357
2372
 
358
2373
  type ERStateKind = "actionState" | "state";
359
2374
 
360
- export { DEFAULT_COMPONENT_HINT, type ERClassComponent, ERClassComponentFlag, type ERComponent, ERComponentHint, type ERComponentKind, type EREffectKind, type EREffectMethodKind, type EREffectPhaseKind, type ERFunctionComponent, ERFunctionComponentFlag, type ERHook, type ERHookKind, type ERLifecycleMethodKind, type ERLifecyclePhaseKind, type ERPhaseKind, type ERSemanticEntry, type ERSemanticNode, type ERStateKind, PHASE_RELEVANCE, RE_COMPONENT_NAME, RE_HOOK_NAME, getComponentNameFromIdentifier, getFunctionComponentIdentifier, getPhaseKindOfFunction, hasNoneOrValidComponentName, isCallFromReact, isCallFromReactMember, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOfCreateElement, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCleanupFunction, isCloneElement, isCloneElementCall, isComponentDidMount, isComponentDidMountFunction, isComponentName, isComponentWillUnmount, isComponentWillUnmountFunction, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isFragmentElement, isFromReact, isFromReactMember, isFunctionOfRenderMethod, isInitializedFromReact, isInsideCreateElementProps, isInsideReactHook, isInsideReactHookCall, isInsideRenderMethod, isInversePhase, isMemo, isMemoCall, isPureComponent, isReactAPICallWithName, isReactAPIWithName, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookCallWithNameAlias, isReactHookCallWithNameLoose, isReactHookName, isRenderFunctionLoose, isRenderPropLoose, isSetupFunction, isThisSetState, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCallLoose, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseSyncExternalStoreCall, isUseTransitionCall, useComponentCollector, useComponentCollectorLegacy, useHookCollector };
2375
+ export { DEFAULT_COMPONENT_HINT, type ERClassComponent, ERClassComponentFlag, type ERComponent, ERComponentHint, type ERComponentKind, type EREffectKind, type EREffectMethodKind, type EREffectPhaseKind, type ERFunctionComponent, ERFunctionComponentFlag, type ERHook, type ERHookKind, type ERLifecycleMethodKind, type ERLifecyclePhaseKind, type ERPhaseKind, type ERSemanticEntry, type ERSemanticNode, type ERStateKind, PHASE_RELEVANCE, RE_COMPONENT_NAME, RE_HOOK_NAME, getComponentNameFromIdentifier, getFunctionComponentIdentifier, hasNoneOrValidComponentName, isCallFromReact, isCallFromReactMember, isChildrenCount, isChildrenCountCall, isChildrenForEach, isChildrenForEachCall, isChildrenMap, isChildrenMapCall, isChildrenOfCreateElement, isChildrenOnly, isChildrenOnlyCall, isChildrenToArray, isChildrenToArrayCall, isClassComponent, isCleanupFunction, isCloneElement, isCloneElementCall, isComponentDidMount, isComponentDidMountFunction, isComponentName, isComponentWillUnmount, isComponentWillUnmountFunction, isCreateContext, isCreateContextCall, isCreateElement, isCreateElementCall, isCreateRef, isCreateRefCall, isDeclaredInRenderPropLoose, isDirectValueOfRenderPropertyLoose, isForwardRef, isForwardRefCall, isFragmentElement, isFromReact, isFromReactMember, isFunctionOfRenderMethod, isInitializedFromReact, isInsideCreateElementProps, isInsideReactHook, isInsideReactHookCall, isInsideRenderMethod, isInversePhase, isMemo, isMemoCall, isPureComponent, isReactAPICallWithName, isReactAPIWithName, isReactHook, isReactHookCall, isReactHookCallWithName, isReactHookCallWithNameAlias, isReactHookCallWithNameLoose, isReactHookName, isRenderFunctionLoose, isRenderPropLoose, isSetupFunction, isThisSetState, isUseCallbackCall, isUseContextCall, isUseDebugValueCall, isUseDeferredValueCall, isUseEffectCall, isUseEffectCallLoose, isUseIdCall, isUseImperativeHandleCall, isUseInsertionEffectCall, isUseLayoutEffectCall, isUseMemoCall, isUseReducerCall, isUseRefCall, isUseStateCall, isUseSyncExternalStoreCall, isUseTransitionCall, useComponentCollector, useComponentCollectorLegacy, useHookCollector };