import ts, { AmdDependency, CompilerOptions, FileReference, LanguageVariant, LineAndCharacter, Node, NodeArray, Program, ResolutionMode, ScriptTarget, Signature, SymbolFlags, SyntaxKind, TextChangeRange, TupleTypeReference, Type, TypeChecker, TypeFlags, TypeReference, __String } from "typescript"; //#region rolldown:runtime declare namespace ast_d_exports { export { AbstractKeyword, AccessorDeclaration, AccessorKeyword, AdditiveOperator, AdditiveOperatorOrHigher, AnyKeyword, AnyNode, ArrayBindingElement, ArrayBindingPattern, ArrayLiteralExpression, ArrayTypeNode, ArrowFunction, AsExpression, AssertsKeyword, AssignmentOperator, AssignmentOperatorOrHigher, AsteriskToken, AsyncKeyword, AwaitExpression, AwaitKeyword, BigIntKeyword, BigIntLiteral, BinaryExpression, BinaryOperator, BinaryOperatorToken, BindingElement, BindingName, BindingPattern, BitwiseOperator, BitwiseOperatorOrHigher, Block, BooleanKeyword, BooleanLiteral, BreakStatement, CallExpression, CallSignatureDeclaration, CaseBlock, CaseClause, CaseOrDefaultClause, CatchClause, ClassDeclaration, ClassElement, ClassExpression, ClassStaticBlockDeclaration, ColonToken, CommaListExpression, CompoundAssignmentOperator, ComputedPropertyName, ConciseBody, ConditionalExpression, ConditionalTypeNode, ConstKeyword, ConstructSignatureDeclaration, ConstructorDeclaration, ConstructorTypeNode, ContinueStatement, DebuggerStatement, DeclarationStatement, DeclareKeyword, Decorator, DefaultClause, DefaultKeyword, DeleteExpression, DoStatement, DotDotDotToken, ElementAccessExpression, EmptyStatement, EntityName, EnumDeclaration, EnumMember, EqualityOperator, EqualityOperatorOrHigher, EqualsGreaterThanToken, EqualsToken, ExclamationToken, ExponentiationOperator, ExportAssignment, ExportDeclaration, ExportKeyword, ExportSpecifier, Expression, ExpressionParent, ExpressionStatement, ExpressionWithTypeArguments, ExternalModuleReference, FalseLiteral, ForInStatement, ForInitializer, ForOfStatement, ForStatement, FunctionBody, FunctionDeclaration, FunctionExpression, FunctionOrConstructorTypeNodeBase, FunctionTypeNode, GetAccessorDeclaration, HeritageClause, Identifier, IfStatement, ImportAttribute, ImportAttributeName, ImportAttributes, ImportClause, ImportDeclaration, ImportEqualsDeclaration, ImportExpression, ImportPhaseModifierSyntaxKind, ImportSpecifier, ImportTypeNode, InKeyword, IndexSignatureDeclaration, IndexedAccessTypeNode, InferTypeNode, InterfaceDeclaration, IntersectionTypeNode, IntrinsicKeyword, IterationStatement, JSDocAllType, JSDocComment, JSDocFunctionType, JSDocLink, JSDocLinkCode, JSDocLinkPlain, JSDocMemberName, JSDocNamepathType, JSDocNamespaceBody, JSDocNamespaceDeclaration, JSDocNonNullableType, JSDocNullableType, JSDocOptionalType, JSDocParameterTag, JSDocPropertyLikeTag, JSDocPropertyTag, JSDocReturnTag, JSDocSignature, JSDocTemplateTag, JSDocText, JSDocType, JSDocTypeExpression, JSDocTypeLiteral, JSDocUnknownType, JSDocVariadicType, JsxAttribute, JsxAttributeLike, JsxAttributeName, JsxAttributeValue, JsxAttributes, JsxChild, JsxClosingElement, JsxClosingFragment, JsxElement, JsxExpression, JsxFragment, JsxNamespacedName, JsxOpeningElement, JsxOpeningFragment, JsxSelfClosingElement, JsxSpreadAttribute, JsxTagNameExpression, JsxTagNamePropertyAccess, JsxText, LabeledStatement, LeftHandSideExpression, LeftHandSideExpressionParent, LiteralExpression, LiteralTypeNode, LogicalOperator, LogicalOperatorOrHigher, MappedTypeNode, MemberExpression, MemberName, MetaProperty, MethodDeclaration, MethodSignature, MinusToken, MissingDeclaration, Modifier, ModifierLike, ModifierParent, ModuleBlock, ModuleBody, ModuleDeclaration, ModuleExportName, ModuleName, ModuleReference, MultiplicativeOperator, MultiplicativeOperatorOrHigher, NamedExportBindings, NamedExports, NamedImportBindings, NamedImports, NamedTupleMember, NamespaceBody, NamespaceDeclaration, NamespaceExport, NamespaceExportDeclaration, NamespaceImport, NeverKeyword, NewExpression, NoSubstitutionTemplateLiteral, NodeWithTypeArguments, NonNullExpression, NotEmittedStatement, NotEmittedTypeElement, NullLiteral, NullNode, NumberKeyword, NumericLiteral, ObjectBindingPattern, ObjectKeyword, ObjectLiteralElementLike, ObjectLiteralExpression, ObjectLiteralExpressionBase, OmittedExpression, OptionalTypeNode, OutKeyword, OverrideKeyword, ParameterDeclaration, ParenthesizedExpression, ParenthesizedTypeNode, PartiallyEmittedExpression, PlusToken, PostfixUnaryExpression, PostfixUnaryOperator, PrefixUnaryExpression, PrefixUnaryOperator, PrimaryExpression, PrivateIdentifier, PrivateKeyword, PropertyAccessExpression, PropertyAssignment, PropertyDeclaration, PropertyName, PropertySignature, ProtectedKeyword, PublicKeyword, QualifiedName, QuestionDotToken, QuestionToken, ReadonlyKeyword, RegularExpressionLiteral, RelationalOperator, RelationalOperatorOrHigher, RestTypeNode, ReturnStatement, SatisfiesExpression, SemicolonClassElement, SetAccessorDeclaration, ShiftOperator, ShiftOperatorOrHigher, ShorthandPropertyAssignment, SourceFile, SpreadAssignment, SpreadElement, Statement, StatementParent, StaticKeyword, StringKeyword, StringLiteral, SuperExpression, SwitchStatement, SymbolKeyword, SyntheticExpression, TaggedTemplateExpression, TemplateExpression, TemplateHead, TemplateLiteral, TemplateLiteralTypeNode, TemplateLiteralTypeSpan, TemplateMiddle, TemplateSpan, TemplateTail, ThisExpression, ThisTypeNode, ThrowStatement, TrueLiteral, TryStatement, TupleTypeNode, TypeAliasDeclaration, TypeAssertion, TypeElement, TypeLiteralNode, TypeNode, TypeNodeParent, TypeOfExpression, TypeOperatorNode, TypeParameterDeclaration, TypePredicateNode, TypeQueryNode, TypeReferenceNode, UnaryExpression, UndefinedKeyword, UnionTypeNode, UnknownKeyword, UpdateExpression, VariableDeclaration, VariableDeclarationList, VariableStatement, Visitor, VoidExpression, VoidKeyword, WhileStatement, WithStatement, YieldExpression }; } interface SourceFile extends Node { readonly kind: SyntaxKind.SourceFile; readonly parent: NullNode; readonly statements: NodeArray; readonly endOfFileToken: Token; fileName: string; text: string; amdDependencies: readonly AmdDependency[]; moduleName?: string; referencedFiles: readonly FileReference[]; typeReferenceDirectives: readonly FileReference[]; libReferenceDirectives: readonly FileReference[]; languageVariant: LanguageVariant; isDeclarationFile: boolean; /** @deprecated Always false. Use a Program to determine if a file is a lib file. */ hasNoDefaultLib: boolean; languageVersion: ScriptTarget; /** * When `module` is `Node16` or `NodeNext`, this field controls whether the * source file in question is an ESNext-output-format file, or a CommonJS-output-format * module. This is derived by the module resolver as it looks up the file, since * it is derived from either the file extension of the module, or the containing * `package.json` context, and affects both checking and emit. * * It is _public_ so that (pre)transformers can set this field, * since it switches the builtin `node` module transform. Generally speaking, if unset, * the field is treated as though it is `ModuleKind.CommonJS`. * * Note that this field is only set by the module resolution process when * `moduleResolution` is `Node16` or `NodeNext`, which is implied by the `module` setting * of `Node16` or `NodeNext`, respectively, but may be overriden (eg, by a `moduleResolution` * of `node`). If so, this field will be unset and source files will be considered to be * CommonJS-output-format by the node module transformer and type checker, regardless of extension or context. */ impliedNodeFormat?: ResolutionMode; getLineAndCharacterOfPosition(pos: number): LineAndCharacter; getLineEndOfPosition(pos: number): number; getLineStarts(): readonly number[]; getPositionOfLineAndCharacter(line: number, character: number): number; update(newText: string, textChangeRange: TextChangeRange): SourceFile; } type Statement = DeclarationStatement | NotEmittedStatement | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | IterationStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | ModuleBlock | ImportDeclaration; type DeclarationStatement = FunctionDeclaration | MissingDeclaration | ClassDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | NamespaceExportDeclaration | ExportDeclaration | ExportAssignment; interface FunctionDeclaration extends Node { readonly kind: SyntaxKind.FunctionDeclaration; readonly parent: StatementParent; readonly modifiers?: NodeArray; readonly name?: Identifier; readonly body?: FunctionBody; readonly asteriskToken?: AsteriskToken | undefined; readonly questionToken?: QuestionToken | undefined; readonly exclamationToken?: ExclamationToken | undefined; readonly typeParameters?: NodeArray | undefined; readonly parameters: NodeArray; readonly type?: TypeNode | undefined; } type ModifierLike = Modifier | Decorator; type Modifier = AbstractKeyword | AccessorKeyword | AsyncKeyword | ConstKeyword | DeclareKeyword | DefaultKeyword | ExportKeyword | InKeyword | PrivateKeyword | ProtectedKeyword | PublicKeyword | OutKeyword | OverrideKeyword | ReadonlyKeyword | StaticKeyword; interface AbstractKeyword extends Node { readonly kind: SyntaxKind.AbstractKeyword; readonly parent: ModifierParent; } interface AccessorKeyword extends Node { readonly kind: SyntaxKind.AccessorKeyword; readonly parent: ModifierParent; } interface AsyncKeyword extends Node { readonly kind: SyntaxKind.AsyncKeyword; readonly parent: ModifierParent; } interface ConstKeyword extends Node { readonly kind: SyntaxKind.ConstKeyword; readonly parent: ModifierParent; } interface DeclareKeyword extends Node { readonly kind: SyntaxKind.DeclareKeyword; readonly parent: ModifierParent; } interface DefaultKeyword extends Node { readonly kind: SyntaxKind.DefaultKeyword; readonly parent: ModifierParent; } interface ExportKeyword extends Node { readonly kind: SyntaxKind.ExportKeyword; readonly parent: ModifierParent; } interface InKeyword extends Node { readonly kind: SyntaxKind.InKeyword; readonly parent: ModifierParent; } interface PrivateKeyword extends Node { readonly kind: SyntaxKind.PrivateKeyword; readonly parent: ModifierParent; } interface ProtectedKeyword extends Node { readonly kind: SyntaxKind.ProtectedKeyword; readonly parent: ModifierParent; } interface PublicKeyword extends Node { readonly kind: SyntaxKind.PublicKeyword; readonly parent: ModifierParent; } interface OutKeyword extends Node { readonly kind: SyntaxKind.OutKeyword; readonly parent: ModifierParent; } interface OverrideKeyword extends Node { readonly kind: SyntaxKind.OverrideKeyword; readonly parent: ModifierParent; } interface ReadonlyKeyword extends Node { readonly kind: SyntaxKind.ReadonlyKeyword; readonly parent: ModifierParent | MappedTypeNode; } interface StaticKeyword extends Node { readonly kind: SyntaxKind.StaticKeyword; readonly parent: ModifierParent; } interface Decorator extends Node { readonly kind: SyntaxKind.Decorator; readonly parent: AccessorDeclaration | ParameterDeclaration | IndexSignatureDeclaration | MethodDeclaration | ClassExpression | PropertyDeclaration | ConstructorDeclaration | FunctionDeclaration | ClassDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumDeclaration | ModuleDeclaration | NamespaceDeclaration | JSDocNamespaceDeclaration | ImportEqualsDeclaration | ExportDeclaration | ExportAssignment | VariableStatement | ImportDeclaration; readonly expression: LeftHandSideExpression; } type LeftHandSideExpression = PartiallyEmittedExpression | MemberExpression | CallExpression | NonNullExpression; interface PartiallyEmittedExpression extends Node { readonly kind: SyntaxKind.PartiallyEmittedExpression; readonly parent: LeftHandSideExpressionParent; readonly expression: Expression; } type Expression = OmittedExpression | UnaryExpression | YieldExpression | SyntheticExpression | BinaryExpression | ConditionalExpression | ArrowFunction | SpreadElement | AsExpression | SatisfiesExpression | JsxOpeningElement | JsxOpeningFragment | JsxClosingFragment | JsxExpression | CommaListExpression; interface OmittedExpression extends Node { readonly kind: SyntaxKind.OmittedExpression; readonly parent: ExpressionParent | ArrayBindingPattern; } type UnaryExpression = UpdateExpression | DeleteExpression | TypeOfExpression | VoidExpression | AwaitExpression | TypeAssertion; type UpdateExpression = PrefixUnaryExpression | PostfixUnaryExpression | LeftHandSideExpression; interface PrefixUnaryExpression extends Node { readonly kind: SyntaxKind.PrefixUnaryExpression; readonly parent: ExpressionParent | PrefixUnaryExpression | DeleteExpression | TypeOfExpression | VoidExpression | AwaitExpression | TypeAssertion | LiteralTypeNode; readonly operator: PrefixUnaryOperator; readonly operand: UnaryExpression; } type PrefixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken; interface PostfixUnaryExpression extends Node { readonly kind: SyntaxKind.PostfixUnaryExpression; readonly parent: ExpressionParent | PrefixUnaryExpression | DeleteExpression | TypeOfExpression | VoidExpression | AwaitExpression | TypeAssertion; readonly operand: LeftHandSideExpression; readonly operator: PostfixUnaryOperator; } type PostfixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken; interface DeleteExpression extends Node { readonly kind: SyntaxKind.DeleteExpression; readonly parent: ExpressionParent | PrefixUnaryExpression | DeleteExpression | TypeOfExpression | VoidExpression | AwaitExpression | TypeAssertion; readonly expression: UnaryExpression; } interface TypeOfExpression extends Node { readonly kind: SyntaxKind.TypeOfExpression; readonly parent: ExpressionParent | PrefixUnaryExpression | DeleteExpression | TypeOfExpression | VoidExpression | AwaitExpression | TypeAssertion; readonly expression: UnaryExpression; } interface VoidExpression extends Node { readonly kind: SyntaxKind.VoidExpression; readonly parent: ExpressionParent | PrefixUnaryExpression | DeleteExpression | TypeOfExpression | VoidExpression | AwaitExpression | TypeAssertion; readonly expression: UnaryExpression; } interface AwaitExpression extends Node { readonly kind: SyntaxKind.AwaitExpression; readonly parent: ExpressionParent | PrefixUnaryExpression | DeleteExpression | TypeOfExpression | VoidExpression | AwaitExpression | TypeAssertion; readonly expression: UnaryExpression; } interface TypeAssertion extends Node { readonly kind: SyntaxKind.TypeAssertionExpression; readonly parent: ExpressionParent | PrefixUnaryExpression | DeleteExpression | TypeOfExpression | VoidExpression | AwaitExpression | TypeAssertion; readonly type: TypeNode; readonly expression: UnaryExpression; } type TypeNode = AnyKeyword | BigIntKeyword | BooleanKeyword | IntrinsicKeyword | NeverKeyword | NumberKeyword | ObjectKeyword | StringKeyword | SymbolKeyword | UndefinedKeyword | UnknownKeyword | VoidKeyword | ThisTypeNode | FunctionOrConstructorTypeNodeBase | NodeWithTypeArguments | TypePredicateNode | TypeLiteralNode | ArrayTypeNode | TupleTypeNode | NamedTupleMember | OptionalTypeNode | RestTypeNode | UnionTypeNode | IntersectionTypeNode | ConditionalTypeNode | InferTypeNode | ParenthesizedTypeNode | TypeOperatorNode | IndexedAccessTypeNode | MappedTypeNode | LiteralTypeNode | TemplateLiteralTypeNode | TemplateLiteralTypeSpan | JSDocTypeExpression | JSDocType; interface AnyKeyword extends Node { readonly kind: SyntaxKind.AnyKeyword; readonly parent: TypeNodeParent; } interface BigIntKeyword extends Node { readonly kind: SyntaxKind.BigIntKeyword; readonly parent: TypeNodeParent; } interface BooleanKeyword extends Node { readonly kind: SyntaxKind.BooleanKeyword; readonly parent: TypeNodeParent; } interface IntrinsicKeyword extends Node { readonly kind: SyntaxKind.IntrinsicKeyword; readonly parent: TypeNodeParent; } interface NeverKeyword extends Node { readonly kind: SyntaxKind.NeverKeyword; readonly parent: TypeNodeParent; } interface NumberKeyword extends Node { readonly kind: SyntaxKind.NumberKeyword; readonly parent: TypeNodeParent; } interface ObjectKeyword extends Node { readonly kind: SyntaxKind.ObjectKeyword; readonly parent: TypeNodeParent; } interface StringKeyword extends Node { readonly kind: SyntaxKind.StringKeyword; readonly parent: TypeNodeParent; } interface SymbolKeyword extends Node { readonly kind: SyntaxKind.SymbolKeyword; readonly parent: TypeNodeParent; } interface UndefinedKeyword extends Node { readonly kind: SyntaxKind.UndefinedKeyword; readonly parent: TypeNodeParent; } interface UnknownKeyword extends Node { readonly kind: SyntaxKind.UnknownKeyword; readonly parent: TypeNodeParent; } interface VoidKeyword extends Node { readonly kind: SyntaxKind.VoidKeyword; readonly parent: TypeNodeParent; } interface ThisTypeNode extends Node { readonly kind: SyntaxKind.ThisType; readonly parent: TypeNodeParent; } type FunctionOrConstructorTypeNodeBase = FunctionTypeNode | ConstructorTypeNode; interface FunctionTypeNode extends Node { readonly kind: SyntaxKind.FunctionType; readonly parent: TypeNodeParent; readonly type: TypeNode; readonly name?: PropertyName; readonly typeParameters?: NodeArray | undefined; readonly parameters: NodeArray; } type PropertyName = Identifier | StringLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier | BigIntLiteral; interface Identifier extends Node { readonly kind: SyntaxKind.Identifier; readonly parent: IterationStatement | JsxAttributeLike | JSDocPropertyLikeTag | TypeElement | NodeWithTypeArguments | FunctionOrConstructorTypeNodeBase | DeclarationStatement | BindingElement | JSDocFunctionType | PropertyAssignment | SpreadAssignment | MethodDeclaration | PropertyDeclaration | ConstructorDeclaration | SemicolonClassElement | ClassStaticBlockDeclaration | EnumMember | TypeParameterDeclaration | ParameterDeclaration | VariableDeclaration | ImportAttribute | QualifiedName | JSDocLink | JSDocMemberName | JSDocLinkCode | JSDocLinkPlain | TypePredicateNode | NamedTupleMember | JSDocTemplateTag | JSDocReturnTag | JsxOpeningElement | JsxSelfClosingElement | JsxClosingElement | JsxTagNamePropertyAccess | PropertyAccessExpression | JsxNamespacedName | PostfixUnaryExpression | PrefixUnaryExpression | DeleteExpression | TypeOfExpression | VoidExpression | AwaitExpression | TypeAssertion | ComputedPropertyName | YieldExpression | BinaryExpression | ConditionalExpression | ArrowFunction | SpreadElement | AsExpression | SatisfiesExpression | JsxExpression | CommaListExpression | PartiallyEmittedExpression | TemplateSpan | ParenthesizedExpression | ArrayLiteralExpression | ShorthandPropertyAssignment | NewExpression | ElementAccessExpression | CallExpression | NonNullExpression | ExternalModuleReference | ExpressionStatement | IfStatement | ReturnStatement | WithStatement | SwitchStatement | CaseClause | ThrowStatement | ImportDeclaration | TaggedTemplateExpression | Decorator | FunctionExpression | MetaProperty | ClassExpression | NamespaceDeclaration | JSDocNamespaceDeclaration | NamespaceExport | ExportSpecifier | ImportSpecifier | BreakStatement | ContinueStatement | LabeledStatement | ImportClause | NamespaceImport; /** * Prefer to use `id.unescapedText`. (Note: This is available only in services, not internally to the TypeScript compiler.) * Text of identifier, but if the identifier begins with two underscores, this will begin with three. */ readonly escapedText: __String; readonly text: string; } interface StringLiteral extends Node { readonly kind: SyntaxKind.StringLiteral; readonly parent: IterationStatement | JsxAttributeLike | TypeElement | FunctionOrConstructorTypeNodeBase | BindingElement | JSDocFunctionType | PropertyAssignment | SpreadAssignment | MethodDeclaration | PropertyDeclaration | ConstructorDeclaration | SemicolonClassElement | ClassStaticBlockDeclaration | EnumMember | ImportAttribute | LiteralTypeNode | PostfixUnaryExpression | PrefixUnaryExpression | DeleteExpression | TypeOfExpression | VoidExpression | AwaitExpression | TypeAssertion | ComputedPropertyName | TypeParameterDeclaration | ParameterDeclaration | YieldExpression | BinaryExpression | ConditionalExpression | ArrowFunction | SpreadElement | AsExpression | SatisfiesExpression | JsxExpression | CommaListExpression | PartiallyEmittedExpression | TemplateSpan | ParenthesizedExpression | ArrayLiteralExpression | ShorthandPropertyAssignment | NewExpression | ElementAccessExpression | CallExpression | NonNullExpression | ExternalModuleReference | ExportDeclaration | ExportAssignment | VariableDeclaration | ExpressionStatement | IfStatement | ReturnStatement | WithStatement | SwitchStatement | CaseClause | ThrowStatement | ImportDeclaration | ExpressionWithTypeArguments | PropertyAccessExpression | TaggedTemplateExpression | Decorator | ModuleDeclaration | NamespaceExport | ExportSpecifier | ImportSpecifier; text: string; isUnterminated?: boolean; hasExtendedUnicodeEscape?: boolean; } interface NoSubstitutionTemplateLiteral extends Node { readonly kind: SyntaxKind.NoSubstitutionTemplateLiteral; readonly parent: LeftHandSideExpressionParent | TypeElement | FunctionOrConstructorTypeNodeBase | JSDocFunctionType | MethodDeclaration | ConstructorDeclaration | SemicolonClassElement | ClassStaticBlockDeclaration | LiteralTypeNode; text: string; isUnterminated?: boolean; hasExtendedUnicodeEscape?: boolean; rawText?: string; } interface NumericLiteral extends Node { readonly kind: SyntaxKind.NumericLiteral; readonly parent: LeftHandSideExpressionParent | TypeElement | FunctionOrConstructorTypeNodeBase | JSDocFunctionType | MethodDeclaration | ConstructorDeclaration | SemicolonClassElement | ClassStaticBlockDeclaration | LiteralTypeNode; text: string; isUnterminated?: boolean; hasExtendedUnicodeEscape?: boolean; } interface ComputedPropertyName extends Node { readonly kind: SyntaxKind.ComputedPropertyName; readonly parent: TypeElement | FunctionOrConstructorTypeNodeBase | BindingElement | JSDocFunctionType | JsxSpreadAttribute | PropertyAssignment | SpreadAssignment | MethodDeclaration | PropertyDeclaration | ConstructorDeclaration | SemicolonClassElement | ClassStaticBlockDeclaration | EnumMember; readonly expression: Expression; } interface PrivateIdentifier extends Node { readonly kind: SyntaxKind.PrivateIdentifier; readonly parent: LeftHandSideExpressionParent | TypeElement | FunctionOrConstructorTypeNodeBase | JSDocFunctionType | MethodDeclaration | ConstructorDeclaration | SemicolonClassElement | ClassStaticBlockDeclaration | JsxTagNamePropertyAccess; readonly escapedText: __String; readonly text: string; } interface BigIntLiteral extends Node { readonly kind: SyntaxKind.BigIntLiteral; readonly parent: LeftHandSideExpressionParent | TypeElement | FunctionOrConstructorTypeNodeBase | JSDocFunctionType | MethodDeclaration | ConstructorDeclaration | SemicolonClassElement | ClassStaticBlockDeclaration | LiteralTypeNode; text: string; isUnterminated?: boolean; hasExtendedUnicodeEscape?: boolean; } interface TypeParameterDeclaration extends Node { readonly kind: SyntaxKind.TypeParameter; readonly parent: AccessorDeclaration | FunctionOrConstructorTypeNodeBase | CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | IndexSignatureDeclaration | InferTypeNode | MappedTypeNode | JSDocFunctionType | JSDocTemplateTag | ArrowFunction | FunctionExpression | MethodDeclaration | ClassExpression | ConstructorDeclaration | FunctionDeclaration | ClassDeclaration | InterfaceDeclaration | TypeAliasDeclaration; readonly modifiers?: NodeArray; readonly name: Identifier; /** Note: Consider calling `getEffectiveConstraintOfTypeParameter` */ readonly constraint?: TypeNode; readonly default?: TypeNode; expression?: Expression; } interface ParameterDeclaration extends Node { readonly kind: SyntaxKind.Parameter; readonly parent: AccessorDeclaration | FunctionOrConstructorTypeNodeBase | CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | IndexSignatureDeclaration | JSDocFunctionType | SyntheticExpression | ArrowFunction | FunctionExpression | MethodDeclaration | ConstructorDeclaration | FunctionDeclaration; readonly modifiers?: NodeArray; readonly dotDotDotToken?: DotDotDotToken; readonly name: BindingName; readonly questionToken?: QuestionToken; readonly type?: TypeNode; readonly initializer?: Expression; } interface DotDotDotToken extends Node { readonly kind: SyntaxKind.DotDotDotToken; readonly parent: ParameterDeclaration | BindingElement; } type BindingName = Identifier | BindingPattern; type BindingPattern = ObjectBindingPattern | ArrayBindingPattern; interface ObjectBindingPattern extends Node { readonly kind: SyntaxKind.ObjectBindingPattern; readonly parent: BindingElement | ParameterDeclaration | VariableDeclaration; readonly elements: NodeArray; } interface BindingElement extends Node { readonly kind: SyntaxKind.BindingElement; readonly parent: BindingPattern; readonly propertyName?: PropertyName; readonly dotDotDotToken?: DotDotDotToken; readonly name: BindingName; readonly initializer?: Expression; } interface ArrayBindingPattern extends Node { readonly kind: SyntaxKind.ArrayBindingPattern; readonly parent: BindingElement | ParameterDeclaration | VariableDeclaration; readonly elements: NodeArray; } type ArrayBindingElement = BindingElement | OmittedExpression; interface QuestionToken extends Node { readonly kind: SyntaxKind.QuestionToken; readonly parent: TypeElement | ParameterDeclaration | MappedTypeNode | ConditionalExpression | ArrowFunction | FunctionExpression | MethodDeclaration | PropertyDeclaration | ConstructorDeclaration | FunctionDeclaration; } interface ConstructorTypeNode extends Node { readonly kind: SyntaxKind.ConstructorType; readonly parent: TypeNodeParent; readonly modifiers?: NodeArray; readonly type: TypeNode; readonly name?: PropertyName; readonly typeParameters?: NodeArray | undefined; readonly parameters: NodeArray; } type NodeWithTypeArguments = ImportTypeNode | TypeReferenceNode | TypeQueryNode | ExpressionWithTypeArguments; interface ImportTypeNode extends Node { readonly kind: SyntaxKind.ImportType; readonly parent: TypeNodeParent; readonly isTypeOf: boolean; readonly argument: TypeNode; readonly attributes?: ImportAttributes; readonly qualifier?: EntityName; readonly typeArguments?: NodeArray; } interface ImportAttributes extends Node { readonly kind: SyntaxKind.ImportAttributes; readonly parent: ImportTypeNode | ExportDeclaration | ImportDeclaration; readonly token: SyntaxKind.WithKeyword | SyntaxKind.AssertKeyword; readonly elements: NodeArray; readonly multiLine?: boolean; } interface ImportAttribute extends Node { readonly kind: SyntaxKind.ImportAttribute; readonly parent: ImportAttributes; readonly name: ImportAttributeName; readonly value: Expression; } type ImportAttributeName = Identifier | StringLiteral; type EntityName = Identifier | QualifiedName; interface QualifiedName extends Node { readonly kind: SyntaxKind.QualifiedName; readonly parent: JSDocPropertyLikeTag | QualifiedName | ImportTypeNode | TypeReferenceNode | TypeQueryNode | JSDocLink | JSDocMemberName | JSDocLinkCode | JSDocLinkPlain | ImportEqualsDeclaration; readonly left: EntityName; readonly right: Identifier; } interface TypeReferenceNode extends Node { readonly kind: SyntaxKind.TypeReference; readonly parent: TypeNodeParent; readonly typeName: EntityName; readonly typeArguments?: NodeArray; } interface TypeQueryNode extends Node { readonly kind: SyntaxKind.TypeQuery; readonly parent: TypeNodeParent; readonly exprName: EntityName; readonly typeArguments?: NodeArray; } interface ExpressionWithTypeArguments extends Node { readonly kind: SyntaxKind.ExpressionWithTypeArguments; readonly parent: IterationStatement | ObjectLiteralElementLike | NodeWithTypeArguments | FunctionOrConstructorTypeNodeBase | TypeParameterDeclaration | ParameterDeclaration | TypePredicateNode | CallSignatureDeclaration | ConstructSignatureDeclaration | PropertySignature | MethodSignature | IndexSignatureDeclaration | ArrayTypeNode | TupleTypeNode | NamedTupleMember | OptionalTypeNode | RestTypeNode | UnionTypeNode | IntersectionTypeNode | ConditionalTypeNode | ParenthesizedTypeNode | TypeOperatorNode | IndexedAccessTypeNode | MappedTypeNode | TemplateLiteralTypeSpan | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocFunctionType | JSDocVariadicType | JSDocNamepathType | TypeAssertion | ArrowFunction | AsExpression | SatisfiesExpression | JsxOpeningElement | JsxSelfClosingElement | FunctionExpression | NewExpression | PropertyDeclaration | ConstructorDeclaration | TaggedTemplateExpression | CallExpression | FunctionDeclaration | TypeAliasDeclaration | VariableDeclaration | HeritageClause | PostfixUnaryExpression | PrefixUnaryExpression | DeleteExpression | TypeOfExpression | VoidExpression | AwaitExpression | ComputedPropertyName | BindingElement | ImportAttribute | YieldExpression | BinaryExpression | ConditionalExpression | SpreadElement | JsxExpression | JsxSpreadAttribute | CommaListExpression | PartiallyEmittedExpression | TemplateSpan | ParenthesizedExpression | ArrayLiteralExpression | ElementAccessExpression | NonNullExpression | EnumMember | ExternalModuleReference | ExportDeclaration | ExportAssignment | ExpressionStatement | IfStatement | ReturnStatement | WithStatement | SwitchStatement | CaseClause | ThrowStatement | ImportDeclaration | PropertyAccessExpression | Decorator; readonly expression: LeftHandSideExpression; readonly typeArguments?: NodeArray; } interface TypePredicateNode extends Node { readonly kind: SyntaxKind.TypePredicate; readonly parent: TypeNodeParent; readonly assertsModifier?: AssertsKeyword; readonly parameterName: Identifier | ThisTypeNode; readonly type?: TypeNode; } interface AssertsKeyword extends Node { readonly kind: SyntaxKind.AssertsKeyword; readonly parent: TypePredicateNode; } interface TypeLiteralNode extends Node { readonly kind: SyntaxKind.TypeLiteral; readonly parent: TypeNodeParent; readonly members: NodeArray; } type TypeElement = CallSignatureDeclaration | ConstructSignatureDeclaration | PropertySignature | MethodSignature | GetAccessorDeclaration | SetAccessorDeclaration | IndexSignatureDeclaration | NotEmittedTypeElement; interface CallSignatureDeclaration extends Node { readonly kind: SyntaxKind.CallSignature; readonly parent: TypeLiteralNode | MappedTypeNode | InterfaceDeclaration; readonly name?: PropertyName; readonly typeParameters?: NodeArray | undefined; readonly parameters: NodeArray; readonly type?: TypeNode | undefined; readonly questionToken?: QuestionToken | undefined; } interface ConstructSignatureDeclaration extends Node { readonly kind: SyntaxKind.ConstructSignature; readonly parent: TypeLiteralNode | MappedTypeNode | InterfaceDeclaration; readonly name?: PropertyName; readonly typeParameters?: NodeArray | undefined; readonly parameters: NodeArray; readonly type?: TypeNode | undefined; readonly questionToken?: QuestionToken | undefined; } interface PropertySignature extends Node { readonly kind: SyntaxKind.PropertySignature; readonly parent: TypeLiteralNode | MappedTypeNode | InterfaceDeclaration; readonly modifiers?: NodeArray; readonly name: PropertyName; readonly questionToken?: QuestionToken; readonly type?: TypeNode; } interface MethodSignature extends Node { readonly kind: SyntaxKind.MethodSignature; readonly parent: TypeLiteralNode | MappedTypeNode | InterfaceDeclaration; readonly modifiers?: NodeArray; readonly name: PropertyName; readonly typeParameters?: NodeArray | undefined; readonly parameters: NodeArray; readonly type?: TypeNode | undefined; readonly questionToken?: QuestionToken | undefined; } interface GetAccessorDeclaration extends Node { readonly kind: SyntaxKind.GetAccessor; readonly parent: ObjectLiteralExpressionBase | TypeLiteralNode | MappedTypeNode | InterfaceDeclaration | ClassExpression | ClassDeclaration; readonly modifiers?: NodeArray; readonly name: PropertyName; readonly body?: FunctionBody; readonly asteriskToken?: AsteriskToken | undefined; readonly questionToken?: QuestionToken | undefined; readonly exclamationToken?: ExclamationToken | undefined; readonly typeParameters?: NodeArray | undefined; readonly parameters: NodeArray; readonly type?: TypeNode | undefined; } type FunctionBody = Block; interface Block extends Node { readonly kind: SyntaxKind.Block; readonly parent: StatementParent | AccessorDeclaration | ArrowFunction | FunctionExpression | MethodDeclaration | ConstructorDeclaration | FunctionDeclaration | ClassStaticBlockDeclaration | TryStatement | CatchClause; readonly statements: NodeArray; } interface AsteriskToken extends Node { readonly kind: SyntaxKind.AsteriskToken; readonly parent: AccessorDeclaration | YieldExpression | ArrowFunction | FunctionExpression | MethodDeclaration | ConstructorDeclaration | FunctionDeclaration; } interface ExclamationToken extends Node { readonly kind: SyntaxKind.ExclamationToken; readonly parent: AccessorDeclaration | ArrowFunction | FunctionExpression | MethodDeclaration | PropertyDeclaration | ConstructorDeclaration | FunctionDeclaration | VariableDeclaration; } interface SetAccessorDeclaration extends Node { readonly kind: SyntaxKind.SetAccessor; readonly parent: ObjectLiteralExpressionBase | TypeLiteralNode | MappedTypeNode | InterfaceDeclaration | ClassExpression | ClassDeclaration; readonly modifiers?: NodeArray; readonly name: PropertyName; readonly body?: FunctionBody; readonly asteriskToken?: AsteriskToken | undefined; readonly questionToken?: QuestionToken | undefined; readonly exclamationToken?: ExclamationToken | undefined; readonly typeParameters?: NodeArray | undefined; readonly parameters: NodeArray; readonly type?: TypeNode | undefined; } interface IndexSignatureDeclaration extends Node { readonly kind: SyntaxKind.IndexSignature; readonly parent: TypeLiteralNode | MappedTypeNode | InterfaceDeclaration | ClassExpression | ClassDeclaration; readonly modifiers?: NodeArray; readonly type: TypeNode; readonly name?: PropertyName; readonly typeParameters?: NodeArray | undefined; readonly parameters: NodeArray; readonly questionToken?: QuestionToken | undefined; } interface NotEmittedTypeElement extends Node { readonly kind: SyntaxKind.NotEmittedTypeElement; readonly parent: TypeLiteralNode | MappedTypeNode | InterfaceDeclaration; readonly name?: PropertyName; readonly questionToken?: QuestionToken | undefined; } interface ArrayTypeNode extends Node { readonly kind: SyntaxKind.ArrayType; readonly parent: TypeNodeParent; readonly elementType: TypeNode; } interface TupleTypeNode extends Node { readonly kind: SyntaxKind.TupleType; readonly parent: TypeNodeParent; readonly elements: NodeArray; } interface NamedTupleMember extends Node { readonly kind: SyntaxKind.NamedTupleMember; readonly parent: TypeNodeParent | SyntheticExpression; readonly dotDotDotToken?: Token; readonly name: Identifier; readonly questionToken?: Token; readonly type: TypeNode; } interface OptionalTypeNode extends Node { readonly kind: SyntaxKind.OptionalType; readonly parent: TypeNodeParent; readonly type: TypeNode; } interface RestTypeNode extends Node { readonly kind: SyntaxKind.RestType; readonly parent: TypeNodeParent; readonly type: TypeNode; } interface UnionTypeNode extends Node { readonly kind: SyntaxKind.UnionType; readonly parent: TypeNodeParent; readonly types: NodeArray; } interface IntersectionTypeNode extends Node { readonly kind: SyntaxKind.IntersectionType; readonly parent: TypeNodeParent; readonly types: NodeArray; } interface ConditionalTypeNode extends Node { readonly kind: SyntaxKind.ConditionalType; readonly parent: TypeNodeParent; readonly checkType: TypeNode; readonly extendsType: TypeNode; readonly trueType: TypeNode; readonly falseType: TypeNode; } interface InferTypeNode extends Node { readonly kind: SyntaxKind.InferType; readonly parent: TypeNodeParent; readonly typeParameter: TypeParameterDeclaration; } interface ParenthesizedTypeNode extends Node { readonly kind: SyntaxKind.ParenthesizedType; readonly parent: TypeNodeParent; readonly type: TypeNode; } interface TypeOperatorNode extends Node { readonly kind: SyntaxKind.TypeOperator; readonly parent: TypeNodeParent; readonly operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword; readonly type: TypeNode; } interface IndexedAccessTypeNode extends Node { readonly kind: SyntaxKind.IndexedAccessType; readonly parent: TypeNodeParent; readonly objectType: TypeNode; readonly indexType: TypeNode; } interface MappedTypeNode extends Node { readonly kind: SyntaxKind.MappedType; readonly parent: TypeNodeParent; readonly readonlyToken?: ReadonlyKeyword | PlusToken | MinusToken; readonly typeParameter: TypeParameterDeclaration; readonly nameType?: TypeNode; readonly questionToken?: QuestionToken | PlusToken | MinusToken; readonly type?: TypeNode; /** Used only to produce grammar errors */ readonly members?: NodeArray; } interface PlusToken extends Node { readonly kind: SyntaxKind.PlusToken; readonly parent: MappedTypeNode; } interface MinusToken extends Node { readonly kind: SyntaxKind.MinusToken; readonly parent: MappedTypeNode; } interface LiteralTypeNode extends Node { readonly kind: SyntaxKind.LiteralType; readonly parent: TypeNodeParent; readonly literal: NullLiteral | BooleanLiteral | LiteralExpression | PrefixUnaryExpression; } interface NullLiteral extends Node { readonly kind: SyntaxKind.NullKeyword; readonly parent: LeftHandSideExpressionParent | LiteralTypeNode; } type BooleanLiteral = TrueLiteral | FalseLiteral; interface TrueLiteral extends Node { readonly kind: SyntaxKind.TrueKeyword; readonly parent: LeftHandSideExpressionParent | LiteralTypeNode; } interface FalseLiteral extends Node { readonly kind: SyntaxKind.FalseKeyword; readonly parent: LeftHandSideExpressionParent | LiteralTypeNode; } type LiteralExpression = StringLiteral | RegularExpressionLiteral | NoSubstitutionTemplateLiteral | NumericLiteral | BigIntLiteral; interface RegularExpressionLiteral extends Node { readonly kind: SyntaxKind.RegularExpressionLiteral; readonly parent: LeftHandSideExpressionParent | LiteralTypeNode; text: string; isUnterminated?: boolean; hasExtendedUnicodeEscape?: boolean; } interface TemplateLiteralTypeNode extends Node { readonly kind: SyntaxKind.TemplateLiteralType; readonly parent: TypeNodeParent; readonly head: TemplateHead; readonly templateSpans: NodeArray; } interface TemplateHead extends Node { readonly kind: SyntaxKind.TemplateHead; readonly parent: TemplateLiteralTypeNode | TemplateExpression; rawText?: string; text: string; isUnterminated?: boolean; hasExtendedUnicodeEscape?: boolean; } interface TemplateLiteralTypeSpan extends Node { readonly kind: SyntaxKind.TemplateLiteralTypeSpan; readonly parent: TypeNodeParent | TemplateLiteralTypeNode; readonly type: TypeNode; readonly literal: TemplateMiddle | TemplateTail; } interface TemplateMiddle extends Node { readonly kind: SyntaxKind.TemplateMiddle; readonly parent: TemplateLiteralTypeSpan | TemplateSpan; rawText?: string; text: string; isUnterminated?: boolean; hasExtendedUnicodeEscape?: boolean; } interface TemplateTail extends Node { readonly kind: SyntaxKind.TemplateTail; readonly parent: TemplateLiteralTypeSpan | TemplateSpan; rawText?: string; text: string; isUnterminated?: boolean; hasExtendedUnicodeEscape?: boolean; } interface JSDocTypeExpression extends Node { readonly kind: SyntaxKind.JSDocTypeExpression; readonly parent: TypeNodeParent | JSDocPropertyLikeTag | JSDocTemplateTag | JSDocReturnTag; readonly type: TypeNode; } type JSDocType = JSDocAllType | JSDocUnknownType | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocFunctionType | JSDocVariadicType | JSDocNamepathType | JSDocSignature | JSDocTypeLiteral; interface JSDocAllType extends Node { readonly kind: SyntaxKind.JSDocAllType; readonly parent: TypeNodeParent; } interface JSDocUnknownType extends Node { readonly kind: SyntaxKind.JSDocUnknownType; readonly parent: TypeNodeParent; } interface JSDocNonNullableType extends Node { readonly kind: SyntaxKind.JSDocNonNullableType; readonly parent: TypeNodeParent; readonly type: TypeNode; readonly postfix: boolean; } interface JSDocNullableType extends Node { readonly kind: SyntaxKind.JSDocNullableType; readonly parent: TypeNodeParent; readonly type: TypeNode; readonly postfix: boolean; } interface JSDocOptionalType extends Node { readonly kind: SyntaxKind.JSDocOptionalType; readonly parent: TypeNodeParent; readonly type: TypeNode; } interface JSDocFunctionType extends Node { readonly kind: SyntaxKind.JSDocFunctionType; readonly parent: TypeNodeParent; readonly name?: PropertyName; readonly typeParameters?: NodeArray | undefined; readonly parameters: NodeArray; readonly type?: TypeNode | undefined; } interface JSDocVariadicType extends Node { readonly kind: SyntaxKind.JSDocVariadicType; readonly parent: TypeNodeParent; readonly type: TypeNode; } interface JSDocNamepathType extends Node { readonly kind: SyntaxKind.JSDocNamepathType; readonly parent: TypeNodeParent; readonly type: TypeNode; } interface JSDocSignature extends Node { readonly kind: SyntaxKind.JSDocSignature; readonly parent: TypeNodeParent; readonly typeParameters?: readonly JSDocTemplateTag[]; readonly parameters: readonly JSDocParameterTag[]; readonly type: JSDocReturnTag | undefined; } interface JSDocTemplateTag extends Node { readonly kind: SyntaxKind.JSDocTemplateTag; readonly parent: JSDocSignature; readonly constraint: JSDocTypeExpression | undefined; readonly typeParameters: NodeArray; readonly tagName: Identifier; readonly comment?: string | NodeArray; } type JSDocComment = JSDocText | JSDocLink | JSDocLinkCode | JSDocLinkPlain; interface JSDocText extends Node { readonly kind: SyntaxKind.JSDocText; readonly parent: JSDocPropertyLikeTag | JSDocTemplateTag | JSDocReturnTag; text: string; } interface JSDocLink extends Node { readonly kind: SyntaxKind.JSDocLink; readonly parent: JSDocPropertyLikeTag | JSDocTemplateTag | JSDocReturnTag; readonly name?: EntityName | JSDocMemberName; text: string; } interface JSDocMemberName extends Node { readonly kind: SyntaxKind.JSDocMemberName; readonly parent: JSDocMemberName | JSDocLink | JSDocLinkCode | JSDocLinkPlain; readonly left: EntityName | JSDocMemberName; readonly right: Identifier; } interface JSDocLinkCode extends Node { readonly kind: SyntaxKind.JSDocLinkCode; readonly parent: JSDocPropertyLikeTag | JSDocTemplateTag | JSDocReturnTag; readonly name?: EntityName | JSDocMemberName; text: string; } interface JSDocLinkPlain extends Node { readonly kind: SyntaxKind.JSDocLinkPlain; readonly parent: JSDocPropertyLikeTag | JSDocTemplateTag | JSDocReturnTag; readonly name?: EntityName | JSDocMemberName; text: string; } interface JSDocParameterTag extends Node { readonly kind: SyntaxKind.JSDocParameterTag; readonly parent: JSDocSignature | JSDocTypeLiteral; readonly name: EntityName; readonly typeExpression?: JSDocTypeExpression; /** Whether the property name came before the type -- non-standard for JSDoc, but Typescript-like */ readonly isNameFirst: boolean; readonly isBracketed: boolean; readonly tagName: Identifier; readonly comment?: string | NodeArray; } interface JSDocReturnTag extends Node { readonly kind: SyntaxKind.JSDocReturnTag; readonly parent: JSDocSignature; readonly typeExpression?: JSDocTypeExpression; readonly tagName: Identifier; readonly comment?: string | NodeArray; } interface JSDocTypeLiteral extends Node { readonly kind: SyntaxKind.JSDocTypeLiteral; readonly parent: TypeNodeParent; readonly jsDocPropertyTags?: readonly JSDocPropertyLikeTag[]; /** If true, then this type literal represents an *array* of its type. */ readonly isArrayType: boolean; } type JSDocPropertyLikeTag = JSDocPropertyTag | JSDocParameterTag; interface JSDocPropertyTag extends Node { readonly kind: SyntaxKind.JSDocPropertyTag; readonly parent: JSDocTypeLiteral; readonly name: EntityName; readonly typeExpression?: JSDocTypeExpression; /** Whether the property name came before the type -- non-standard for JSDoc, but Typescript-like */ readonly isNameFirst: boolean; readonly isBracketed: boolean; readonly tagName: Identifier; readonly comment?: string | NodeArray; } interface YieldExpression extends Node { readonly kind: SyntaxKind.YieldExpression; readonly parent: ExpressionParent; readonly asteriskToken?: AsteriskToken; readonly expression?: Expression; } interface SyntheticExpression extends Node { readonly kind: SyntaxKind.SyntheticExpression; readonly parent: ExpressionParent; readonly isSpread: boolean; readonly type: Type; readonly tupleNameSource?: ParameterDeclaration | NamedTupleMember; } interface BinaryExpression extends Node { readonly kind: SyntaxKind.BinaryExpression; readonly parent: ExpressionParent; readonly left: Expression; readonly operatorToken: BinaryOperatorToken; readonly right: Expression; } interface BinaryOperatorToken extends Node { readonly kind: BinaryOperator; readonly parent: BinaryExpression; } type BinaryOperator = AssignmentOperatorOrHigher | SyntaxKind.CommaToken; type AssignmentOperatorOrHigher = SyntaxKind.QuestionQuestionToken | LogicalOperatorOrHigher | AssignmentOperator; type LogicalOperatorOrHigher = BitwiseOperatorOrHigher | LogicalOperator; type BitwiseOperatorOrHigher = EqualityOperatorOrHigher | BitwiseOperator; type EqualityOperatorOrHigher = RelationalOperatorOrHigher | EqualityOperator; type RelationalOperatorOrHigher = ShiftOperatorOrHigher | RelationalOperator; type ShiftOperatorOrHigher = AdditiveOperatorOrHigher | ShiftOperator; type AdditiveOperatorOrHigher = MultiplicativeOperatorOrHigher | AdditiveOperator; type MultiplicativeOperatorOrHigher = ExponentiationOperator | MultiplicativeOperator; type ExponentiationOperator = SyntaxKind.AsteriskAsteriskToken; type MultiplicativeOperator = SyntaxKind.AsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken; type AdditiveOperator = SyntaxKind.PlusToken | SyntaxKind.MinusToken; type ShiftOperator = SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken; type RelationalOperator = SyntaxKind.LessThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.InstanceOfKeyword | SyntaxKind.InKeyword; type EqualityOperator = SyntaxKind.EqualsEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.ExclamationEqualsToken; type BitwiseOperator = SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken; type LogicalOperator = SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken; type AssignmentOperator = SyntaxKind.EqualsToken | CompoundAssignmentOperator; type CompoundAssignmentOperator = SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.QuestionQuestionEqualsToken; interface ConditionalExpression extends Node { readonly kind: SyntaxKind.ConditionalExpression; readonly parent: ExpressionParent; readonly condition: Expression; readonly questionToken: QuestionToken; readonly whenTrue: Expression; readonly colonToken: ColonToken; readonly whenFalse: Expression; } interface ColonToken extends Node { readonly kind: SyntaxKind.ColonToken; readonly parent: ConditionalExpression; } interface ArrowFunction extends Node { readonly kind: SyntaxKind.ArrowFunction; readonly parent: ExpressionParent; readonly modifiers?: NodeArray; readonly equalsGreaterThanToken: EqualsGreaterThanToken; readonly body: ConciseBody; readonly name: never; readonly asteriskToken?: AsteriskToken | undefined; readonly questionToken?: QuestionToken | undefined; readonly exclamationToken?: ExclamationToken | undefined; readonly typeParameters?: NodeArray | undefined; readonly parameters: NodeArray; readonly type?: TypeNode | undefined; } interface EqualsGreaterThanToken extends Node { readonly kind: SyntaxKind.EqualsGreaterThanToken; readonly parent: ArrowFunction; } type ConciseBody = FunctionBody | Expression; interface SpreadElement extends Node { readonly kind: SyntaxKind.SpreadElement; readonly parent: ExpressionParent; readonly expression: Expression; } interface AsExpression extends Node { readonly kind: SyntaxKind.AsExpression; readonly parent: ExpressionParent; readonly expression: Expression; readonly type: TypeNode; } interface SatisfiesExpression extends Node { readonly kind: SyntaxKind.SatisfiesExpression; readonly parent: ExpressionParent; readonly expression: Expression; readonly type: TypeNode; } interface JsxOpeningElement extends Node { readonly kind: SyntaxKind.JsxOpeningElement; readonly parent: ExpressionParent | JsxElement; readonly tagName: JsxTagNameExpression; readonly typeArguments?: NodeArray; readonly attributes: JsxAttributes; } type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess | JsxNamespacedName; interface ThisExpression extends Node { readonly kind: SyntaxKind.ThisKeyword; readonly parent: LeftHandSideExpressionParent | JsxOpeningElement | JsxSelfClosingElement | JsxClosingElement | JsxTagNamePropertyAccess; } interface JsxTagNamePropertyAccess extends Node { readonly kind: SyntaxKind.PropertyAccessExpression; readonly parent: JsxTagNamePropertyAccess | JsxOpeningElement | JsxSelfClosingElement | JsxClosingElement; readonly expression: Identifier | ThisExpression | JsxTagNamePropertyAccess; readonly questionDotToken?: QuestionDotToken; readonly name: MemberName; } interface QuestionDotToken extends Node { readonly kind: SyntaxKind.QuestionDotToken; readonly parent: JsxTagNamePropertyAccess | PropertyAccessExpression | ElementAccessExpression | CallExpression; } type MemberName = Identifier | PrivateIdentifier; interface JsxNamespacedName extends Node { readonly kind: SyntaxKind.JsxNamespacedName; readonly parent: JsxOpeningElement | JsxSelfClosingElement | JsxClosingElement | JsxAttribute; readonly name: Identifier; readonly namespace: Identifier; } interface JsxAttributes extends Node { readonly kind: SyntaxKind.JsxAttributes; readonly parent: LeftHandSideExpressionParent | JsxSelfClosingElement | JsxOpeningElement; readonly properties: NodeArray; } type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute; interface JsxAttribute extends Node { readonly kind: SyntaxKind.JsxAttribute; readonly parent: JsxAttributes; readonly name: JsxAttributeName; readonly initializer?: JsxAttributeValue; } type JsxAttributeName = Identifier | JsxNamespacedName; type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment; interface JsxExpression extends Node { readonly kind: SyntaxKind.JsxExpression; readonly parent: IterationStatement | JsxAttributeLike | JsxFragment | JsxElement | ComputedPropertyName | TypeParameterDeclaration | BindingElement | ParameterDeclaration | ImportAttribute | YieldExpression | BinaryExpression | ConditionalExpression | ArrowFunction | SpreadElement | AsExpression | SatisfiesExpression | JsxExpression | CommaListExpression | PartiallyEmittedExpression | TemplateSpan | ParenthesizedExpression | ArrayLiteralExpression | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | NewExpression | PropertyDeclaration | ElementAccessExpression | CallExpression | NonNullExpression | EnumMember | ExternalModuleReference | ExportDeclaration | ExportAssignment | VariableDeclaration | ExpressionStatement | IfStatement | ReturnStatement | WithStatement | SwitchStatement | CaseClause | ThrowStatement | ImportDeclaration; readonly dotDotDotToken?: Token; readonly expression?: Expression; } interface JsxElement extends Node { readonly kind: SyntaxKind.JsxElement; readonly parent: IterationStatement | JsxAttributeLike | JsxFragment | JsxElement | PostfixUnaryExpression | PrefixUnaryExpression | DeleteExpression | TypeOfExpression | VoidExpression | AwaitExpression | TypeAssertion | ComputedPropertyName | TypeParameterDeclaration | BindingElement | ParameterDeclaration | ImportAttribute | YieldExpression | BinaryExpression | ConditionalExpression | ArrowFunction | SpreadElement | AsExpression | SatisfiesExpression | JsxExpression | CommaListExpression | PartiallyEmittedExpression | TemplateSpan | ParenthesizedExpression | ArrayLiteralExpression | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | NewExpression | PropertyDeclaration | ElementAccessExpression | CallExpression | NonNullExpression | EnumMember | ExternalModuleReference | ExportDeclaration | ExportAssignment | VariableDeclaration | ExpressionStatement | IfStatement | ReturnStatement | WithStatement | SwitchStatement | CaseClause | ThrowStatement | ImportDeclaration | ExpressionWithTypeArguments | PropertyAccessExpression | TaggedTemplateExpression | Decorator; readonly openingElement: JsxOpeningElement; readonly children: NodeArray; readonly closingElement: JsxClosingElement; } type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment; interface JsxText extends Node { readonly kind: SyntaxKind.JsxText; readonly parent: JsxFragment | JsxElement; readonly containsOnlyTriviaWhiteSpaces: boolean; text: string; isUnterminated?: boolean; hasExtendedUnicodeEscape?: boolean; } interface JsxSelfClosingElement extends Node { readonly kind: SyntaxKind.JsxSelfClosingElement; readonly parent: IterationStatement | JsxAttributeLike | JsxFragment | JsxElement | PostfixUnaryExpression | PrefixUnaryExpression | DeleteExpression | TypeOfExpression | VoidExpression | AwaitExpression | TypeAssertion | ComputedPropertyName | TypeParameterDeclaration | BindingElement | ParameterDeclaration | ImportAttribute | YieldExpression | BinaryExpression | ConditionalExpression | ArrowFunction | SpreadElement | AsExpression | SatisfiesExpression | JsxExpression | CommaListExpression | PartiallyEmittedExpression | TemplateSpan | ParenthesizedExpression | ArrayLiteralExpression | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | NewExpression | PropertyDeclaration | ElementAccessExpression | CallExpression | NonNullExpression | EnumMember | ExternalModuleReference | ExportDeclaration | ExportAssignment | VariableDeclaration | ExpressionStatement | IfStatement | ReturnStatement | WithStatement | SwitchStatement | CaseClause | ThrowStatement | ImportDeclaration | ExpressionWithTypeArguments | PropertyAccessExpression | TaggedTemplateExpression | Decorator; readonly tagName: JsxTagNameExpression; readonly typeArguments?: NodeArray; readonly attributes: JsxAttributes; } interface JsxFragment extends Node { readonly kind: SyntaxKind.JsxFragment; readonly parent: IterationStatement | JsxAttributeLike | JsxFragment | JsxElement | PostfixUnaryExpression | PrefixUnaryExpression | DeleteExpression | TypeOfExpression | VoidExpression | AwaitExpression | TypeAssertion | ComputedPropertyName | TypeParameterDeclaration | BindingElement | ParameterDeclaration | ImportAttribute | YieldExpression | BinaryExpression | ConditionalExpression | ArrowFunction | SpreadElement | AsExpression | SatisfiesExpression | JsxExpression | CommaListExpression | PartiallyEmittedExpression | TemplateSpan | ParenthesizedExpression | ArrayLiteralExpression | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | NewExpression | PropertyDeclaration | ElementAccessExpression | CallExpression | NonNullExpression | EnumMember | ExternalModuleReference | ExportDeclaration | ExportAssignment | VariableDeclaration | ExpressionStatement | IfStatement | ReturnStatement | WithStatement | SwitchStatement | CaseClause | ThrowStatement | ImportDeclaration | ExpressionWithTypeArguments | PropertyAccessExpression | TaggedTemplateExpression | Decorator; readonly openingFragment: JsxOpeningFragment; readonly children: NodeArray; readonly closingFragment: JsxClosingFragment; } interface JsxOpeningFragment extends Node { readonly kind: SyntaxKind.JsxOpeningFragment; readonly parent: ExpressionParent | JsxFragment; } interface JsxClosingFragment extends Node { readonly kind: SyntaxKind.JsxClosingFragment; readonly parent: ExpressionParent | JsxFragment; } interface JsxClosingElement extends Node { readonly kind: SyntaxKind.JsxClosingElement; readonly parent: JsxElement; readonly tagName: JsxTagNameExpression; } interface JsxSpreadAttribute extends Node { readonly kind: SyntaxKind.JsxSpreadAttribute; readonly parent: JsxAttributes; readonly expression: Expression; readonly name?: PropertyName; } interface CommaListExpression extends Node { readonly kind: SyntaxKind.CommaListExpression; readonly parent: ExpressionParent; readonly elements: NodeArray; } type MemberExpression = PrimaryExpression | PropertyAccessExpression | ElementAccessExpression | ExpressionWithTypeArguments | TaggedTemplateExpression; type PrimaryExpression = Identifier | PrivateIdentifier | NullLiteral | TrueLiteral | FalseLiteral | ThisExpression | SuperExpression | ImportExpression | FunctionExpression | LiteralExpression | TemplateExpression | ParenthesizedExpression | ArrayLiteralExpression | ObjectLiteralExpressionBase | NewExpression | MetaProperty | JsxElement | JsxAttributes | JsxSelfClosingElement | JsxFragment | MissingDeclaration | ClassExpression; interface SuperExpression extends Node { readonly kind: SyntaxKind.SuperKeyword; readonly parent: LeftHandSideExpressionParent; } interface ImportExpression extends Node { readonly kind: SyntaxKind.ImportKeyword; readonly parent: LeftHandSideExpressionParent; } interface FunctionExpression extends Node { readonly kind: SyntaxKind.FunctionExpression; readonly parent: LeftHandSideExpressionParent; readonly modifiers?: NodeArray; readonly name?: Identifier; readonly body: FunctionBody; readonly asteriskToken?: AsteriskToken | undefined; readonly questionToken?: QuestionToken | undefined; readonly exclamationToken?: ExclamationToken | undefined; readonly typeParameters?: NodeArray | undefined; readonly parameters: NodeArray; readonly type?: TypeNode | undefined; } interface TemplateExpression extends Node { readonly kind: SyntaxKind.TemplateExpression; readonly parent: LeftHandSideExpressionParent; readonly head: TemplateHead; readonly templateSpans: NodeArray; } interface TemplateSpan extends Node { readonly kind: SyntaxKind.TemplateSpan; readonly parent: TemplateExpression; readonly expression: Expression; readonly literal: TemplateMiddle | TemplateTail; } interface ParenthesizedExpression extends Node { readonly kind: SyntaxKind.ParenthesizedExpression; readonly parent: LeftHandSideExpressionParent; readonly expression: Expression; } interface ArrayLiteralExpression extends Node { readonly kind: SyntaxKind.ArrayLiteralExpression; readonly parent: LeftHandSideExpressionParent; readonly elements: NodeArray; } type ObjectLiteralExpressionBase = ObjectLiteralExpression; interface ObjectLiteralExpression extends Node { readonly kind: SyntaxKind.ObjectLiteralExpression; readonly parent: LeftHandSideExpressionParent; readonly properties: NodeArray; } type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | AccessorDeclaration; interface PropertyAssignment extends Node { readonly kind: SyntaxKind.PropertyAssignment; readonly parent: ObjectLiteralExpressionBase; readonly name: PropertyName; readonly initializer: Expression; } interface ShorthandPropertyAssignment extends Node { readonly kind: SyntaxKind.ShorthandPropertyAssignment; readonly parent: ObjectLiteralExpressionBase; readonly name: Identifier; readonly equalsToken?: EqualsToken; readonly objectAssignmentInitializer?: Expression; } interface EqualsToken extends Node { readonly kind: SyntaxKind.EqualsToken; readonly parent: ShorthandPropertyAssignment; } interface SpreadAssignment extends Node { readonly kind: SyntaxKind.SpreadAssignment; readonly parent: ObjectLiteralExpressionBase; readonly expression: Expression; readonly name?: PropertyName; } interface MethodDeclaration extends Node { readonly kind: SyntaxKind.MethodDeclaration; readonly parent: ObjectLiteralExpressionBase | ClassExpression | ClassDeclaration; readonly modifiers?: NodeArray | undefined; readonly name: PropertyName; readonly body?: FunctionBody | undefined; readonly asteriskToken?: AsteriskToken | undefined; readonly questionToken?: QuestionToken | undefined; readonly exclamationToken?: ExclamationToken | undefined; readonly typeParameters?: NodeArray | undefined; readonly parameters: NodeArray; readonly type?: TypeNode | undefined; } type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration; interface NewExpression extends Node { readonly kind: SyntaxKind.NewExpression; readonly parent: LeftHandSideExpressionParent; readonly expression: LeftHandSideExpression; readonly typeArguments?: NodeArray; readonly arguments?: NodeArray; } interface MetaProperty extends Node { readonly kind: SyntaxKind.MetaProperty; readonly parent: LeftHandSideExpressionParent; readonly keywordToken: SyntaxKind.NewKeyword | SyntaxKind.ImportKeyword; readonly name: Identifier; } interface MissingDeclaration extends Node { readonly kind: SyntaxKind.MissingDeclaration; readonly parent: StatementParent | PostfixUnaryExpression | PrefixUnaryExpression | DeleteExpression | TypeOfExpression | VoidExpression | AwaitExpression | TypeAssertion | ComputedPropertyName | TypeParameterDeclaration | BindingElement | ParameterDeclaration | ImportAttribute | YieldExpression | BinaryExpression | ConditionalExpression | ArrowFunction | SpreadElement | AsExpression | SatisfiesExpression | JsxExpression | JsxSpreadAttribute | CommaListExpression | PartiallyEmittedExpression | TemplateSpan | ParenthesizedExpression | ArrayLiteralExpression | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | NewExpression | PropertyDeclaration | ElementAccessExpression | CallExpression | NonNullExpression | EnumMember | ExternalModuleReference | ExportDeclaration | ExportAssignment | VariableDeclaration | ExpressionStatement | ReturnStatement | SwitchStatement | ThrowStatement | ImportDeclaration | ExpressionWithTypeArguments | PropertyAccessExpression | TaggedTemplateExpression | Decorator; readonly name?: Identifier; } interface ClassExpression extends Node { readonly kind: SyntaxKind.ClassExpression; readonly parent: LeftHandSideExpressionParent; readonly modifiers?: NodeArray; readonly name?: Identifier; readonly typeParameters?: NodeArray; readonly heritageClauses?: NodeArray; readonly members: NodeArray; } interface HeritageClause extends Node { readonly kind: SyntaxKind.HeritageClause; readonly parent: ClassExpression | ClassDeclaration | InterfaceDeclaration; readonly token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword; readonly types: NodeArray; } type ClassElement = PropertyDeclaration | MethodDeclaration | ConstructorDeclaration | SemicolonClassElement | GetAccessorDeclaration | SetAccessorDeclaration | IndexSignatureDeclaration | ClassStaticBlockDeclaration; interface PropertyDeclaration extends Node { readonly kind: SyntaxKind.PropertyDeclaration; readonly parent: ClassExpression | ClassDeclaration; readonly modifiers?: NodeArray; readonly name: PropertyName; readonly questionToken?: QuestionToken; readonly exclamationToken?: ExclamationToken; readonly type?: TypeNode; readonly initializer?: Expression; } interface ConstructorDeclaration extends Node { readonly kind: SyntaxKind.Constructor; readonly parent: ClassExpression | ClassDeclaration; readonly modifiers?: NodeArray | undefined; readonly body?: FunctionBody | undefined; readonly asteriskToken?: AsteriskToken | undefined; readonly questionToken?: QuestionToken | undefined; readonly exclamationToken?: ExclamationToken | undefined; readonly name?: PropertyName; readonly typeParameters?: NodeArray | undefined; readonly parameters: NodeArray; readonly type?: TypeNode | undefined; } interface SemicolonClassElement extends Node { readonly kind: SyntaxKind.SemicolonClassElement; readonly parent: ClassExpression | ClassDeclaration; readonly name?: PropertyName; } interface ClassStaticBlockDeclaration extends Node { readonly kind: SyntaxKind.ClassStaticBlockDeclaration; readonly parent: ClassExpression | ClassDeclaration; readonly body: Block; readonly name?: PropertyName; } interface PropertyAccessExpression extends Node { readonly kind: SyntaxKind.PropertyAccessExpression; readonly parent: LeftHandSideExpressionParent; readonly expression: LeftHandSideExpression; readonly questionDotToken?: QuestionDotToken; readonly name: MemberName; } interface ElementAccessExpression extends Node { readonly kind: SyntaxKind.ElementAccessExpression; readonly parent: LeftHandSideExpressionParent; readonly expression: LeftHandSideExpression; readonly questionDotToken?: QuestionDotToken; readonly argumentExpression: Expression; } interface TaggedTemplateExpression extends Node { readonly kind: SyntaxKind.TaggedTemplateExpression; readonly parent: LeftHandSideExpressionParent; readonly tag: LeftHandSideExpression; readonly typeArguments?: NodeArray; readonly template: TemplateLiteral; } type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral; interface CallExpression extends Node { readonly kind: SyntaxKind.CallExpression; readonly parent: LeftHandSideExpressionParent; readonly expression: LeftHandSideExpression; readonly questionDotToken?: QuestionDotToken; readonly typeArguments?: NodeArray; readonly arguments: NodeArray; } interface NonNullExpression extends Node { readonly kind: SyntaxKind.NonNullExpression; readonly parent: LeftHandSideExpressionParent; readonly expression: Expression; } interface ClassDeclaration extends Node { readonly kind: SyntaxKind.ClassDeclaration; readonly parent: StatementParent; readonly modifiers?: NodeArray; /** May be undefined in `export default class { ... }`. */ readonly name?: Identifier; readonly typeParameters?: NodeArray; readonly heritageClauses?: NodeArray; readonly members: NodeArray; } interface InterfaceDeclaration extends Node { readonly kind: SyntaxKind.InterfaceDeclaration; readonly parent: StatementParent; readonly modifiers?: NodeArray; readonly name: Identifier; readonly typeParameters?: NodeArray; readonly heritageClauses?: NodeArray; readonly members: NodeArray; } interface TypeAliasDeclaration extends Node { readonly kind: SyntaxKind.TypeAliasDeclaration; readonly parent: StatementParent; readonly modifiers?: NodeArray; readonly name: Identifier; readonly typeParameters?: NodeArray; readonly type: TypeNode; } interface EnumDeclaration extends Node { readonly kind: SyntaxKind.EnumDeclaration; readonly parent: StatementParent; readonly modifiers?: NodeArray; readonly name: Identifier; readonly members: NodeArray; } interface EnumMember extends Node { readonly kind: SyntaxKind.EnumMember; readonly parent: EnumDeclaration; readonly name: PropertyName; readonly initializer?: Expression; } interface ModuleDeclaration extends Node { readonly kind: SyntaxKind.ModuleDeclaration; readonly parent: StatementParent; readonly modifiers?: NodeArray; readonly name: ModuleName; readonly body?: ModuleBody | JSDocNamespaceDeclaration; } type ModuleName = Identifier | StringLiteral; type ModuleBody = NamespaceBody | JSDocNamespaceBody; type NamespaceBody = ModuleBlock | NamespaceDeclaration; interface ModuleBlock extends Node { readonly kind: SyntaxKind.ModuleBlock; readonly parent: CaseOrDefaultClause | IterationStatement | NamespaceBody | ModuleDeclaration | Block | IfStatement | WithStatement | LabeledStatement | SourceFile; readonly statements: NodeArray; } interface NamespaceDeclaration extends Node { readonly kind: SyntaxKind.ModuleDeclaration; readonly parent: NamespaceDeclaration | ModuleDeclaration; readonly name: Identifier; readonly body: NamespaceBody; readonly modifiers?: NodeArray; } type JSDocNamespaceBody = Identifier | JSDocNamespaceDeclaration; interface JSDocNamespaceDeclaration extends Node { readonly kind: SyntaxKind.ModuleDeclaration; readonly parent: JSDocNamespaceDeclaration | ModuleDeclaration; readonly name: Identifier; readonly body?: JSDocNamespaceBody; readonly modifiers?: NodeArray; } interface ImportEqualsDeclaration extends Node { readonly kind: SyntaxKind.ImportEqualsDeclaration; readonly parent: StatementParent; readonly modifiers?: NodeArray; readonly name: Identifier; readonly isTypeOnly: boolean; readonly moduleReference: ModuleReference; } type ModuleReference = EntityName | ExternalModuleReference; interface ExternalModuleReference extends Node { readonly kind: SyntaxKind.ExternalModuleReference; readonly parent: ImportEqualsDeclaration; readonly expression: Expression; } interface NamespaceExportDeclaration extends Node { readonly kind: SyntaxKind.NamespaceExportDeclaration; readonly parent: StatementParent; readonly name: Identifier; } interface ExportDeclaration extends Node { readonly kind: SyntaxKind.ExportDeclaration; readonly parent: StatementParent; readonly modifiers?: NodeArray; readonly isTypeOnly: boolean; /** Will not be assigned in the case of `export * from "foo";` */ readonly exportClause?: NamedExportBindings; /** If this is not a StringLiteral it will be a grammar error. */ readonly moduleSpecifier?: Expression; readonly attributes?: ImportAttributes; readonly name?: Identifier | StringLiteral | NumericLiteral; } type NamedExportBindings = NamespaceExport | NamedExports; interface NamespaceExport extends Node { readonly kind: SyntaxKind.NamespaceExport; readonly parent: ExportDeclaration; readonly name: ModuleExportName; } type ModuleExportName = Identifier | StringLiteral; interface NamedExports extends Node { readonly kind: SyntaxKind.NamedExports; readonly parent: ExportDeclaration; readonly elements: NodeArray; } interface ExportSpecifier extends Node { readonly kind: SyntaxKind.ExportSpecifier; readonly parent: NamedExports; readonly isTypeOnly: boolean; readonly propertyName?: ModuleExportName; readonly name: ModuleExportName; } interface ExportAssignment extends Node { readonly kind: SyntaxKind.ExportAssignment; readonly parent: StatementParent; readonly modifiers?: NodeArray; readonly isExportEquals?: boolean; readonly expression: Expression; readonly name?: Identifier | StringLiteral | NumericLiteral; } interface NotEmittedStatement extends Node { readonly kind: SyntaxKind.NotEmittedStatement; readonly parent: StatementParent; } interface EmptyStatement extends Node { readonly kind: SyntaxKind.EmptyStatement; readonly parent: StatementParent; } interface DebuggerStatement extends Node { readonly kind: SyntaxKind.DebuggerStatement; readonly parent: StatementParent; } interface VariableStatement extends Node { readonly kind: SyntaxKind.VariableStatement; readonly parent: StatementParent; readonly modifiers?: NodeArray; readonly declarationList: VariableDeclarationList; } interface VariableDeclarationList extends Node { readonly kind: SyntaxKind.VariableDeclarationList; readonly parent: VariableStatement | ForStatement | ForInStatement | ForOfStatement; readonly declarations: NodeArray; } interface VariableDeclaration extends Node { readonly kind: SyntaxKind.VariableDeclaration; readonly parent: VariableDeclarationList | CatchClause; readonly name: BindingName; readonly exclamationToken?: ExclamationToken; readonly type?: TypeNode; readonly initializer?: Expression; } interface ExpressionStatement extends Node { readonly kind: SyntaxKind.ExpressionStatement; readonly parent: StatementParent; readonly expression: Expression; } interface IfStatement extends Node { readonly kind: SyntaxKind.IfStatement; readonly parent: StatementParent; readonly expression: Expression; readonly thenStatement: Statement; readonly elseStatement?: Statement; } type IterationStatement = DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement; interface DoStatement extends Node { readonly kind: SyntaxKind.DoStatement; readonly parent: StatementParent; readonly expression: Expression; readonly statement: Statement; } interface WhileStatement extends Node { readonly kind: SyntaxKind.WhileStatement; readonly parent: StatementParent; readonly expression: Expression; readonly statement: Statement; } interface ForStatement extends Node { readonly kind: SyntaxKind.ForStatement; readonly parent: StatementParent; readonly initializer?: ForInitializer; readonly condition?: Expression; readonly incrementor?: Expression; readonly statement: Statement; } type ForInitializer = VariableDeclarationList | Expression; interface ForInStatement extends Node { readonly kind: SyntaxKind.ForInStatement; readonly parent: StatementParent; readonly initializer: ForInitializer; readonly expression: Expression; readonly statement: Statement; } interface ForOfStatement extends Node { readonly kind: SyntaxKind.ForOfStatement; readonly parent: StatementParent; readonly awaitModifier?: AwaitKeyword; readonly initializer: ForInitializer; readonly expression: Expression; readonly statement: Statement; } interface AwaitKeyword extends Node { readonly kind: SyntaxKind.AwaitKeyword; readonly parent: ForOfStatement; } interface BreakStatement extends Node { readonly kind: SyntaxKind.BreakStatement; readonly parent: StatementParent; readonly label?: Identifier; } interface ContinueStatement extends Node { readonly kind: SyntaxKind.ContinueStatement; readonly parent: StatementParent; readonly label?: Identifier; } interface ReturnStatement extends Node { readonly kind: SyntaxKind.ReturnStatement; readonly parent: StatementParent; readonly expression?: Expression; } interface WithStatement extends Node { readonly kind: SyntaxKind.WithStatement; readonly parent: StatementParent; readonly expression: Expression; readonly statement: Statement; } interface SwitchStatement extends Node { readonly kind: SyntaxKind.SwitchStatement; readonly parent: StatementParent; readonly expression: Expression; readonly caseBlock: CaseBlock; possiblyExhaustive?: boolean; } interface CaseBlock extends Node { readonly kind: SyntaxKind.CaseBlock; readonly parent: SwitchStatement; readonly clauses: NodeArray; } type CaseOrDefaultClause = CaseClause | DefaultClause; interface CaseClause extends Node { readonly kind: SyntaxKind.CaseClause; readonly parent: CaseBlock; readonly expression: Expression; readonly statements: NodeArray; } interface DefaultClause extends Node { readonly kind: SyntaxKind.DefaultClause; readonly parent: CaseBlock; readonly statements: NodeArray; } interface LabeledStatement extends Node { readonly kind: SyntaxKind.LabeledStatement; readonly parent: StatementParent; readonly label: Identifier; readonly statement: Statement; } interface ThrowStatement extends Node { readonly kind: SyntaxKind.ThrowStatement; readonly parent: StatementParent; readonly expression: Expression; } interface TryStatement extends Node { readonly kind: SyntaxKind.TryStatement; readonly parent: StatementParent; readonly tryBlock: Block; readonly catchClause?: CatchClause; readonly finallyBlock?: Block; } interface CatchClause extends Node { readonly kind: SyntaxKind.CatchClause; readonly parent: TryStatement; readonly variableDeclaration?: VariableDeclaration; readonly block: Block; } interface ImportDeclaration extends Node { readonly kind: SyntaxKind.ImportDeclaration; readonly parent: StatementParent; readonly modifiers?: NodeArray; readonly importClause?: ImportClause; /** If this is not a StringLiteral it will be a grammar error. */ readonly moduleSpecifier: Expression; readonly attributes?: ImportAttributes; } interface ImportClause extends Node { readonly kind: SyntaxKind.ImportClause; readonly parent: ImportDeclaration; /** @deprecated Use `phaseModifier` instead */ readonly isTypeOnly: boolean; readonly phaseModifier: undefined | ImportPhaseModifierSyntaxKind; readonly name?: Identifier; readonly namedBindings?: NamedImportBindings; } type ImportPhaseModifierSyntaxKind = SyntaxKind.TypeKeyword | SyntaxKind.DeferKeyword; type NamedImportBindings = NamespaceImport | NamedImports; interface NamespaceImport extends Node { readonly kind: SyntaxKind.NamespaceImport; readonly parent: ImportClause; readonly name: Identifier; } interface NamedImports extends Node { readonly kind: SyntaxKind.NamedImports; readonly parent: ImportClause; readonly elements: NodeArray; } interface ImportSpecifier extends Node { readonly kind: SyntaxKind.ImportSpecifier; readonly parent: NamedImports; readonly propertyName?: ModuleExportName; readonly name: Identifier; readonly isTypeOnly: boolean; } interface Token extends Node { readonly kind: Kind; readonly parent: Parent; } interface NullNode extends Node { readonly kind: SyntaxKind.NullKeyword; readonly parent: NullNode; } type AnyNode = AnyKeyword | ArrayBindingPattern | ArrayLiteralExpression | ArrayTypeNode | ArrowFunction | AsExpression | AwaitExpression | BigIntKeyword | BigIntLiteral | BinaryExpression | BindingElement | Block | BooleanKeyword | BreakStatement | CallExpression | CallSignatureDeclaration | CaseBlock | CaseClause | CatchClause | ClassDeclaration | ClassExpression | ClassStaticBlockDeclaration | CommaListExpression | ComputedPropertyName | ConditionalExpression | ConditionalTypeNode | ConstructSignatureDeclaration | ConstructorDeclaration | ConstructorTypeNode | ContinueStatement | DebuggerStatement | Decorator | DefaultClause | DeleteExpression | DoStatement | ElementAccessExpression | EmptyStatement | EnumDeclaration | EnumMember | ExportAssignment | ExportDeclaration | ExportSpecifier | ExpressionStatement | ExpressionWithTypeArguments | ExternalModuleReference | FalseLiteral | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | FunctionTypeNode | GetAccessorDeclaration | HeritageClause | Identifier | IfStatement | ImportAttribute | ImportAttributes | ImportClause | ImportDeclaration | ImportEqualsDeclaration | ImportExpression | ImportSpecifier | ImportTypeNode | IndexSignatureDeclaration | IndexedAccessTypeNode | InferTypeNode | InterfaceDeclaration | IntersectionTypeNode | IntrinsicKeyword | JSDocAllType | JSDocFunctionType | JSDocLink | JSDocLinkCode | JSDocLinkPlain | JSDocMemberName | JSDocNamepathType | JSDocNamespaceDeclaration | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocParameterTag | JSDocPropertyTag | JSDocReturnTag | JSDocSignature | JSDocTemplateTag | JSDocText | JSDocTypeExpression | JSDocTypeLiteral | JSDocUnknownType | JSDocVariadicType | JsxAttribute | JsxAttributes | JsxClosingElement | JsxClosingFragment | JsxElement | JsxExpression | JsxFragment | JsxNamespacedName | JsxOpeningElement | JsxOpeningFragment | JsxSelfClosingElement | JsxSpreadAttribute | JsxTagNamePropertyAccess | JsxText | LabeledStatement | LiteralTypeNode | MappedTypeNode | MetaProperty | MethodDeclaration | MethodSignature | MissingDeclaration | ModuleBlock | ModuleDeclaration | NamedExports | NamedImports | NamedTupleMember | NamespaceDeclaration | NamespaceExport | NamespaceExportDeclaration | NamespaceImport | NeverKeyword | NewExpression | NoSubstitutionTemplateLiteral | NonNullExpression | NotEmittedStatement | NotEmittedTypeElement | NullLiteral | NumberKeyword | NumericLiteral | ObjectBindingPattern | ObjectKeyword | ObjectLiteralExpression | OmittedExpression | OptionalTypeNode | ParameterDeclaration | ParenthesizedExpression | ParenthesizedTypeNode | PartiallyEmittedExpression | PostfixUnaryExpression | PrefixUnaryExpression | PrivateIdentifier | PropertyAccessExpression | PropertyAssignment | PropertyDeclaration | PropertySignature | QualifiedName | RegularExpressionLiteral | RestTypeNode | ReturnStatement | SatisfiesExpression | SemicolonClassElement | SetAccessorDeclaration | ShorthandPropertyAssignment | SourceFile | SpreadAssignment | SpreadElement | StringKeyword | StringLiteral | SuperExpression | SwitchStatement | SymbolKeyword | SyntheticExpression | TaggedTemplateExpression | TemplateExpression | TemplateHead | TemplateLiteralTypeNode | TemplateLiteralTypeSpan | TemplateMiddle | TemplateSpan | TemplateTail | ThisExpression | ThisTypeNode | ThrowStatement | TrueLiteral | TryStatement | TupleTypeNode | TypeAliasDeclaration | TypeAssertion | TypeLiteralNode | TypeOfExpression | TypeOperatorNode | TypeParameterDeclaration | TypePredicateNode | TypeQueryNode | TypeReferenceNode | UndefinedKeyword | UnionTypeNode | UnknownKeyword | VariableDeclaration | VariableDeclarationList | VariableStatement | VoidExpression | VoidKeyword | WhileStatement | WithStatement | YieldExpression; type ExpressionParent = IterationStatement | ComputedPropertyName | TypeParameterDeclaration | BindingElement | ParameterDeclaration | ImportAttribute | YieldExpression | BinaryExpression | ConditionalExpression | ArrowFunction | SpreadElement | AsExpression | SatisfiesExpression | JsxExpression | JsxSpreadAttribute | CommaListExpression | PartiallyEmittedExpression | TemplateSpan | ParenthesizedExpression | ArrayLiteralExpression | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | NewExpression | PropertyDeclaration | ElementAccessExpression | CallExpression | NonNullExpression | EnumMember | ExternalModuleReference | ExportDeclaration | ExportAssignment | VariableDeclaration | ExpressionStatement | IfStatement | ReturnStatement | WithStatement | SwitchStatement | CaseClause | ThrowStatement | ImportDeclaration; type TypeNodeParent = AccessorDeclaration | NodeWithTypeArguments | FunctionOrConstructorTypeNodeBase | TypeParameterDeclaration | ParameterDeclaration | TypePredicateNode | CallSignatureDeclaration | ConstructSignatureDeclaration | PropertySignature | MethodSignature | IndexSignatureDeclaration | ArrayTypeNode | TupleTypeNode | NamedTupleMember | OptionalTypeNode | RestTypeNode | UnionTypeNode | IntersectionTypeNode | ConditionalTypeNode | ParenthesizedTypeNode | TypeOperatorNode | IndexedAccessTypeNode | MappedTypeNode | TemplateLiteralTypeSpan | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocFunctionType | JSDocVariadicType | JSDocNamepathType | TypeAssertion | ArrowFunction | AsExpression | SatisfiesExpression | JsxOpeningElement | JsxSelfClosingElement | FunctionExpression | MethodDeclaration | NewExpression | PropertyDeclaration | ConstructorDeclaration | TaggedTemplateExpression | CallExpression | FunctionDeclaration | TypeAliasDeclaration | VariableDeclaration; type ModifierParent = AccessorDeclaration | ParameterDeclaration | IndexSignatureDeclaration | MethodDeclaration | ClassExpression | PropertyDeclaration | ConstructorDeclaration | FunctionDeclaration | ClassDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumDeclaration | ModuleDeclaration | NamespaceDeclaration | JSDocNamespaceDeclaration | ImportEqualsDeclaration | ExportDeclaration | ExportAssignment | VariableStatement | ImportDeclaration | TypeParameterDeclaration | ConstructorTypeNode | PropertySignature | MethodSignature | ArrowFunction | FunctionExpression; type StatementParent = CaseOrDefaultClause | IterationStatement | Block | ModuleBlock | IfStatement | WithStatement | LabeledStatement | SourceFile; type LeftHandSideExpressionParent = ExpressionParent | PostfixUnaryExpression | PrefixUnaryExpression | DeleteExpression | TypeOfExpression | VoidExpression | AwaitExpression | TypeAssertion | ExpressionWithTypeArguments | PropertyAccessExpression | TaggedTemplateExpression | Decorator; type Visitor = { AnyKeyword?(context: Context, node: AnyKeyword): void; AnyKeyword_exit?(context: Context, node: AnyKeyword): void; ArrayBindingPattern?(context: Context, node: ArrayBindingPattern): void; ArrayBindingPattern_exit?(context: Context, node: ArrayBindingPattern): void; ArrayLiteralExpression?(context: Context, node: ArrayLiteralExpression): void; ArrayLiteralExpression_exit?(context: Context, node: ArrayLiteralExpression): void; ArrayType?(context: Context, node: ArrayTypeNode): void; ArrayType_exit?(context: Context, node: ArrayTypeNode): void; ArrowFunction?(context: Context, node: ArrowFunction): void; ArrowFunction_exit?(context: Context, node: ArrowFunction): void; AsExpression?(context: Context, node: AsExpression): void; AsExpression_exit?(context: Context, node: AsExpression): void; AwaitExpression?(context: Context, node: AwaitExpression): void; AwaitExpression_exit?(context: Context, node: AwaitExpression): void; BigIntKeyword?(context: Context, node: BigIntKeyword): void; BigIntKeyword_exit?(context: Context, node: BigIntKeyword): void; BigIntLiteral?(context: Context, node: BigIntLiteral): void; BigIntLiteral_exit?(context: Context, node: BigIntLiteral): void; BinaryExpression?(context: Context, node: BinaryExpression): void; BinaryExpression_exit?(context: Context, node: BinaryExpression): void; BindingElement?(context: Context, node: BindingElement): void; BindingElement_exit?(context: Context, node: BindingElement): void; Block?(context: Context, node: Block): void; Block_exit?(context: Context, node: Block): void; BooleanKeyword?(context: Context, node: BooleanKeyword): void; BooleanKeyword_exit?(context: Context, node: BooleanKeyword): void; BreakStatement?(context: Context, node: BreakStatement): void; BreakStatement_exit?(context: Context, node: BreakStatement): void; CallExpression?(context: Context, node: CallExpression): void; CallExpression_exit?(context: Context, node: CallExpression): void; CallSignature?(context: Context, node: CallSignatureDeclaration): void; CallSignature_exit?(context: Context, node: CallSignatureDeclaration): void; CaseBlock?(context: Context, node: CaseBlock): void; CaseBlock_exit?(context: Context, node: CaseBlock): void; CaseClause?(context: Context, node: CaseClause): void; CaseClause_exit?(context: Context, node: CaseClause): void; CatchClause?(context: Context, node: CatchClause): void; CatchClause_exit?(context: Context, node: CatchClause): void; ClassDeclaration?(context: Context, node: ClassDeclaration): void; ClassDeclaration_exit?(context: Context, node: ClassDeclaration): void; ClassExpression?(context: Context, node: ClassExpression): void; ClassExpression_exit?(context: Context, node: ClassExpression): void; ClassStaticBlockDeclaration?(context: Context, node: ClassStaticBlockDeclaration): void; ClassStaticBlockDeclaration_exit?(context: Context, node: ClassStaticBlockDeclaration): void; CommaListExpression?(context: Context, node: CommaListExpression): void; CommaListExpression_exit?(context: Context, node: CommaListExpression): void; ComputedPropertyName?(context: Context, node: ComputedPropertyName): void; ComputedPropertyName_exit?(context: Context, node: ComputedPropertyName): void; ConditionalExpression?(context: Context, node: ConditionalExpression): void; ConditionalExpression_exit?(context: Context, node: ConditionalExpression): void; ConditionalType?(context: Context, node: ConditionalTypeNode): void; ConditionalType_exit?(context: Context, node: ConditionalTypeNode): void; ConstructSignature?(context: Context, node: ConstructSignatureDeclaration): void; ConstructSignature_exit?(context: Context, node: ConstructSignatureDeclaration): void; Constructor?(context: Context, node: ConstructorDeclaration): void; Constructor_exit?(context: Context, node: ConstructorDeclaration): void; ConstructorType?(context: Context, node: ConstructorTypeNode): void; ConstructorType_exit?(context: Context, node: ConstructorTypeNode): void; ContinueStatement?(context: Context, node: ContinueStatement): void; ContinueStatement_exit?(context: Context, node: ContinueStatement): void; DebuggerStatement?(context: Context, node: DebuggerStatement): void; DebuggerStatement_exit?(context: Context, node: DebuggerStatement): void; Decorator?(context: Context, node: Decorator): void; Decorator_exit?(context: Context, node: Decorator): void; DefaultClause?(context: Context, node: DefaultClause): void; DefaultClause_exit?(context: Context, node: DefaultClause): void; DeleteExpression?(context: Context, node: DeleteExpression): void; DeleteExpression_exit?(context: Context, node: DeleteExpression): void; DoStatement?(context: Context, node: DoStatement): void; DoStatement_exit?(context: Context, node: DoStatement): void; ElementAccessExpression?(context: Context, node: ElementAccessExpression): void; ElementAccessExpression_exit?(context: Context, node: ElementAccessExpression): void; EmptyStatement?(context: Context, node: EmptyStatement): void; EmptyStatement_exit?(context: Context, node: EmptyStatement): void; EnumDeclaration?(context: Context, node: EnumDeclaration): void; EnumDeclaration_exit?(context: Context, node: EnumDeclaration): void; EnumMember?(context: Context, node: EnumMember): void; EnumMember_exit?(context: Context, node: EnumMember): void; ExportAssignment?(context: Context, node: ExportAssignment): void; ExportAssignment_exit?(context: Context, node: ExportAssignment): void; ExportDeclaration?(context: Context, node: ExportDeclaration): void; ExportDeclaration_exit?(context: Context, node: ExportDeclaration): void; ExportSpecifier?(context: Context, node: ExportSpecifier): void; ExportSpecifier_exit?(context: Context, node: ExportSpecifier): void; ExpressionStatement?(context: Context, node: ExpressionStatement): void; ExpressionStatement_exit?(context: Context, node: ExpressionStatement): void; ExpressionWithTypeArguments?(context: Context, node: ExpressionWithTypeArguments): void; ExpressionWithTypeArguments_exit?(context: Context, node: ExpressionWithTypeArguments): void; ExternalModuleReference?(context: Context, node: ExternalModuleReference): void; ExternalModuleReference_exit?(context: Context, node: ExternalModuleReference): void; FalseKeyword?(context: Context, node: FalseLiteral): void; FalseKeyword_exit?(context: Context, node: FalseLiteral): void; ForInStatement?(context: Context, node: ForInStatement): void; ForInStatement_exit?(context: Context, node: ForInStatement): void; ForOfStatement?(context: Context, node: ForOfStatement): void; ForOfStatement_exit?(context: Context, node: ForOfStatement): void; ForStatement?(context: Context, node: ForStatement): void; ForStatement_exit?(context: Context, node: ForStatement): void; FunctionDeclaration?(context: Context, node: FunctionDeclaration): void; FunctionDeclaration_exit?(context: Context, node: FunctionDeclaration): void; FunctionExpression?(context: Context, node: FunctionExpression): void; FunctionExpression_exit?(context: Context, node: FunctionExpression): void; FunctionType?(context: Context, node: FunctionTypeNode): void; FunctionType_exit?(context: Context, node: FunctionTypeNode): void; GetAccessor?(context: Context, node: GetAccessorDeclaration): void; GetAccessor_exit?(context: Context, node: GetAccessorDeclaration): void; HeritageClause?(context: Context, node: HeritageClause): void; HeritageClause_exit?(context: Context, node: HeritageClause): void; Identifier?(context: Context, node: Identifier): void; Identifier_exit?(context: Context, node: Identifier): void; IfStatement?(context: Context, node: IfStatement): void; IfStatement_exit?(context: Context, node: IfStatement): void; ImportAttribute?(context: Context, node: ImportAttribute): void; ImportAttribute_exit?(context: Context, node: ImportAttribute): void; ImportAttributes?(context: Context, node: ImportAttributes): void; ImportAttributes_exit?(context: Context, node: ImportAttributes): void; ImportClause?(context: Context, node: ImportClause): void; ImportClause_exit?(context: Context, node: ImportClause): void; ImportDeclaration?(context: Context, node: ImportDeclaration): void; ImportDeclaration_exit?(context: Context, node: ImportDeclaration): void; ImportEqualsDeclaration?(context: Context, node: ImportEqualsDeclaration): void; ImportEqualsDeclaration_exit?(context: Context, node: ImportEqualsDeclaration): void; ImportKeyword?(context: Context, node: ImportExpression): void; ImportKeyword_exit?(context: Context, node: ImportExpression): void; ImportSpecifier?(context: Context, node: ImportSpecifier): void; ImportSpecifier_exit?(context: Context, node: ImportSpecifier): void; ImportType?(context: Context, node: ImportTypeNode): void; ImportType_exit?(context: Context, node: ImportTypeNode): void; IndexSignature?(context: Context, node: IndexSignatureDeclaration): void; IndexSignature_exit?(context: Context, node: IndexSignatureDeclaration): void; IndexedAccessType?(context: Context, node: IndexedAccessTypeNode): void; IndexedAccessType_exit?(context: Context, node: IndexedAccessTypeNode): void; InferType?(context: Context, node: InferTypeNode): void; InferType_exit?(context: Context, node: InferTypeNode): void; InterfaceDeclaration?(context: Context, node: InterfaceDeclaration): void; InterfaceDeclaration_exit?(context: Context, node: InterfaceDeclaration): void; IntersectionType?(context: Context, node: IntersectionTypeNode): void; IntersectionType_exit?(context: Context, node: IntersectionTypeNode): void; IntrinsicKeyword?(context: Context, node: IntrinsicKeyword): void; IntrinsicKeyword_exit?(context: Context, node: IntrinsicKeyword): void; JSDocAllType?(context: Context, node: JSDocAllType): void; JSDocAllType_exit?(context: Context, node: JSDocAllType): void; JSDocFunctionType?(context: Context, node: JSDocFunctionType): void; JSDocFunctionType_exit?(context: Context, node: JSDocFunctionType): void; JSDocLink?(context: Context, node: JSDocLink): void; JSDocLink_exit?(context: Context, node: JSDocLink): void; JSDocLinkCode?(context: Context, node: JSDocLinkCode): void; JSDocLinkCode_exit?(context: Context, node: JSDocLinkCode): void; JSDocLinkPlain?(context: Context, node: JSDocLinkPlain): void; JSDocLinkPlain_exit?(context: Context, node: JSDocLinkPlain): void; JSDocMemberName?(context: Context, node: JSDocMemberName): void; JSDocMemberName_exit?(context: Context, node: JSDocMemberName): void; JSDocNamepathType?(context: Context, node: JSDocNamepathType): void; JSDocNamepathType_exit?(context: Context, node: JSDocNamepathType): void; JSDocNonNullableType?(context: Context, node: JSDocNonNullableType): void; JSDocNonNullableType_exit?(context: Context, node: JSDocNonNullableType): void; JSDocNullableType?(context: Context, node: JSDocNullableType): void; JSDocNullableType_exit?(context: Context, node: JSDocNullableType): void; JSDocOptionalType?(context: Context, node: JSDocOptionalType): void; JSDocOptionalType_exit?(context: Context, node: JSDocOptionalType): void; JSDocParameterTag?(context: Context, node: JSDocParameterTag): void; JSDocParameterTag_exit?(context: Context, node: JSDocParameterTag): void; JSDocPropertyTag?(context: Context, node: JSDocPropertyTag): void; JSDocPropertyTag_exit?(context: Context, node: JSDocPropertyTag): void; JSDocReturnTag?(context: Context, node: JSDocReturnTag): void; JSDocReturnTag_exit?(context: Context, node: JSDocReturnTag): void; JSDocSignature?(context: Context, node: JSDocSignature): void; JSDocSignature_exit?(context: Context, node: JSDocSignature): void; JSDocTemplateTag?(context: Context, node: JSDocTemplateTag): void; JSDocTemplateTag_exit?(context: Context, node: JSDocTemplateTag): void; JSDocText?(context: Context, node: JSDocText): void; JSDocText_exit?(context: Context, node: JSDocText): void; JSDocTypeExpression?(context: Context, node: JSDocTypeExpression): void; JSDocTypeExpression_exit?(context: Context, node: JSDocTypeExpression): void; JSDocTypeLiteral?(context: Context, node: JSDocTypeLiteral): void; JSDocTypeLiteral_exit?(context: Context, node: JSDocTypeLiteral): void; JSDocUnknownType?(context: Context, node: JSDocUnknownType): void; JSDocUnknownType_exit?(context: Context, node: JSDocUnknownType): void; JSDocVariadicType?(context: Context, node: JSDocVariadicType): void; JSDocVariadicType_exit?(context: Context, node: JSDocVariadicType): void; JsxAttribute?(context: Context, node: JsxAttribute): void; JsxAttribute_exit?(context: Context, node: JsxAttribute): void; JsxAttributes?(context: Context, node: JsxAttributes): void; JsxAttributes_exit?(context: Context, node: JsxAttributes): void; JsxClosingElement?(context: Context, node: JsxClosingElement): void; JsxClosingElement_exit?(context: Context, node: JsxClosingElement): void; JsxClosingFragment?(context: Context, node: JsxClosingFragment): void; JsxClosingFragment_exit?(context: Context, node: JsxClosingFragment): void; JsxElement?(context: Context, node: JsxElement): void; JsxElement_exit?(context: Context, node: JsxElement): void; JsxExpression?(context: Context, node: JsxExpression): void; JsxExpression_exit?(context: Context, node: JsxExpression): void; JsxFragment?(context: Context, node: JsxFragment): void; JsxFragment_exit?(context: Context, node: JsxFragment): void; JsxNamespacedName?(context: Context, node: JsxNamespacedName): void; JsxNamespacedName_exit?(context: Context, node: JsxNamespacedName): void; JsxOpeningElement?(context: Context, node: JsxOpeningElement): void; JsxOpeningElement_exit?(context: Context, node: JsxOpeningElement): void; JsxOpeningFragment?(context: Context, node: JsxOpeningFragment): void; JsxOpeningFragment_exit?(context: Context, node: JsxOpeningFragment): void; JsxSelfClosingElement?(context: Context, node: JsxSelfClosingElement): void; JsxSelfClosingElement_exit?(context: Context, node: JsxSelfClosingElement): void; JsxSpreadAttribute?(context: Context, node: JsxSpreadAttribute): void; JsxSpreadAttribute_exit?(context: Context, node: JsxSpreadAttribute): void; JsxText?(context: Context, node: JsxText): void; JsxText_exit?(context: Context, node: JsxText): void; LabeledStatement?(context: Context, node: LabeledStatement): void; LabeledStatement_exit?(context: Context, node: LabeledStatement): void; LiteralType?(context: Context, node: LiteralTypeNode): void; LiteralType_exit?(context: Context, node: LiteralTypeNode): void; MappedType?(context: Context, node: MappedTypeNode): void; MappedType_exit?(context: Context, node: MappedTypeNode): void; MetaProperty?(context: Context, node: MetaProperty): void; MetaProperty_exit?(context: Context, node: MetaProperty): void; MethodDeclaration?(context: Context, node: MethodDeclaration): void; MethodDeclaration_exit?(context: Context, node: MethodDeclaration): void; MethodSignature?(context: Context, node: MethodSignature): void; MethodSignature_exit?(context: Context, node: MethodSignature): void; MissingDeclaration?(context: Context, node: MissingDeclaration): void; MissingDeclaration_exit?(context: Context, node: MissingDeclaration): void; ModuleBlock?(context: Context, node: ModuleBlock): void; ModuleBlock_exit?(context: Context, node: ModuleBlock): void; ModuleDeclaration?(context: Context, node: ModuleDeclaration): void; ModuleDeclaration_exit?(context: Context, node: ModuleDeclaration): void; NamedExports?(context: Context, node: NamedExports): void; NamedExports_exit?(context: Context, node: NamedExports): void; NamedImports?(context: Context, node: NamedImports): void; NamedImports_exit?(context: Context, node: NamedImports): void; NamedTupleMember?(context: Context, node: NamedTupleMember): void; NamedTupleMember_exit?(context: Context, node: NamedTupleMember): void; NamespaceExport?(context: Context, node: NamespaceExport): void; NamespaceExport_exit?(context: Context, node: NamespaceExport): void; NamespaceExportDeclaration?(context: Context, node: NamespaceExportDeclaration): void; NamespaceExportDeclaration_exit?(context: Context, node: NamespaceExportDeclaration): void; NamespaceImport?(context: Context, node: NamespaceImport): void; NamespaceImport_exit?(context: Context, node: NamespaceImport): void; NeverKeyword?(context: Context, node: NeverKeyword): void; NeverKeyword_exit?(context: Context, node: NeverKeyword): void; NewExpression?(context: Context, node: NewExpression): void; NewExpression_exit?(context: Context, node: NewExpression): void; NoSubstitutionTemplateLiteral?(context: Context, node: NoSubstitutionTemplateLiteral): void; NoSubstitutionTemplateLiteral_exit?(context: Context, node: NoSubstitutionTemplateLiteral): void; NonNullExpression?(context: Context, node: NonNullExpression): void; NonNullExpression_exit?(context: Context, node: NonNullExpression): void; NotEmittedStatement?(context: Context, node: NotEmittedStatement): void; NotEmittedStatement_exit?(context: Context, node: NotEmittedStatement): void; NotEmittedTypeElement?(context: Context, node: NotEmittedTypeElement): void; NotEmittedTypeElement_exit?(context: Context, node: NotEmittedTypeElement): void; NullKeyword?(context: Context, node: NullLiteral): void; NullKeyword_exit?(context: Context, node: NullLiteral): void; NumberKeyword?(context: Context, node: NumberKeyword): void; NumberKeyword_exit?(context: Context, node: NumberKeyword): void; NumericLiteral?(context: Context, node: NumericLiteral): void; NumericLiteral_exit?(context: Context, node: NumericLiteral): void; ObjectBindingPattern?(context: Context, node: ObjectBindingPattern): void; ObjectBindingPattern_exit?(context: Context, node: ObjectBindingPattern): void; ObjectKeyword?(context: Context, node: ObjectKeyword): void; ObjectKeyword_exit?(context: Context, node: ObjectKeyword): void; ObjectLiteralExpression?(context: Context, node: ObjectLiteralExpression): void; ObjectLiteralExpression_exit?(context: Context, node: ObjectLiteralExpression): void; OmittedExpression?(context: Context, node: OmittedExpression): void; OmittedExpression_exit?(context: Context, node: OmittedExpression): void; OptionalType?(context: Context, node: OptionalTypeNode): void; OptionalType_exit?(context: Context, node: OptionalTypeNode): void; Parameter?(context: Context, node: ParameterDeclaration): void; Parameter_exit?(context: Context, node: ParameterDeclaration): void; ParenthesizedExpression?(context: Context, node: ParenthesizedExpression): void; ParenthesizedExpression_exit?(context: Context, node: ParenthesizedExpression): void; ParenthesizedType?(context: Context, node: ParenthesizedTypeNode): void; ParenthesizedType_exit?(context: Context, node: ParenthesizedTypeNode): void; PartiallyEmittedExpression?(context: Context, node: PartiallyEmittedExpression): void; PartiallyEmittedExpression_exit?(context: Context, node: PartiallyEmittedExpression): void; PostfixUnaryExpression?(context: Context, node: PostfixUnaryExpression): void; PostfixUnaryExpression_exit?(context: Context, node: PostfixUnaryExpression): void; PrefixUnaryExpression?(context: Context, node: PrefixUnaryExpression): void; PrefixUnaryExpression_exit?(context: Context, node: PrefixUnaryExpression): void; PrivateIdentifier?(context: Context, node: PrivateIdentifier): void; PrivateIdentifier_exit?(context: Context, node: PrivateIdentifier): void; PropertyAccessExpression?(context: Context, node: PropertyAccessExpression): void; PropertyAccessExpression_exit?(context: Context, node: PropertyAccessExpression): void; PropertyAssignment?(context: Context, node: PropertyAssignment): void; PropertyAssignment_exit?(context: Context, node: PropertyAssignment): void; PropertyDeclaration?(context: Context, node: PropertyDeclaration): void; PropertyDeclaration_exit?(context: Context, node: PropertyDeclaration): void; PropertySignature?(context: Context, node: PropertySignature): void; PropertySignature_exit?(context: Context, node: PropertySignature): void; QualifiedName?(context: Context, node: QualifiedName): void; QualifiedName_exit?(context: Context, node: QualifiedName): void; RegularExpressionLiteral?(context: Context, node: RegularExpressionLiteral): void; RegularExpressionLiteral_exit?(context: Context, node: RegularExpressionLiteral): void; RestType?(context: Context, node: RestTypeNode): void; RestType_exit?(context: Context, node: RestTypeNode): void; ReturnStatement?(context: Context, node: ReturnStatement): void; ReturnStatement_exit?(context: Context, node: ReturnStatement): void; SatisfiesExpression?(context: Context, node: SatisfiesExpression): void; SatisfiesExpression_exit?(context: Context, node: SatisfiesExpression): void; SemicolonClassElement?(context: Context, node: SemicolonClassElement): void; SemicolonClassElement_exit?(context: Context, node: SemicolonClassElement): void; SetAccessor?(context: Context, node: SetAccessorDeclaration): void; SetAccessor_exit?(context: Context, node: SetAccessorDeclaration): void; ShorthandPropertyAssignment?(context: Context, node: ShorthandPropertyAssignment): void; ShorthandPropertyAssignment_exit?(context: Context, node: ShorthandPropertyAssignment): void; SourceFile?(context: Context, node: SourceFile): void; SourceFile_exit?(context: Context, node: SourceFile): void; SpreadAssignment?(context: Context, node: SpreadAssignment): void; SpreadAssignment_exit?(context: Context, node: SpreadAssignment): void; SpreadElement?(context: Context, node: SpreadElement): void; SpreadElement_exit?(context: Context, node: SpreadElement): void; StringKeyword?(context: Context, node: StringKeyword): void; StringKeyword_exit?(context: Context, node: StringKeyword): void; StringLiteral?(context: Context, node: StringLiteral): void; StringLiteral_exit?(context: Context, node: StringLiteral): void; SuperKeyword?(context: Context, node: SuperExpression): void; SuperKeyword_exit?(context: Context, node: SuperExpression): void; SwitchStatement?(context: Context, node: SwitchStatement): void; SwitchStatement_exit?(context: Context, node: SwitchStatement): void; SymbolKeyword?(context: Context, node: SymbolKeyword): void; SymbolKeyword_exit?(context: Context, node: SymbolKeyword): void; SyntheticExpression?(context: Context, node: SyntheticExpression): void; SyntheticExpression_exit?(context: Context, node: SyntheticExpression): void; TaggedTemplateExpression?(context: Context, node: TaggedTemplateExpression): void; TaggedTemplateExpression_exit?(context: Context, node: TaggedTemplateExpression): void; TemplateExpression?(context: Context, node: TemplateExpression): void; TemplateExpression_exit?(context: Context, node: TemplateExpression): void; TemplateHead?(context: Context, node: TemplateHead): void; TemplateHead_exit?(context: Context, node: TemplateHead): void; TemplateLiteralType?(context: Context, node: TemplateLiteralTypeNode): void; TemplateLiteralType_exit?(context: Context, node: TemplateLiteralTypeNode): void; TemplateLiteralTypeSpan?(context: Context, node: TemplateLiteralTypeSpan): void; TemplateLiteralTypeSpan_exit?(context: Context, node: TemplateLiteralTypeSpan): void; TemplateMiddle?(context: Context, node: TemplateMiddle): void; TemplateMiddle_exit?(context: Context, node: TemplateMiddle): void; TemplateSpan?(context: Context, node: TemplateSpan): void; TemplateSpan_exit?(context: Context, node: TemplateSpan): void; TemplateTail?(context: Context, node: TemplateTail): void; TemplateTail_exit?(context: Context, node: TemplateTail): void; ThisKeyword?(context: Context, node: ThisExpression): void; ThisKeyword_exit?(context: Context, node: ThisExpression): void; ThisType?(context: Context, node: ThisTypeNode): void; ThisType_exit?(context: Context, node: ThisTypeNode): void; ThrowStatement?(context: Context, node: ThrowStatement): void; ThrowStatement_exit?(context: Context, node: ThrowStatement): void; TrueKeyword?(context: Context, node: TrueLiteral): void; TrueKeyword_exit?(context: Context, node: TrueLiteral): void; TryStatement?(context: Context, node: TryStatement): void; TryStatement_exit?(context: Context, node: TryStatement): void; TupleType?(context: Context, node: TupleTypeNode): void; TupleType_exit?(context: Context, node: TupleTypeNode): void; TypeAliasDeclaration?(context: Context, node: TypeAliasDeclaration): void; TypeAliasDeclaration_exit?(context: Context, node: TypeAliasDeclaration): void; TypeAssertionExpression?(context: Context, node: TypeAssertion): void; TypeAssertionExpression_exit?(context: Context, node: TypeAssertion): void; TypeLiteral?(context: Context, node: TypeLiteralNode): void; TypeLiteral_exit?(context: Context, node: TypeLiteralNode): void; TypeOfExpression?(context: Context, node: TypeOfExpression): void; TypeOfExpression_exit?(context: Context, node: TypeOfExpression): void; TypeOperator?(context: Context, node: TypeOperatorNode): void; TypeOperator_exit?(context: Context, node: TypeOperatorNode): void; TypeParameter?(context: Context, node: TypeParameterDeclaration): void; TypeParameter_exit?(context: Context, node: TypeParameterDeclaration): void; TypePredicate?(context: Context, node: TypePredicateNode): void; TypePredicate_exit?(context: Context, node: TypePredicateNode): void; TypeQuery?(context: Context, node: TypeQueryNode): void; TypeQuery_exit?(context: Context, node: TypeQueryNode): void; TypeReference?(context: Context, node: TypeReferenceNode): void; TypeReference_exit?(context: Context, node: TypeReferenceNode): void; UndefinedKeyword?(context: Context, node: UndefinedKeyword): void; UndefinedKeyword_exit?(context: Context, node: UndefinedKeyword): void; UnionType?(context: Context, node: UnionTypeNode): void; UnionType_exit?(context: Context, node: UnionTypeNode): void; UnknownKeyword?(context: Context, node: UnknownKeyword): void; UnknownKeyword_exit?(context: Context, node: UnknownKeyword): void; VariableDeclaration?(context: Context, node: VariableDeclaration): void; VariableDeclaration_exit?(context: Context, node: VariableDeclaration): void; VariableDeclarationList?(context: Context, node: VariableDeclarationList): void; VariableDeclarationList_exit?(context: Context, node: VariableDeclarationList): void; VariableStatement?(context: Context, node: VariableStatement): void; VariableStatement_exit?(context: Context, node: VariableStatement): void; VoidExpression?(context: Context, node: VoidExpression): void; VoidExpression_exit?(context: Context, node: VoidExpression): void; VoidKeyword?(context: Context, node: VoidKeyword): void; VoidKeyword_exit?(context: Context, node: VoidKeyword): void; WhileStatement?(context: Context, node: WhileStatement): void; WhileStatement_exit?(context: Context, node: WhileStatement): void; WithStatement?(context: Context, node: WithStatement): void; WithStatement_exit?(context: Context, node: WithStatement): void; YieldExpression?(context: Context, node: YieldExpression): void; YieldExpression_exit?(context: Context, node: YieldExpression): void; }; //#endregion //#region src/types.d.ts type Config = { /** * List of base rules. You can spread `core.all()` as an initial list and then update it based on your needs: * * @example * ```ts * import { core, defineConfig } from "tsl"; * * defineConfig({ * rules: [ * ...core.all(), * core.noUnnecessaryBooleanLiteralCompare("off"), * { * name: "org/my-custom-rule", * visitor: { * // ... * }, * }, * ], * }); * ``` */ rules: Rule[]; /** * List of path parts to ignore (using string.includes) * * @example * ```ts * defineConfig({ * ignore: ["src/generated/"], * }); * ``` */ ignore?: string[]; /** * To differentiate tsl reports from TS errors, tsl diagnostics are reported by default as warnings. * If you prefer having only red squiggles, you can set this option to `"error"`. * @default "warning" */ diagnosticCategory?: "warning" | "error"; overrides?: { /** * List of path parts to override (using string.includes) */ files: string[]; /** * Additional rules to add for these files. * Redeclared rules (identical name) completely replace the base rules, there is no merging of options. * You can turn off a rule for these files by passing `"off"` as the rule option. */ rules: Rule[]; }[]; }; type Rule = { /** * Should be in the format of `{namespace}/{ruleName}`. * @example "myOrg/customRule" */ name: `${string}/${string}`; /** * Create mutable data scoped to the sourceFile being linted. * Can be used to pass information between visited nodes. */ createData?: (context: Omit) => Data; /** * Object of visitor functions that will be called for each node in the sourceFile. * @example * ```ts * visitor: { * BinaryExpression(context, node) { * // ... * }, * } * ``` */ visitor: Visitor; }; type Checker = Omit & { /** Fix Expression _Brand check */ getContextualType(node: Expression | ts.Expression): Type | undefined; getTypeFromTypeNode(node: TypeNode | ts.TypeNode): Type; getResolvedSignature(node: CallExpression | NewExpression | TaggedTemplateExpression | Decorator | JsxSelfClosingElement | JsxOpeningElement | ts.CallLikeExpression): Signature | undefined; /** Improve narrowing, borrow from typescript-eslint */ isArrayType(type: Type): type is TypeReference; isTupleType(type: Type): type is TupleTypeReference; /** * TS internal api * Return the type of the given property in the given type, or undefined if no such property exists */ getTypeOfPropertyOfType(type: Type, propertyName: string): Type | undefined; /** * TS internal api */ getContextualTypeForArgumentAtIndex(node: Node, argIndex: number): Type; }; type Change = { start: number; length: number; newText: string; } | { start: number; end: number; newText: string; } | { node: Node; newText: string; }; type Suggestion = { message: string; changes: Change[]; }; type ReportDescriptor = ({ node: Node; } | { start: number; end: number; }) & { message: string; suggestions?: Suggestion[] | (() => Suggestion[]); }; type Context = { sourceFile: SourceFile; program: Program; /** * TypeScript checker, with some types overrides * Can be used to get the type of a node * @example * ```ts * const type = context.checker.getTypeAtLocation(node); * ``` */ checker: Checker; /** * @deprecated, use checker */ rawChecker: TypeChecker; compilerOptions: CompilerOptions; utils: { /** * Check if the given type has the given flag. */ typeHasFlag: (type: Type, flag: TypeFlags) => boolean; /** * Check if the given type or one of its union type parts has the given flag. */ typeOrUnionHasFlag: (type: Type, flag: TypeFlags) => boolean; /** * Check if the given type has the given symbol flag. */ typeHasSymbolFlag: (type: Type, flag: SymbolFlags) => boolean; /** * Resolves the given node's type. Will return the type's generic constraint, if it has one. * * Warning - if the type is generic and does _not_ have a constraint, the type will be * returned as-is, rather than returning an `unknown` type. This can be checked for by * checking for the type flag `TypeFlags.TypeParameter`. */ getConstrainedTypeAtLocation(node: Node): Type; /** * Get the union type parts of the given type. * If the given type is not a union type, an array contain only that type will be returned. * @example * ```ts * declare const type: ts.Type; * * for (const constituent of unionConstituents(type)) { * // ... * } * ``` */ unionConstituents: (type: Type) => Type[]; /** * Get the intersection type parts of the given type. * If the given type is not a intersection type, an array contain only that type will be returned. * @example * ```ts * declare const type: ts.Type; * * for (const constituent of intersectionConstituents(type)) { * // ... * } * ``` */ intersectionConstituents: (type: Type) => Type[]; }; /** * Report a diagnostic * @example * ```ts * context.report({ node: node.expression, message: "Don't do foo, do bar instead." }); * ``` */ report(descriptor: ReportDescriptor): void; /** * Access mutable data initialized by the rule's createData function. * Scoped to the sourceFile being linted. * Can be used to pass information between visited nodes. */ data: Data; }; //#endregion export { Checker, Config, Context, ReportDescriptor, Rule, ast_d_exports };