@flint.fyi/typescript-language 0.18.3 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/{lib/types/ast.d.ts → dist/index.d.mts} +777 -4
  2. package/dist/index.mjs +1104 -0
  3. package/package.json +9 -8
  4. package/lib/_virtual/_rolldown/runtime.js +0 -13
  5. package/lib/collectReferencedFilePaths.d.ts +0 -4
  6. package/lib/collectReferencedFilePaths.js +0 -40
  7. package/lib/convertTypeScriptDiagnosticToLanguageReport.d.ts +0 -18
  8. package/lib/convertTypeScriptDiagnosticToLanguageReport.js +0 -114
  9. package/lib/createTypeScriptServerHost.d.ts +0 -4
  10. package/lib/createTypeScriptServerHost.js +0 -103
  11. package/lib/directives/parseDirectivesFromTypeScriptFile.d.ts +0 -13
  12. package/lib/directives/parseDirectivesFromTypeScriptFile.js +0 -66
  13. package/lib/getFirstEnumValues.d.ts +0 -36
  14. package/lib/getFirstEnumValues.js +0 -48
  15. package/lib/getTSNodeRange.d.ts +0 -9
  16. package/lib/getTSNodeRange.js +0 -11
  17. package/lib/getTypeScriptFileCacheImpacts.d.ts +0 -4
  18. package/lib/getTypeScriptFileCacheImpacts.js +0 -9
  19. package/lib/index.d.ts +0 -26
  20. package/lib/index.js +0 -22
  21. package/lib/language.d.ts +0 -416
  22. package/lib/language.js +0 -119
  23. package/lib/nodes.d.ts +0 -204
  24. package/lib/normalizeRange.d.ts +0 -4
  25. package/lib/normalizeRange.js +0 -19
  26. package/lib/orderTypeScriptFilePaths.d.ts +0 -3
  27. package/lib/orderTypeScriptFilePaths.js +0 -92
  28. package/lib/package.js +0 -7
  29. package/lib/scope/identifierReferences.d.ts +0 -4
  30. package/lib/scope/identifierReferences.js +0 -91
  31. package/lib/scope/scopeManager.d.ts +0 -15
  32. package/lib/scope/scopeManager.js +0 -149
  33. package/lib/scope/scopes.d.ts +0 -8
  34. package/lib/scope/scopes.js +0 -66
  35. package/lib/scope/types.d.ts +0 -39
  36. package/lib/types/checker.d.ts +0 -23
  37. package/lib/utils/createRuleTesterTSConfig.d.ts +0 -8
  38. package/lib/utils/createRuleTesterTSConfig.js +0 -18
  39. package/lib/utils/declarationIncludesGlobal.d.ts +0 -7
  40. package/lib/utils/declarationIncludesGlobal.js +0 -9
  41. package/lib/utils/declarationsIncludeGlobal.d.ts +0 -3
  42. package/lib/utils/declarationsIncludeGlobal.js +0 -9
  43. package/lib/utils/forEachChild.d.ts +0 -8
  44. package/lib/utils/forEachChild.js +0 -7
  45. package/lib/utils/getDeclarationsIfGlobal.d.ts +0 -9
  46. package/lib/utils/getDeclarationsIfGlobal.js +0 -10
  47. package/lib/utils/getModifyingReferences.d.ts +0 -11
  48. package/lib/utils/getModifyingReferences.js +0 -15
  49. package/lib/utils/hasSameTokens.d.ts +0 -7
  50. package/lib/utils/hasSameTokens.js +0 -32
  51. package/lib/utils/isBuiltinArrayMethod.d.ts +0 -14
  52. package/lib/utils/isBuiltinArrayMethod.js +0 -9
  53. package/lib/utils/isFunction.d.ts +0 -7
  54. package/lib/utils/isFunction.js +0 -8
  55. package/lib/utils/isGlobalDeclaration.d.ts +0 -7
  56. package/lib/utils/isGlobalDeclaration.js +0 -9
  57. package/lib/utils/isGlobalDeclarationOfName.d.ts +0 -11
  58. package/lib/utils/isGlobalDeclarationOfName.js +0 -23
  59. package/lib/utils/isGlobalVariable.d.ts +0 -13
  60. package/lib/utils/isGlobalVariable.js +0 -19
  61. package/lib/utils/isInlineArrayCreation.d.ts +0 -12
  62. package/lib/utils/isInlineArrayCreation.js +0 -45
  63. package/lib/utils/isStaticString.d.ts +0 -6
  64. package/lib/utils/isStaticString.js +0 -9
  65. package/lib/utils/isStringRawNoSubstitution.d.ts +0 -8
  66. package/lib/utils/isStringRawNoSubstitution.js +0 -11
  67. package/lib/utils/unwrapParentParenthesizedExpressions.d.ts +0 -7
  68. package/lib/utils/unwrapParentParenthesizedExpressions.js +0 -9
  69. package/lib/utils/unwrapParenthesizedNode.d.ts +0 -7
  70. package/lib/utils/unwrapParenthesizedNode.js +0 -9
@@ -1,6 +1,21 @@
1
- import ts from "typescript";
1
+ import * as ts$1 from "typescript";
2
+ import ts, { CallLikeExpression, Declaration, Node, Program, Signature, TupleTypeReference, Type, TypeChecker, TypeReference } from "typescript";
3
+ import { AnyOptionalSchema, CharacterReportRange, FileAboutData, InferredOutputObject, LanguageFile, LanguageFileDefinition, LanguageReport, LanguageReports, NormalizedReportRangeObject, RuleRuntime, SourceFileWithLineMapAndFileName, WithExitKeys } from "@flint.fyi/core";
2
4
 
3
- //#region src/types/ast.d.ts
5
+ //#region \0rolldown/runtime.js
6
+ //#endregion
7
+ //#region src/convertTypeScriptDiagnosticToLanguageReport.d.ts
8
+ interface TSDiagnostic extends TSDiagnosticRelatedInformation {
9
+ relatedInformation?: TSDiagnosticRelatedInformation[];
10
+ }
11
+ interface TSDiagnosticRelatedInformation {
12
+ code: number;
13
+ file: SourceFileWithLineMapAndFileName | undefined;
14
+ length: number | undefined;
15
+ messageText: string | ts.DiagnosticMessageChain;
16
+ start: number | undefined;
17
+ }
18
+ declare function convertTypeScriptDiagnosticToLanguageReport(diagnostic: TSDiagnostic): LanguageReport;
4
19
  declare namespace ast_d_exports {
5
20
  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, 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, VoidExpression, VoidKeyword, WhileStatement, WithStatement, YieldExpression };
6
21
  }
@@ -2067,5 +2082,763 @@ type ModifierParent = AccessorDeclaration | ArrowFunction | ClassDeclaration | C
2067
2082
  type StatementParent = Block | CaseOrDefaultClause | IfStatement | IterationStatement | LabeledStatement | ModuleBlock | SourceFile | WithStatement;
2068
2083
  type TypeNodeParent = AccessorDeclaration | ArrayTypeNode | ArrowFunction | AsExpression | CallExpression | CallSignatureDeclaration | ConditionalTypeNode | ConstructorDeclaration | ConstructSignatureDeclaration | FunctionDeclaration | FunctionExpression | FunctionOrConstructorTypeNodeBase | IndexedAccessTypeNode | IndexSignatureDeclaration | IntersectionTypeNode | JSDocFunctionType | JSDocNamepathType | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocTypeExpression | JSDocVariadicType | JsxOpeningElement | JsxSelfClosingElement | MappedTypeNode | MethodDeclaration | MethodSignature | NamedTupleMember | NewExpression | NodeWithTypeArguments | OptionalTypeNode | ParameterDeclaration | ParenthesizedTypeNode | PropertyDeclaration | PropertySignature | RestTypeNode | SatisfiesExpression | TaggedTemplateExpression | TemplateLiteralTypeSpan | TupleTypeNode | TypeAliasDeclaration | TypeAssertion | TypeOperatorNode | TypeParameterDeclaration | TypePredicateNode | UnionTypeNode | VariableDeclaration;
2069
2084
  //#endregion
2070
- export { AnyKeyword, AnyNode, 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, Expression, 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, 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, JsxText, LabeledStatement, LeftHandSideExpressionParent, LiteralTypeNode, MappedTypeNode, MetaProperty, MethodDeclaration, MethodSignature, MissingDeclaration, ModuleBlock, ModuleDeclaration, NamedExports, NamedImports, NamedTupleMember, 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, ast_d_exports };
2071
- //# sourceMappingURL=ast.d.ts.map
2085
+ //#region src/directives/parseDirectivesFromTypeScriptFile.d.ts
2086
+ interface ExtractedDirective {
2087
+ range: NormalizedReportRangeObject;
2088
+ selection: string;
2089
+ type: string;
2090
+ }
2091
+ declare function extractDirectivesFromTypeScriptFile(sourceFile: SourceFile): ExtractedDirective[];
2092
+ //#endregion
2093
+ //#region src/getTSNodeRange.d.ts
2094
+ declare function getTSNodeRange(node: ts$1.Node, sourceFile: SourceFile): CharacterReportRange;
2095
+ //#endregion
2096
+ //#region src/nodes.d.ts
2097
+ interface TypeScriptNodesByName {
2098
+ AnyKeyword: AnyKeyword;
2099
+ ArrayBindingPattern: ArrayBindingPattern;
2100
+ ArrayLiteralExpression: ArrayLiteralExpression;
2101
+ ArrayType: ArrayTypeNode;
2102
+ ArrowFunction: ArrowFunction;
2103
+ AsExpression: AsExpression;
2104
+ AwaitExpression: AwaitExpression;
2105
+ BigIntKeyword: BigIntKeyword;
2106
+ BigIntLiteral: BigIntLiteral;
2107
+ BinaryExpression: BinaryExpression;
2108
+ BindingElement: BindingElement;
2109
+ Block: Block;
2110
+ BooleanKeyword: BooleanKeyword;
2111
+ BreakStatement: BreakStatement;
2112
+ CallExpression: CallExpression;
2113
+ CallSignature: CallSignatureDeclaration;
2114
+ CaseBlock: CaseBlock;
2115
+ CaseClause: CaseClause;
2116
+ CatchClause: CatchClause;
2117
+ ClassDeclaration: ClassDeclaration;
2118
+ ClassExpression: ClassExpression;
2119
+ ClassStaticBlockDeclaration: ClassStaticBlockDeclaration;
2120
+ CommaListExpression: CommaListExpression;
2121
+ ComputedPropertyName: ComputedPropertyName;
2122
+ ConditionalExpression: ConditionalExpression;
2123
+ ConditionalType: ConditionalTypeNode;
2124
+ Constructor: ConstructorDeclaration;
2125
+ ConstructorType: ConstructorTypeNode;
2126
+ ConstructSignature: ConstructSignatureDeclaration;
2127
+ ContinueStatement: ContinueStatement;
2128
+ DebuggerStatement: DebuggerStatement;
2129
+ Decorator: Decorator;
2130
+ DefaultClause: DefaultClause;
2131
+ DeleteExpression: DeleteExpression;
2132
+ DoStatement: DoStatement;
2133
+ ElementAccessExpression: ElementAccessExpression;
2134
+ EmptyStatement: EmptyStatement;
2135
+ EnumDeclaration: EnumDeclaration;
2136
+ EnumMember: EnumMember;
2137
+ ExportAssignment: ExportAssignment;
2138
+ ExportDeclaration: ExportDeclaration;
2139
+ ExportSpecifier: ExportSpecifier;
2140
+ ExpressionStatement: ExpressionStatement;
2141
+ ExpressionWithTypeArguments: ExpressionWithTypeArguments;
2142
+ ExternalModuleReference: ExternalModuleReference;
2143
+ FalseKeyword: FalseLiteral;
2144
+ ForInStatement: ForInStatement;
2145
+ ForOfStatement: ForOfStatement;
2146
+ ForStatement: ForStatement;
2147
+ FunctionDeclaration: FunctionDeclaration;
2148
+ FunctionExpression: FunctionExpression;
2149
+ FunctionType: FunctionTypeNode;
2150
+ GetAccessor: GetAccessorDeclaration;
2151
+ HeritageClause: HeritageClause;
2152
+ Identifier: Identifier;
2153
+ IfStatement: IfStatement;
2154
+ ImportAttribute: ImportAttribute;
2155
+ ImportAttributes: ImportAttributes;
2156
+ ImportClause: ImportClause;
2157
+ ImportDeclaration: ImportDeclaration;
2158
+ ImportEqualsDeclaration: ImportEqualsDeclaration;
2159
+ ImportKeyword: ImportExpression;
2160
+ ImportSpecifier: ImportSpecifier;
2161
+ ImportType: ImportTypeNode;
2162
+ IndexedAccessType: IndexedAccessTypeNode;
2163
+ IndexSignature: IndexSignatureDeclaration;
2164
+ InferType: InferTypeNode;
2165
+ InterfaceDeclaration: InterfaceDeclaration;
2166
+ IntersectionType: IntersectionTypeNode;
2167
+ IntrinsicKeyword: IntrinsicKeyword;
2168
+ JSDocAllType: JSDocAllType;
2169
+ JSDocFunctionType: JSDocFunctionType;
2170
+ JSDocLink: JSDocLink;
2171
+ JSDocLinkCode: JSDocLinkCode;
2172
+ JSDocLinkPlain: JSDocLinkPlain;
2173
+ JSDocMemberName: JSDocMemberName;
2174
+ JSDocNamepathType: JSDocNamepathType;
2175
+ JSDocNonNullableType: JSDocNonNullableType;
2176
+ JSDocNullableType: JSDocNullableType;
2177
+ JSDocOptionalType: JSDocOptionalType;
2178
+ JSDocParameterTag: JSDocParameterTag;
2179
+ JSDocPropertyTag: JSDocPropertyTag;
2180
+ JSDocReturnTag: JSDocReturnTag;
2181
+ JSDocSignature: JSDocSignature;
2182
+ JSDocTemplateTag: JSDocTemplateTag;
2183
+ JSDocText: JSDocText;
2184
+ JSDocTypeExpression: JSDocTypeExpression;
2185
+ JSDocTypeLiteral: JSDocTypeLiteral;
2186
+ JSDocUnknownType: JSDocUnknownType;
2187
+ JSDocVariadicType: JSDocVariadicType;
2188
+ JsxAttribute: JsxAttribute;
2189
+ JsxAttributes: JsxAttributes;
2190
+ JsxClosingElement: JsxClosingElement;
2191
+ JsxClosingFragment: JsxClosingFragment;
2192
+ JsxElement: JsxElement;
2193
+ JsxExpression: JsxExpression;
2194
+ JsxFragment: JsxFragment;
2195
+ JsxNamespacedName: JsxNamespacedName;
2196
+ JsxOpeningElement: JsxOpeningElement;
2197
+ JsxOpeningFragment: JsxOpeningFragment;
2198
+ JsxSelfClosingElement: JsxSelfClosingElement;
2199
+ JsxSpreadAttribute: JsxSpreadAttribute;
2200
+ JsxText: JsxText;
2201
+ LabeledStatement: LabeledStatement;
2202
+ LiteralType: LiteralTypeNode;
2203
+ MappedType: MappedTypeNode;
2204
+ MetaProperty: MetaProperty;
2205
+ MethodDeclaration: MethodDeclaration;
2206
+ MethodSignature: MethodSignature;
2207
+ MissingDeclaration: MissingDeclaration;
2208
+ ModuleBlock: ModuleBlock;
2209
+ ModuleDeclaration: ModuleDeclaration;
2210
+ NamedExports: NamedExports;
2211
+ NamedImports: NamedImports;
2212
+ NamedTupleMember: NamedTupleMember;
2213
+ NamespaceExport: NamespaceExport;
2214
+ NamespaceExportDeclaration: NamespaceExportDeclaration;
2215
+ NamespaceImport: NamespaceImport;
2216
+ NeverKeyword: NeverKeyword;
2217
+ NewExpression: NewExpression;
2218
+ NonNullExpression: NonNullExpression;
2219
+ NoSubstitutionTemplateLiteral: NoSubstitutionTemplateLiteral;
2220
+ NotEmittedStatement: NotEmittedStatement;
2221
+ NotEmittedTypeElement: NotEmittedTypeElement;
2222
+ NullKeyword: NullLiteral;
2223
+ NumberKeyword: NumberKeyword;
2224
+ NumericLiteral: NumericLiteral;
2225
+ ObjectBindingPattern: ObjectBindingPattern;
2226
+ ObjectKeyword: ObjectKeyword;
2227
+ ObjectLiteralExpression: ObjectLiteralExpression;
2228
+ OmittedExpression: OmittedExpression;
2229
+ OptionalType: OptionalTypeNode;
2230
+ Parameter: ParameterDeclaration;
2231
+ ParenthesizedExpression: ParenthesizedExpression;
2232
+ ParenthesizedType: ParenthesizedTypeNode;
2233
+ PartiallyEmittedExpression: PartiallyEmittedExpression;
2234
+ PostfixUnaryExpression: PostfixUnaryExpression;
2235
+ PrefixUnaryExpression: PrefixUnaryExpression;
2236
+ PrivateIdentifier: PrivateIdentifier;
2237
+ PropertyAccessExpression: PropertyAccessExpression;
2238
+ PropertyAssignment: PropertyAssignment;
2239
+ PropertyDeclaration: PropertyDeclaration;
2240
+ PropertySignature: PropertySignature;
2241
+ QualifiedName: QualifiedName;
2242
+ RegularExpressionLiteral: RegularExpressionLiteral;
2243
+ RestType: RestTypeNode;
2244
+ ReturnStatement: ReturnStatement;
2245
+ SatisfiesExpression: SatisfiesExpression;
2246
+ SemicolonClassElement: SemicolonClassElement;
2247
+ SetAccessor: SetAccessorDeclaration;
2248
+ ShorthandPropertyAssignment: ShorthandPropertyAssignment;
2249
+ SourceFile: SourceFile;
2250
+ SpreadAssignment: SpreadAssignment;
2251
+ SpreadElement: SpreadElement;
2252
+ StringKeyword: StringKeyword;
2253
+ StringLiteral: StringLiteral;
2254
+ SuperKeyword: SuperExpression;
2255
+ SwitchStatement: SwitchStatement;
2256
+ SymbolKeyword: SymbolKeyword;
2257
+ SyntheticExpression: SyntheticExpression;
2258
+ TaggedTemplateExpression: TaggedTemplateExpression;
2259
+ TemplateExpression: TemplateExpression;
2260
+ TemplateHead: TemplateHead;
2261
+ TemplateLiteralType: TemplateLiteralTypeNode;
2262
+ TemplateLiteralTypeSpan: TemplateLiteralTypeSpan;
2263
+ TemplateMiddle: TemplateMiddle;
2264
+ TemplateSpan: TemplateSpan;
2265
+ TemplateTail: TemplateTail;
2266
+ ThisKeyword: ThisExpression;
2267
+ ThisType: ThisTypeNode;
2268
+ ThrowStatement: ThrowStatement;
2269
+ TrueKeyword: TrueLiteral;
2270
+ TryStatement: TryStatement;
2271
+ TupleType: TupleTypeNode;
2272
+ TypeAliasDeclaration: TypeAliasDeclaration;
2273
+ TypeAssertionExpression: TypeAssertion;
2274
+ TypeLiteral: TypeLiteralNode;
2275
+ TypeOfExpression: TypeOfExpression;
2276
+ TypeOperator: TypeOperatorNode;
2277
+ TypeParameter: TypeParameterDeclaration;
2278
+ TypePredicate: TypePredicateNode;
2279
+ TypeQuery: TypeQueryNode;
2280
+ TypeReference: TypeReferenceNode;
2281
+ UndefinedKeyword: UndefinedKeyword;
2282
+ UnionType: UnionTypeNode;
2283
+ UnknownKeyword: UnknownKeyword;
2284
+ VariableDeclaration: VariableDeclaration;
2285
+ VariableDeclarationList: VariableDeclarationList;
2286
+ VariableStatement: VariableStatement;
2287
+ VoidExpression: VoidExpression;
2288
+ VoidKeyword: VoidKeyword;
2289
+ WhileStatement: WhileStatement;
2290
+ WithStatement: WithStatement;
2291
+ YieldExpression: YieldExpression;
2292
+ }
2293
+ type TypeScriptNodeVisitors = WithExitKeys<TypeScriptNodesByName>;
2294
+ //#endregion
2295
+ //#region src/types/checker.d.ts
2296
+ type Checker = CheckerOverrides & Omit<TypeChecker, keyof CheckerOverrides>;
2297
+ interface CheckerOverrides {
2298
+ getResolvedSignature(node: CallExpression | Decorator | JsxOpeningElement | JsxSelfClosingElement | NewExpression | TaggedTemplateExpression | CallLikeExpression): Signature | undefined;
2299
+ /** Improve narrowing, borrow from typescript-eslint */
2300
+ isArrayType(type: Type): type is TypeReference;
2301
+ isTupleType(type: Type): type is TupleTypeReference;
2302
+ /**
2303
+ * TS internal api
2304
+ * Return the type of the given property in the given type, or undefined if no such property exists
2305
+ */
2306
+ getTypeOfPropertyOfType(type: Type, propertyName: string): Type | undefined;
2307
+ /**
2308
+ * TS internal api
2309
+ */
2310
+ getContextualTypeForArgumentAtIndex(node: Node, argIndex: number): Type;
2311
+ }
2312
+ //#endregion
2313
+ //#region src/language.d.ts
2314
+ interface TypeScriptFileServices {
2315
+ program: ts.Program;
2316
+ sourceFile: SourceFile;
2317
+ typeChecker: Checker;
2318
+ }
2319
+ declare const NodeSyntaxKinds: typeof ts.SyntaxKind;
2320
+ type VolarCreateFile = (data: FileAboutData, program: ts.Program, sourceFile: SourceFile) => VolarLanguageFileDefinition;
2321
+ type VolarLanguageFileDefinition = LanguageFileDefinition<object> & {
2322
+ __volarServices: {
2323
+ getLanguageReports(): LanguageReports;
2324
+ runVisitors(file: LanguageFile<TypeScriptFileServices>, options: InferredOutputObject<AnyOptionalSchema | undefined>, runtime: RuleRuntime<TypeScriptNodeVisitors, TypeScriptFileServices>): void;
2325
+ };
2326
+ };
2327
+ declare function setVolarCreateFile(create: VolarCreateFile): void;
2328
+ declare const typescriptLanguage: import("@flint.fyi/core").Language<{
2329
+ AnyKeyword: AnyKeyword;
2330
+ ArrayBindingPattern: ArrayBindingPattern;
2331
+ ArrayLiteralExpression: ArrayLiteralExpression;
2332
+ ArrayType: ArrayTypeNode;
2333
+ ArrowFunction: ArrowFunction;
2334
+ AsExpression: AsExpression;
2335
+ AwaitExpression: AwaitExpression;
2336
+ BigIntKeyword: BigIntKeyword;
2337
+ BigIntLiteral: BigIntLiteral;
2338
+ BinaryExpression: BinaryExpression;
2339
+ BindingElement: BindingElement;
2340
+ Block: Block;
2341
+ BooleanKeyword: BooleanKeyword;
2342
+ BreakStatement: BreakStatement;
2343
+ CallExpression: CallExpression;
2344
+ CallSignature: CallSignatureDeclaration;
2345
+ CaseBlock: CaseBlock;
2346
+ CaseClause: CaseClause;
2347
+ CatchClause: CatchClause;
2348
+ ClassDeclaration: ClassDeclaration;
2349
+ ClassExpression: ClassExpression;
2350
+ ClassStaticBlockDeclaration: ClassStaticBlockDeclaration;
2351
+ CommaListExpression: CommaListExpression;
2352
+ ComputedPropertyName: ComputedPropertyName;
2353
+ ConditionalExpression: ConditionalExpression;
2354
+ ConditionalType: ConditionalTypeNode;
2355
+ Constructor: ConstructorDeclaration;
2356
+ ConstructorType: ConstructorTypeNode;
2357
+ ConstructSignature: ConstructSignatureDeclaration;
2358
+ ContinueStatement: ContinueStatement;
2359
+ DebuggerStatement: DebuggerStatement;
2360
+ Decorator: Decorator;
2361
+ DefaultClause: DefaultClause;
2362
+ DeleteExpression: DeleteExpression;
2363
+ DoStatement: DoStatement;
2364
+ ElementAccessExpression: ElementAccessExpression;
2365
+ EmptyStatement: EmptyStatement;
2366
+ EnumDeclaration: EnumDeclaration;
2367
+ EnumMember: EnumMember;
2368
+ ExportAssignment: ExportAssignment;
2369
+ ExportDeclaration: ExportDeclaration;
2370
+ ExportSpecifier: ExportSpecifier;
2371
+ ExpressionStatement: ExpressionStatement;
2372
+ ExpressionWithTypeArguments: ExpressionWithTypeArguments;
2373
+ ExternalModuleReference: ExternalModuleReference;
2374
+ FalseKeyword: FalseLiteral;
2375
+ ForInStatement: ForInStatement;
2376
+ ForOfStatement: ForOfStatement;
2377
+ ForStatement: ForStatement;
2378
+ FunctionDeclaration: FunctionDeclaration;
2379
+ FunctionExpression: FunctionExpression;
2380
+ FunctionType: FunctionTypeNode;
2381
+ GetAccessor: GetAccessorDeclaration;
2382
+ HeritageClause: HeritageClause;
2383
+ Identifier: Identifier;
2384
+ IfStatement: IfStatement;
2385
+ ImportAttribute: ImportAttribute;
2386
+ ImportAttributes: ImportAttributes;
2387
+ ImportClause: ImportClause;
2388
+ ImportDeclaration: ImportDeclaration;
2389
+ ImportEqualsDeclaration: ImportEqualsDeclaration;
2390
+ ImportKeyword: ImportExpression;
2391
+ ImportSpecifier: ImportSpecifier;
2392
+ ImportType: ImportTypeNode;
2393
+ IndexedAccessType: IndexedAccessTypeNode;
2394
+ IndexSignature: IndexSignatureDeclaration;
2395
+ InferType: InferTypeNode;
2396
+ InterfaceDeclaration: InterfaceDeclaration;
2397
+ IntersectionType: IntersectionTypeNode;
2398
+ IntrinsicKeyword: IntrinsicKeyword;
2399
+ JSDocAllType: JSDocAllType;
2400
+ JSDocFunctionType: JSDocFunctionType;
2401
+ JSDocLink: JSDocLink;
2402
+ JSDocLinkCode: JSDocLinkCode;
2403
+ JSDocLinkPlain: JSDocLinkPlain;
2404
+ JSDocMemberName: JSDocMemberName;
2405
+ JSDocNamepathType: JSDocNamepathType;
2406
+ JSDocNonNullableType: JSDocNonNullableType;
2407
+ JSDocNullableType: JSDocNullableType;
2408
+ JSDocOptionalType: JSDocOptionalType;
2409
+ JSDocParameterTag: JSDocParameterTag;
2410
+ JSDocPropertyTag: JSDocPropertyTag;
2411
+ JSDocReturnTag: JSDocReturnTag;
2412
+ JSDocSignature: JSDocSignature;
2413
+ JSDocTemplateTag: JSDocTemplateTag;
2414
+ JSDocText: JSDocText;
2415
+ JSDocTypeExpression: JSDocTypeExpression;
2416
+ JSDocTypeLiteral: JSDocTypeLiteral;
2417
+ JSDocUnknownType: JSDocUnknownType;
2418
+ JSDocVariadicType: JSDocVariadicType;
2419
+ JsxAttribute: JsxAttribute;
2420
+ JsxAttributes: JsxAttributes;
2421
+ JsxClosingElement: JsxClosingElement;
2422
+ JsxClosingFragment: JsxClosingFragment;
2423
+ JsxElement: JsxElement;
2424
+ JsxExpression: JsxExpression;
2425
+ JsxFragment: JsxFragment;
2426
+ JsxNamespacedName: JsxNamespacedName;
2427
+ JsxOpeningElement: JsxOpeningElement;
2428
+ JsxOpeningFragment: JsxOpeningFragment;
2429
+ JsxSelfClosingElement: JsxSelfClosingElement;
2430
+ JsxSpreadAttribute: JsxSpreadAttribute;
2431
+ JsxText: JsxText;
2432
+ LabeledStatement: LabeledStatement;
2433
+ LiteralType: LiteralTypeNode;
2434
+ MappedType: MappedTypeNode;
2435
+ MetaProperty: MetaProperty;
2436
+ MethodDeclaration: MethodDeclaration;
2437
+ MethodSignature: MethodSignature;
2438
+ MissingDeclaration: MissingDeclaration;
2439
+ ModuleBlock: ModuleBlock;
2440
+ ModuleDeclaration: ModuleDeclaration;
2441
+ NamedExports: NamedExports;
2442
+ NamedImports: NamedImports;
2443
+ NamedTupleMember: NamedTupleMember;
2444
+ NamespaceExport: NamespaceExport;
2445
+ NamespaceExportDeclaration: NamespaceExportDeclaration;
2446
+ NamespaceImport: NamespaceImport;
2447
+ NeverKeyword: NeverKeyword;
2448
+ NewExpression: NewExpression;
2449
+ NonNullExpression: NonNullExpression;
2450
+ NoSubstitutionTemplateLiteral: NoSubstitutionTemplateLiteral;
2451
+ NotEmittedStatement: NotEmittedStatement;
2452
+ NotEmittedTypeElement: NotEmittedTypeElement;
2453
+ NullKeyword: NullLiteral;
2454
+ NumberKeyword: NumberKeyword;
2455
+ NumericLiteral: NumericLiteral;
2456
+ ObjectBindingPattern: ObjectBindingPattern;
2457
+ ObjectKeyword: ObjectKeyword;
2458
+ ObjectLiteralExpression: ObjectLiteralExpression;
2459
+ OmittedExpression: OmittedExpression;
2460
+ OptionalType: OptionalTypeNode;
2461
+ Parameter: ParameterDeclaration;
2462
+ ParenthesizedExpression: ParenthesizedExpression;
2463
+ ParenthesizedType: ParenthesizedTypeNode;
2464
+ PartiallyEmittedExpression: PartiallyEmittedExpression;
2465
+ PostfixUnaryExpression: PostfixUnaryExpression;
2466
+ PrefixUnaryExpression: PrefixUnaryExpression;
2467
+ PrivateIdentifier: PrivateIdentifier;
2468
+ PropertyAccessExpression: PropertyAccessExpression;
2469
+ PropertyAssignment: PropertyAssignment;
2470
+ PropertyDeclaration: PropertyDeclaration;
2471
+ PropertySignature: PropertySignature;
2472
+ QualifiedName: QualifiedName;
2473
+ RegularExpressionLiteral: RegularExpressionLiteral;
2474
+ RestType: RestTypeNode;
2475
+ ReturnStatement: ReturnStatement;
2476
+ SatisfiesExpression: SatisfiesExpression;
2477
+ SemicolonClassElement: SemicolonClassElement;
2478
+ SetAccessor: SetAccessorDeclaration;
2479
+ ShorthandPropertyAssignment: ShorthandPropertyAssignment;
2480
+ SourceFile: SourceFile;
2481
+ SpreadAssignment: SpreadAssignment;
2482
+ SpreadElement: SpreadElement;
2483
+ StringKeyword: StringKeyword;
2484
+ StringLiteral: StringLiteral;
2485
+ SuperKeyword: SuperExpression;
2486
+ SwitchStatement: SwitchStatement;
2487
+ SymbolKeyword: SymbolKeyword;
2488
+ SyntheticExpression: SyntheticExpression;
2489
+ TaggedTemplateExpression: TaggedTemplateExpression;
2490
+ TemplateExpression: TemplateExpression;
2491
+ TemplateHead: TemplateHead;
2492
+ TemplateLiteralType: TemplateLiteralTypeNode;
2493
+ TemplateLiteralTypeSpan: TemplateLiteralTypeSpan;
2494
+ TemplateMiddle: TemplateMiddle;
2495
+ TemplateSpan: TemplateSpan;
2496
+ TemplateTail: TemplateTail;
2497
+ ThisKeyword: ThisExpression;
2498
+ ThisType: ThisTypeNode;
2499
+ ThrowStatement: ThrowStatement;
2500
+ TrueKeyword: TrueLiteral;
2501
+ TryStatement: TryStatement;
2502
+ TupleType: TupleTypeNode;
2503
+ TypeAliasDeclaration: TypeAliasDeclaration;
2504
+ TypeAssertionExpression: TypeAssertion;
2505
+ TypeLiteral: TypeLiteralNode;
2506
+ TypeOfExpression: TypeOfExpression;
2507
+ TypeOperator: TypeOperatorNode;
2508
+ TypeParameter: TypeParameterDeclaration;
2509
+ TypePredicate: TypePredicateNode;
2510
+ TypeQuery: TypeQueryNode;
2511
+ TypeReference: TypeReferenceNode;
2512
+ UndefinedKeyword: UndefinedKeyword;
2513
+ UnionType: UnionTypeNode;
2514
+ UnknownKeyword: UnknownKeyword;
2515
+ VariableDeclaration: VariableDeclaration;
2516
+ VariableDeclarationList: VariableDeclarationList;
2517
+ VariableStatement: VariableStatement;
2518
+ VoidExpression: VoidExpression;
2519
+ VoidKeyword: VoidKeyword;
2520
+ WhileStatement: WhileStatement;
2521
+ WithStatement: WithStatement;
2522
+ YieldExpression: YieldExpression;
2523
+ "AnyKeyword:exit": AnyKeyword;
2524
+ "ArrayBindingPattern:exit": ArrayBindingPattern;
2525
+ "ArrayLiteralExpression:exit": ArrayLiteralExpression;
2526
+ "ArrayType:exit": ArrayTypeNode;
2527
+ "ArrowFunction:exit": ArrowFunction;
2528
+ "AsExpression:exit": AsExpression;
2529
+ "AwaitExpression:exit": AwaitExpression;
2530
+ "BigIntKeyword:exit": BigIntKeyword;
2531
+ "BigIntLiteral:exit": BigIntLiteral;
2532
+ "BinaryExpression:exit": BinaryExpression;
2533
+ "BindingElement:exit": BindingElement;
2534
+ "Block:exit": Block;
2535
+ "BooleanKeyword:exit": BooleanKeyword;
2536
+ "BreakStatement:exit": BreakStatement;
2537
+ "CallExpression:exit": CallExpression;
2538
+ "CallSignature:exit": CallSignatureDeclaration;
2539
+ "CaseBlock:exit": CaseBlock;
2540
+ "CaseClause:exit": CaseClause;
2541
+ "CatchClause:exit": CatchClause;
2542
+ "ClassDeclaration:exit": ClassDeclaration;
2543
+ "ClassExpression:exit": ClassExpression;
2544
+ "ClassStaticBlockDeclaration:exit": ClassStaticBlockDeclaration;
2545
+ "CommaListExpression:exit": CommaListExpression;
2546
+ "ComputedPropertyName:exit": ComputedPropertyName;
2547
+ "ConditionalExpression:exit": ConditionalExpression;
2548
+ "ConditionalType:exit": ConditionalTypeNode;
2549
+ "Constructor:exit": ConstructorDeclaration;
2550
+ "ConstructorType:exit": ConstructorTypeNode;
2551
+ "ConstructSignature:exit": ConstructSignatureDeclaration;
2552
+ "ContinueStatement:exit": ContinueStatement;
2553
+ "DebuggerStatement:exit": DebuggerStatement;
2554
+ "Decorator:exit": Decorator;
2555
+ "DefaultClause:exit": DefaultClause;
2556
+ "DeleteExpression:exit": DeleteExpression;
2557
+ "DoStatement:exit": DoStatement;
2558
+ "ElementAccessExpression:exit": ElementAccessExpression;
2559
+ "EmptyStatement:exit": EmptyStatement;
2560
+ "EnumDeclaration:exit": EnumDeclaration;
2561
+ "EnumMember:exit": EnumMember;
2562
+ "ExportAssignment:exit": ExportAssignment;
2563
+ "ExportDeclaration:exit": ExportDeclaration;
2564
+ "ExportSpecifier:exit": ExportSpecifier;
2565
+ "ExpressionStatement:exit": ExpressionStatement;
2566
+ "ExpressionWithTypeArguments:exit": ExpressionWithTypeArguments;
2567
+ "ExternalModuleReference:exit": ExternalModuleReference;
2568
+ "FalseKeyword:exit": FalseLiteral;
2569
+ "ForInStatement:exit": ForInStatement;
2570
+ "ForOfStatement:exit": ForOfStatement;
2571
+ "ForStatement:exit": ForStatement;
2572
+ "FunctionDeclaration:exit": FunctionDeclaration;
2573
+ "FunctionExpression:exit": FunctionExpression;
2574
+ "FunctionType:exit": FunctionTypeNode;
2575
+ "GetAccessor:exit": GetAccessorDeclaration;
2576
+ "HeritageClause:exit": HeritageClause;
2577
+ "Identifier:exit": Identifier;
2578
+ "IfStatement:exit": IfStatement;
2579
+ "ImportAttribute:exit": ImportAttribute;
2580
+ "ImportAttributes:exit": ImportAttributes;
2581
+ "ImportClause:exit": ImportClause;
2582
+ "ImportDeclaration:exit": ImportDeclaration;
2583
+ "ImportEqualsDeclaration:exit": ImportEqualsDeclaration;
2584
+ "ImportKeyword:exit": ImportExpression;
2585
+ "ImportSpecifier:exit": ImportSpecifier;
2586
+ "ImportType:exit": ImportTypeNode;
2587
+ "IndexedAccessType:exit": IndexedAccessTypeNode;
2588
+ "IndexSignature:exit": IndexSignatureDeclaration;
2589
+ "InferType:exit": InferTypeNode;
2590
+ "InterfaceDeclaration:exit": InterfaceDeclaration;
2591
+ "IntersectionType:exit": IntersectionTypeNode;
2592
+ "IntrinsicKeyword:exit": IntrinsicKeyword;
2593
+ "JSDocAllType:exit": JSDocAllType;
2594
+ "JSDocFunctionType:exit": JSDocFunctionType;
2595
+ "JSDocLink:exit": JSDocLink;
2596
+ "JSDocLinkCode:exit": JSDocLinkCode;
2597
+ "JSDocLinkPlain:exit": JSDocLinkPlain;
2598
+ "JSDocMemberName:exit": JSDocMemberName;
2599
+ "JSDocNamepathType:exit": JSDocNamepathType;
2600
+ "JSDocNonNullableType:exit": JSDocNonNullableType;
2601
+ "JSDocNullableType:exit": JSDocNullableType;
2602
+ "JSDocOptionalType:exit": JSDocOptionalType;
2603
+ "JSDocParameterTag:exit": JSDocParameterTag;
2604
+ "JSDocPropertyTag:exit": JSDocPropertyTag;
2605
+ "JSDocReturnTag:exit": JSDocReturnTag;
2606
+ "JSDocSignature:exit": JSDocSignature;
2607
+ "JSDocTemplateTag:exit": JSDocTemplateTag;
2608
+ "JSDocText:exit": JSDocText;
2609
+ "JSDocTypeExpression:exit": JSDocTypeExpression;
2610
+ "JSDocTypeLiteral:exit": JSDocTypeLiteral;
2611
+ "JSDocUnknownType:exit": JSDocUnknownType;
2612
+ "JSDocVariadicType:exit": JSDocVariadicType;
2613
+ "JsxAttribute:exit": JsxAttribute;
2614
+ "JsxAttributes:exit": JsxAttributes;
2615
+ "JsxClosingElement:exit": JsxClosingElement;
2616
+ "JsxClosingFragment:exit": JsxClosingFragment;
2617
+ "JsxElement:exit": JsxElement;
2618
+ "JsxExpression:exit": JsxExpression;
2619
+ "JsxFragment:exit": JsxFragment;
2620
+ "JsxNamespacedName:exit": JsxNamespacedName;
2621
+ "JsxOpeningElement:exit": JsxOpeningElement;
2622
+ "JsxOpeningFragment:exit": JsxOpeningFragment;
2623
+ "JsxSelfClosingElement:exit": JsxSelfClosingElement;
2624
+ "JsxSpreadAttribute:exit": JsxSpreadAttribute;
2625
+ "JsxText:exit": JsxText;
2626
+ "LabeledStatement:exit": LabeledStatement;
2627
+ "LiteralType:exit": LiteralTypeNode;
2628
+ "MappedType:exit": MappedTypeNode;
2629
+ "MetaProperty:exit": MetaProperty;
2630
+ "MethodDeclaration:exit": MethodDeclaration;
2631
+ "MethodSignature:exit": MethodSignature;
2632
+ "MissingDeclaration:exit": MissingDeclaration;
2633
+ "ModuleBlock:exit": ModuleBlock;
2634
+ "ModuleDeclaration:exit": ModuleDeclaration;
2635
+ "NamedExports:exit": NamedExports;
2636
+ "NamedImports:exit": NamedImports;
2637
+ "NamedTupleMember:exit": NamedTupleMember;
2638
+ "NamespaceExport:exit": NamespaceExport;
2639
+ "NamespaceExportDeclaration:exit": NamespaceExportDeclaration;
2640
+ "NamespaceImport:exit": NamespaceImport;
2641
+ "NeverKeyword:exit": NeverKeyword;
2642
+ "NewExpression:exit": NewExpression;
2643
+ "NonNullExpression:exit": NonNullExpression;
2644
+ "NoSubstitutionTemplateLiteral:exit": NoSubstitutionTemplateLiteral;
2645
+ "NotEmittedStatement:exit": NotEmittedStatement;
2646
+ "NotEmittedTypeElement:exit": NotEmittedTypeElement;
2647
+ "NullKeyword:exit": NullLiteral;
2648
+ "NumberKeyword:exit": NumberKeyword;
2649
+ "NumericLiteral:exit": NumericLiteral;
2650
+ "ObjectBindingPattern:exit": ObjectBindingPattern;
2651
+ "ObjectKeyword:exit": ObjectKeyword;
2652
+ "ObjectLiteralExpression:exit": ObjectLiteralExpression;
2653
+ "OmittedExpression:exit": OmittedExpression;
2654
+ "OptionalType:exit": OptionalTypeNode;
2655
+ "Parameter:exit": ParameterDeclaration;
2656
+ "ParenthesizedExpression:exit": ParenthesizedExpression;
2657
+ "ParenthesizedType:exit": ParenthesizedTypeNode;
2658
+ "PartiallyEmittedExpression:exit": PartiallyEmittedExpression;
2659
+ "PostfixUnaryExpression:exit": PostfixUnaryExpression;
2660
+ "PrefixUnaryExpression:exit": PrefixUnaryExpression;
2661
+ "PrivateIdentifier:exit": PrivateIdentifier;
2662
+ "PropertyAccessExpression:exit": PropertyAccessExpression;
2663
+ "PropertyAssignment:exit": PropertyAssignment;
2664
+ "PropertyDeclaration:exit": PropertyDeclaration;
2665
+ "PropertySignature:exit": PropertySignature;
2666
+ "QualifiedName:exit": QualifiedName;
2667
+ "RegularExpressionLiteral:exit": RegularExpressionLiteral;
2668
+ "RestType:exit": RestTypeNode;
2669
+ "ReturnStatement:exit": ReturnStatement;
2670
+ "SatisfiesExpression:exit": SatisfiesExpression;
2671
+ "SemicolonClassElement:exit": SemicolonClassElement;
2672
+ "SetAccessor:exit": SetAccessorDeclaration;
2673
+ "ShorthandPropertyAssignment:exit": ShorthandPropertyAssignment;
2674
+ "SourceFile:exit": SourceFile;
2675
+ "SpreadAssignment:exit": SpreadAssignment;
2676
+ "SpreadElement:exit": SpreadElement;
2677
+ "StringKeyword:exit": StringKeyword;
2678
+ "StringLiteral:exit": StringLiteral;
2679
+ "SuperKeyword:exit": SuperExpression;
2680
+ "SwitchStatement:exit": SwitchStatement;
2681
+ "SymbolKeyword:exit": SymbolKeyword;
2682
+ "SyntheticExpression:exit": SyntheticExpression;
2683
+ "TaggedTemplateExpression:exit": TaggedTemplateExpression;
2684
+ "TemplateExpression:exit": TemplateExpression;
2685
+ "TemplateHead:exit": TemplateHead;
2686
+ "TemplateLiteralType:exit": TemplateLiteralTypeNode;
2687
+ "TemplateLiteralTypeSpan:exit": TemplateLiteralTypeSpan;
2688
+ "TemplateMiddle:exit": TemplateMiddle;
2689
+ "TemplateSpan:exit": TemplateSpan;
2690
+ "TemplateTail:exit": TemplateTail;
2691
+ "ThisKeyword:exit": ThisExpression;
2692
+ "ThisType:exit": ThisTypeNode;
2693
+ "ThrowStatement:exit": ThrowStatement;
2694
+ "TrueKeyword:exit": TrueLiteral;
2695
+ "TryStatement:exit": TryStatement;
2696
+ "TupleType:exit": TupleTypeNode;
2697
+ "TypeAliasDeclaration:exit": TypeAliasDeclaration;
2698
+ "TypeAssertionExpression:exit": TypeAssertion;
2699
+ "TypeLiteral:exit": TypeLiteralNode;
2700
+ "TypeOfExpression:exit": TypeOfExpression;
2701
+ "TypeOperator:exit": TypeOperatorNode;
2702
+ "TypeParameter:exit": TypeParameterDeclaration;
2703
+ "TypePredicate:exit": TypePredicateNode;
2704
+ "TypeQuery:exit": TypeQueryNode;
2705
+ "TypeReference:exit": TypeReferenceNode;
2706
+ "UndefinedKeyword:exit": UndefinedKeyword;
2707
+ "UnionType:exit": UnionTypeNode;
2708
+ "UnknownKeyword:exit": UnknownKeyword;
2709
+ "VariableDeclaration:exit": VariableDeclaration;
2710
+ "VariableDeclarationList:exit": VariableDeclarationList;
2711
+ "VariableStatement:exit": VariableStatement;
2712
+ "VoidExpression:exit": VoidExpression;
2713
+ "VoidKeyword:exit": VoidKeyword;
2714
+ "WhileStatement:exit": WhileStatement;
2715
+ "WithStatement:exit": WithStatement;
2716
+ "YieldExpression:exit": YieldExpression;
2717
+ }, TypeScriptFileServices>;
2718
+ declare function throwUnknownLanguageExtension(filename: string): never;
2719
+ //#endregion
2720
+ //#region src/scope/types.d.ts
2721
+ type FunctionWithParameters = ArrowFunction | ConstructorDeclaration | FunctionDeclaration | FunctionExpression | GetAccessorDeclaration | MethodDeclaration | SetAccessorDeclaration;
2722
+ interface Scope {
2723
+ block: AnyNode;
2724
+ childScopes: Scope[];
2725
+ references: ScopeReference[];
2726
+ upper: Scope | undefined;
2727
+ variables: ScopeVariable[];
2728
+ }
2729
+ interface ScopeDefinition {
2730
+ identifier: Identifier;
2731
+ kind: ScopeDefinitionKind;
2732
+ node: AnyNode;
2733
+ }
2734
+ type ScopeDefinitionKind = "catch" | "class" | "function" | "import" | "parameter" | "variable";
2735
+ interface ScopeManager {
2736
+ findVariable(identifier: Identifier): ScopeVariable | undefined;
2737
+ getDeclaredVariables(node: AnyNode): ScopeVariable[];
2738
+ getReferencesInScope(node: AnyNode): ScopeReference[];
2739
+ getScope(node: AnyNode): Scope;
2740
+ globalScope: Scope;
2741
+ }
2742
+ interface ScopeReference {
2743
+ from: Scope;
2744
+ identifier: Identifier;
2745
+ isWrite: boolean;
2746
+ text: string;
2747
+ variable: ScopeVariable | undefined;
2748
+ }
2749
+ interface ScopeVariable {
2750
+ declarations: Identifier[];
2751
+ definitions: ScopeDefinition[];
2752
+ name: string;
2753
+ references: ScopeReference[];
2754
+ scope: Scope;
2755
+ }
2756
+ //#endregion
2757
+ //#region src/scope/scopeManager.d.ts
2758
+ declare function getScopeManager(sourceFile: SourceFile): ScopeManager;
2759
+ //#endregion
2760
+ //#region src/utils/createRuleTesterTSConfig.d.ts
2761
+ declare function createRuleTesterTSConfig(defaultCompilerOptions?: Record<string, unknown>): {
2762
+ "tsconfig.base.json": string;
2763
+ "tsconfig.json": string;
2764
+ };
2765
+ //#endregion
2766
+ //#region src/utils/declarationIncludesGlobal.d.ts
2767
+ declare function declarationIncludesGlobal(declaration: Declaration, program: Program): boolean;
2768
+ //#endregion
2769
+ //#region src/utils/forEachChild.d.ts
2770
+ declare const forEachChild: <T>(node: AnyNode, cbNode: (node: AnyNode) => T | undefined, cbNodes?: (nodes: ts.NodeArray<AnyNode>) => T | undefined) => T | undefined;
2771
+ //#endregion
2772
+ //#region src/utils/getDeclarationsIfGlobal.d.ts
2773
+ declare function getDeclarationsIfGlobal(node: Expression, typeChecker: Checker, program: Program): import("typescript").Declaration[] | undefined;
2774
+ //#endregion
2775
+ //#region src/utils/getModifyingReferences.d.ts
2776
+ /**
2777
+ * Gets all references to a variable that modify it (assignments, increments, decrements).
2778
+ * @returns An array of identifier nodes that modify the variable.
2779
+ */
2780
+ declare function getModifyingReferences(identifier: Identifier, sourceFile: SourceFile): Identifier[];
2781
+ //#endregion
2782
+ //#region src/utils/getStaticValue.d.ts
2783
+ interface StaticValue {
2784
+ value: unknown;
2785
+ }
2786
+ declare function getStaticNumberValue(node: Expression): number | undefined;
2787
+ declare function getStaticStringValue(node: Expression): string | undefined;
2788
+ declare function getStaticValue(node: Expression): StaticValue | undefined;
2789
+ //#endregion
2790
+ //#region src/utils/hasSameTokens.d.ts
2791
+ declare function hasSameTokens(nodeA: AnyNode, nodeB: AnyNode, sourceFile: SourceFile): boolean;
2792
+ //#endregion
2793
+ //#region src/utils/isBuiltinArrayMethod.d.ts
2794
+ type BuiltInArrayMethodNode = CallExpression & {
2795
+ expression: PropertyAccessExpression & {
2796
+ expression: ts.Expression;
2797
+ };
2798
+ };
2799
+ declare function isBuiltinArrayMethod(name: string, node: CallExpression, typeChecker: Checker): node is BuiltInArrayMethodNode;
2800
+ //#endregion
2801
+ //#region src/utils/isFunction.d.ts
2802
+ declare function isFunction(node: Expression, typeChecker: Checker): boolean;
2803
+ //#endregion
2804
+ //#region src/utils/isGlobalDeclaration.d.ts
2805
+ declare function isGlobalDeclaration(node: Expression, typeChecker: Checker, program: Program): boolean;
2806
+ //#endregion
2807
+ //#region src/utils/isGlobalDeclarationOfName.d.ts
2808
+ /**
2809
+ * TODO: Use a scope analyzer (#400).
2810
+ */
2811
+ declare function isGlobalDeclarationOfName(node: Node, name: string, typeChecker: Checker, program: Program): boolean;
2812
+ //#endregion
2813
+ //#region src/utils/isGlobalVariable.d.ts
2814
+ /**
2815
+ * Checks if a node is a reference to a global variable (e.g., Object, undefined, NaN).
2816
+ * Global variables are those declared in TypeScript's lib files or are global identifiers
2817
+ * like undefined which have symbols but no user-defined declarations.
2818
+ * TODO: Use a scope manager (#400).
2819
+ */
2820
+ declare function isGlobalVariable(node: Expression, typeChecker: Checker, program: Program): boolean;
2821
+ //#endregion
2822
+ //#region src/utils/isInlineArrayCreation.d.ts
2823
+ /**
2824
+ * Checks if a node represents an inline array creation expression.
2825
+ * These are cases where a new array is created immediately before the method call,
2826
+ * so mutating methods like .sort() or .reverse() are safe to use.
2827
+ */
2828
+ declare function isInlineArrayCreation(node: ts.Expression): boolean;
2829
+ //#endregion
2830
+ //#region src/utils/isStaticString.d.ts
2831
+ declare function isStaticString(node: Expression): node is NoSubstitutionTemplateLiteral | StringLiteral;
2832
+ //#endregion
2833
+ //#region src/utils/isStringRawNoSubstitution.d.ts
2834
+ declare function isStringRawNoSubstitution(node: Expression): node is TaggedTemplateExpression & {
2835
+ template: NoSubstitutionTemplateLiteral;
2836
+ };
2837
+ //#endregion
2838
+ //#region src/utils/unwrapParenthesizedNode.d.ts
2839
+ declare function unwrapParenthesizedNode(node: AnyNode): AnyNode;
2840
+ //#endregion
2841
+ //#region src/utils/unwrapParentParenthesizedExpressions.d.ts
2842
+ declare function unwrapParentParenthesizedExpressions(node: BinaryExpression | ParenthesizedExpression): LeftHandSideExpressionParent;
2843
+ //#endregion
2844
+ export { type ast_d_exports as AST, type BuiltInArrayMethodNode, type Checker, type ExtractedDirective, type FunctionWithParameters, NodeSyntaxKinds, type Scope, type ScopeDefinition, type ScopeDefinitionKind, type ScopeManager, type ScopeReference, type ScopeVariable, type StaticValue, type TSDiagnostic, type TypeScriptFileServices, type TypeScriptNodeVisitors, type TypeScriptNodesByName, convertTypeScriptDiagnosticToLanguageReport, createRuleTesterTSConfig, declarationIncludesGlobal, extractDirectivesFromTypeScriptFile, forEachChild, getDeclarationsIfGlobal, getModifyingReferences, getScopeManager, getStaticNumberValue, getStaticStringValue, getStaticValue, getTSNodeRange, hasSameTokens, isBuiltinArrayMethod, isFunction, isGlobalDeclaration, isGlobalDeclarationOfName, isGlobalVariable, isInlineArrayCreation, isStaticString, isStringRawNoSubstitution, setVolarCreateFile, throwUnknownLanguageExtension, typescriptLanguage, unwrapParentParenthesizedExpressions, unwrapParenthesizedNode };