@flint.fyi/typescript-language 0.18.2 → 0.18.4

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/collectReferencedFilePaths.d.ts +0 -1
  2. package/lib/collectReferencedFilePaths.js +1 -3
  3. package/lib/convertTypeScriptDiagnosticToLanguageReport.d.ts +2 -3
  4. package/lib/convertTypeScriptDiagnosticToLanguageReport.js +3 -4
  5. package/lib/createTypeScriptServerHost.d.ts +1 -2
  6. package/lib/createTypeScriptServerHost.js +1 -3
  7. package/lib/directives/parseDirectivesFromTypeScriptFile.d.ts +1 -2
  8. package/lib/directives/parseDirectivesFromTypeScriptFile.js +2 -4
  9. package/lib/getFirstEnumValues.d.ts +0 -1
  10. package/lib/getFirstEnumValues.js +0 -2
  11. package/lib/getTSNodeRange.d.ts +2 -3
  12. package/lib/getTSNodeRange.js +0 -2
  13. package/lib/getTypeScriptFileCacheImpacts.d.ts +0 -1
  14. package/lib/getTypeScriptFileCacheImpacts.js +5 -3
  15. package/lib/index.d.ts +8 -3
  16. package/lib/index.js +5 -1
  17. package/lib/language.d.ts +393 -201
  18. package/lib/language.js +2 -4
  19. package/lib/nodes.d.ts +1 -2
  20. package/lib/normalizeRange.d.ts +0 -1
  21. package/lib/normalizeRange.js +0 -2
  22. package/lib/orderTypeScriptFilePaths.d.ts +0 -1
  23. package/lib/orderTypeScriptFilePaths.js +0 -2
  24. package/lib/package.js +1 -3
  25. package/lib/scope/identifierReferences.d.ts +3 -0
  26. package/lib/scope/identifierReferences.js +89 -0
  27. package/lib/scope/scopeManager.d.ts +14 -0
  28. package/lib/scope/scopeManager.js +153 -0
  29. package/lib/scope/scopes.d.ts +7 -0
  30. package/lib/scope/scopes.js +64 -0
  31. package/lib/scope/types.d.ts +45 -0
  32. package/lib/types/ast.d.ts +2 -2
  33. package/lib/types/checker.d.ts +1 -2
  34. package/lib/utils/containsGlobalDeclarations.d.ts +6 -0
  35. package/lib/utils/containsGlobalDeclarations.js +17 -0
  36. package/lib/utils/createRuleTesterTSConfig.d.ts +1 -2
  37. package/lib/utils/createRuleTesterTSConfig.js +0 -2
  38. package/lib/utils/declarationIncludesGlobal.d.ts +1 -2
  39. package/lib/utils/declarationIncludesGlobal.js +0 -2
  40. package/lib/utils/declarationsIncludeGlobal.d.ts +0 -1
  41. package/lib/utils/declarationsIncludeGlobal.js +0 -2
  42. package/lib/utils/forEachChild.d.ts +7 -0
  43. package/lib/utils/forEachChild.js +5 -0
  44. package/lib/utils/getDeclarationsIfGlobal.d.ts +2 -5
  45. package/lib/utils/getDeclarationsIfGlobal.js +0 -2
  46. package/lib/utils/getModifyingReferences.d.ts +2 -7
  47. package/lib/utils/getModifyingReferences.js +5 -27
  48. package/lib/utils/hasSameTokens.d.ts +1 -2
  49. package/lib/utils/hasSameTokens.js +0 -2
  50. package/lib/utils/isBuiltinArrayMethod.d.ts +1 -2
  51. package/lib/utils/isBuiltinArrayMethod.js +0 -2
  52. package/lib/utils/isFunction.d.ts +1 -2
  53. package/lib/utils/isFunction.js +0 -2
  54. package/lib/utils/isGlobalDeclaration.d.ts +1 -2
  55. package/lib/utils/isGlobalDeclaration.js +0 -2
  56. package/lib/utils/isGlobalDeclarationOfName.d.ts +1 -2
  57. package/lib/utils/isGlobalDeclarationOfName.js +0 -2
  58. package/lib/utils/isGlobalVariable.d.ts +1 -2
  59. package/lib/utils/isGlobalVariable.js +0 -2
  60. package/lib/utils/isInlineArrayCreation.d.ts +1 -2
  61. package/lib/utils/isInlineArrayCreation.js +0 -2
  62. package/lib/utils/isStaticString.d.ts +5 -0
  63. package/lib/utils/isStaticString.js +7 -0
  64. package/lib/utils/isStringRawNoSubstitution.d.ts +7 -0
  65. package/lib/utils/isStringRawNoSubstitution.js +9 -0
  66. package/lib/utils/unwrapParentParenthesizedExpressions.d.ts +1 -2
  67. package/lib/utils/unwrapParentParenthesizedExpressions.js +0 -2
  68. package/lib/utils/unwrapParenthesizedNode.d.ts +1 -2
  69. package/lib/utils/unwrapParenthesizedNode.js +0 -2
  70. package/package.json +5 -6
package/lib/language.d.ts CHANGED
@@ -1,9 +1,8 @@
1
1
  import { 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, 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, 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 } from "./types/ast.js";
2
- import { TypeScriptNodeVisitors, TypeScriptNodesByName } from "./nodes.js";
2
+ import { TypeScriptNodeVisitors } from "./nodes.js";
3
3
  import { Checker } from "./types/checker.js";
4
- import * as _flint_fyi_core0 from "@flint.fyi/core";
5
- import { AnyOptionalSchema, FileAboutData, InferredOutputObject, LanguageFile, LanguageFileDefinition, LanguageReports, RuleRuntime } from "@flint.fyi/core";
6
4
  import * as ts$1 from "typescript";
5
+ import { AnyOptionalSchema, FileAboutData, InferredOutputObject, LanguageFile, LanguageFileDefinition, LanguageReports, RuleRuntime } from "@flint.fyi/core";
7
6
 
8
7
  //#region src/language.d.ts
9
8
  interface TypeScriptFileServices {
@@ -20,203 +19,396 @@ type VolarLanguageFileDefinition = LanguageFileDefinition<object> & {
20
19
  };
21
20
  };
22
21
  declare function setVolarCreateFile(create: VolarCreateFile): void;
23
- declare const typescriptLanguage: _flint_fyi_core0.Language<_flint_fyi_core0.Simplify<TypeScriptNodesByName & {
24
- "AnyKeyword:exit"?: AnyKeyword;
25
- "ArrayBindingPattern:exit"?: ArrayBindingPattern;
26
- "ArrayLiteralExpression:exit"?: ArrayLiteralExpression;
27
- "ArrayType:exit"?: ArrayTypeNode;
28
- "ArrowFunction:exit"?: ArrowFunction;
29
- "AsExpression:exit"?: AsExpression;
30
- "AwaitExpression:exit"?: AwaitExpression;
31
- "BigIntKeyword:exit"?: BigIntKeyword;
32
- "BigIntLiteral:exit"?: BigIntLiteral;
33
- "BinaryExpression:exit"?: BinaryExpression;
34
- "BindingElement:exit"?: BindingElement;
35
- "Block:exit"?: Block;
36
- "BooleanKeyword:exit"?: BooleanKeyword;
37
- "BreakStatement:exit"?: BreakStatement;
38
- "CallExpression:exit"?: CallExpression;
39
- "CallSignature:exit"?: CallSignatureDeclaration;
40
- "CaseBlock:exit"?: CaseBlock;
41
- "CaseClause:exit"?: CaseClause;
42
- "CatchClause:exit"?: CatchClause;
43
- "ClassDeclaration:exit"?: ClassDeclaration;
44
- "ClassExpression:exit"?: ClassExpression;
45
- "ClassStaticBlockDeclaration:exit"?: ClassStaticBlockDeclaration;
46
- "CommaListExpression:exit"?: CommaListExpression;
47
- "ComputedPropertyName:exit"?: ComputedPropertyName;
48
- "ConditionalExpression:exit"?: ConditionalExpression;
49
- "ConditionalType:exit"?: ConditionalTypeNode;
50
- "Constructor:exit"?: ConstructorDeclaration;
51
- "ConstructorType:exit"?: ConstructorTypeNode;
52
- "ConstructSignature:exit"?: ConstructSignatureDeclaration;
53
- "ContinueStatement:exit"?: ContinueStatement;
54
- "DebuggerStatement:exit"?: DebuggerStatement;
55
- "Decorator:exit"?: Decorator;
56
- "DefaultClause:exit"?: DefaultClause;
57
- "DeleteExpression:exit"?: DeleteExpression;
58
- "DoStatement:exit"?: DoStatement;
59
- "ElementAccessExpression:exit"?: ElementAccessExpression;
60
- "EmptyStatement:exit"?: EmptyStatement;
61
- "EnumDeclaration:exit"?: EnumDeclaration;
62
- "EnumMember:exit"?: EnumMember;
63
- "ExportAssignment:exit"?: ExportAssignment;
64
- "ExportDeclaration:exit"?: ExportDeclaration;
65
- "ExportSpecifier:exit"?: ExportSpecifier;
66
- "ExpressionStatement:exit"?: ExpressionStatement;
67
- "ExpressionWithTypeArguments:exit"?: ExpressionWithTypeArguments;
68
- "ExternalModuleReference:exit"?: ExternalModuleReference;
69
- "FalseKeyword:exit"?: FalseLiteral;
70
- "ForInStatement:exit"?: ForInStatement;
71
- "ForOfStatement:exit"?: ForOfStatement;
72
- "ForStatement:exit"?: ForStatement;
73
- "FunctionDeclaration:exit"?: FunctionDeclaration;
74
- "FunctionExpression:exit"?: FunctionExpression;
75
- "FunctionType:exit"?: FunctionTypeNode;
76
- "GetAccessor:exit"?: GetAccessorDeclaration;
77
- "HeritageClause:exit"?: HeritageClause;
78
- "Identifier:exit"?: Identifier;
79
- "IfStatement:exit"?: IfStatement;
80
- "ImportAttribute:exit"?: ImportAttribute;
81
- "ImportAttributes:exit"?: ImportAttributes;
82
- "ImportClause:exit"?: ImportClause;
83
- "ImportDeclaration:exit"?: ImportDeclaration;
84
- "ImportEqualsDeclaration:exit"?: ImportEqualsDeclaration;
85
- "ImportKeyword:exit"?: ImportExpression;
86
- "ImportSpecifier:exit"?: ImportSpecifier;
87
- "ImportType:exit"?: ImportTypeNode;
88
- "IndexedAccessType:exit"?: IndexedAccessTypeNode;
89
- "IndexSignature:exit"?: IndexSignatureDeclaration;
90
- "InferType:exit"?: InferTypeNode;
91
- "InterfaceDeclaration:exit"?: InterfaceDeclaration;
92
- "IntersectionType:exit"?: IntersectionTypeNode;
93
- "IntrinsicKeyword:exit"?: IntrinsicKeyword;
94
- "JSDocAllType:exit"?: JSDocAllType;
95
- "JSDocFunctionType:exit"?: JSDocFunctionType;
96
- "JSDocLink:exit"?: JSDocLink;
97
- "JSDocLinkCode:exit"?: JSDocLinkCode;
98
- "JSDocLinkPlain:exit"?: JSDocLinkPlain;
99
- "JSDocMemberName:exit"?: JSDocMemberName;
100
- "JSDocNamepathType:exit"?: JSDocNamepathType;
101
- "JSDocNonNullableType:exit"?: JSDocNonNullableType;
102
- "JSDocNullableType:exit"?: JSDocNullableType;
103
- "JSDocOptionalType:exit"?: JSDocOptionalType;
104
- "JSDocParameterTag:exit"?: JSDocParameterTag;
105
- "JSDocPropertyTag:exit"?: JSDocPropertyTag;
106
- "JSDocReturnTag:exit"?: JSDocReturnTag;
107
- "JSDocSignature:exit"?: JSDocSignature;
108
- "JSDocTemplateTag:exit"?: JSDocTemplateTag;
109
- "JSDocText:exit"?: JSDocText;
110
- "JSDocTypeExpression:exit"?: JSDocTypeExpression;
111
- "JSDocTypeLiteral:exit"?: JSDocTypeLiteral;
112
- "JSDocUnknownType:exit"?: JSDocUnknownType;
113
- "JSDocVariadicType:exit"?: JSDocVariadicType;
114
- "JsxAttribute:exit"?: JsxAttribute;
115
- "JsxAttributes:exit"?: JsxAttributes;
116
- "JsxClosingElement:exit"?: JsxClosingElement;
117
- "JsxClosingFragment:exit"?: JsxClosingFragment;
118
- "JsxElement:exit"?: JsxElement;
119
- "JsxExpression:exit"?: JsxExpression;
120
- "JsxFragment:exit"?: JsxFragment;
121
- "JsxNamespacedName:exit"?: JsxNamespacedName;
122
- "JsxOpeningElement:exit"?: JsxOpeningElement;
123
- "JsxOpeningFragment:exit"?: JsxOpeningFragment;
124
- "JsxSelfClosingElement:exit"?: JsxSelfClosingElement;
125
- "JsxSpreadAttribute:exit"?: JsxSpreadAttribute;
126
- "JsxText:exit"?: JsxText;
127
- "LabeledStatement:exit"?: LabeledStatement;
128
- "LiteralType:exit"?: LiteralTypeNode;
129
- "MappedType:exit"?: MappedTypeNode;
130
- "MetaProperty:exit"?: MetaProperty;
131
- "MethodDeclaration:exit"?: MethodDeclaration;
132
- "MethodSignature:exit"?: MethodSignature;
133
- "MissingDeclaration:exit"?: MissingDeclaration;
134
- "ModuleBlock:exit"?: ModuleBlock;
135
- "ModuleDeclaration:exit"?: ModuleDeclaration;
136
- "NamedExports:exit"?: NamedExports;
137
- "NamedImports:exit"?: NamedImports;
138
- "NamedTupleMember:exit"?: NamedTupleMember;
139
- "NamespaceExport:exit"?: NamespaceExport;
140
- "NamespaceExportDeclaration:exit"?: NamespaceExportDeclaration;
141
- "NamespaceImport:exit"?: NamespaceImport;
142
- "NeverKeyword:exit"?: NeverKeyword;
143
- "NewExpression:exit"?: NewExpression;
144
- "NonNullExpression:exit"?: NonNullExpression;
145
- "NoSubstitutionTemplateLiteral:exit"?: NoSubstitutionTemplateLiteral;
146
- "NotEmittedStatement:exit"?: NotEmittedStatement;
147
- "NotEmittedTypeElement:exit"?: NotEmittedTypeElement;
148
- "NullKeyword:exit"?: NullLiteral;
149
- "NumberKeyword:exit"?: NumberKeyword;
150
- "NumericLiteral:exit"?: NumericLiteral;
151
- "ObjectBindingPattern:exit"?: ObjectBindingPattern;
152
- "ObjectKeyword:exit"?: ObjectKeyword;
153
- "ObjectLiteralExpression:exit"?: ObjectLiteralExpression;
154
- "OmittedExpression:exit"?: OmittedExpression;
155
- "OptionalType:exit"?: OptionalTypeNode;
156
- "Parameter:exit"?: ParameterDeclaration;
157
- "ParenthesizedExpression:exit"?: ParenthesizedExpression;
158
- "ParenthesizedType:exit"?: ParenthesizedTypeNode;
159
- "PartiallyEmittedExpression:exit"?: PartiallyEmittedExpression;
160
- "PostfixUnaryExpression:exit"?: PostfixUnaryExpression;
161
- "PrefixUnaryExpression:exit"?: PrefixUnaryExpression;
162
- "PrivateIdentifier:exit"?: PrivateIdentifier;
163
- "PropertyAccessExpression:exit"?: PropertyAccessExpression;
164
- "PropertyAssignment:exit"?: PropertyAssignment;
165
- "PropertyDeclaration:exit"?: PropertyDeclaration;
166
- "PropertySignature:exit"?: PropertySignature;
167
- "QualifiedName:exit"?: QualifiedName;
168
- "RegularExpressionLiteral:exit"?: RegularExpressionLiteral;
169
- "RestType:exit"?: RestTypeNode;
170
- "ReturnStatement:exit"?: ReturnStatement;
171
- "SatisfiesExpression:exit"?: SatisfiesExpression;
172
- "SemicolonClassElement:exit"?: SemicolonClassElement;
173
- "SetAccessor:exit"?: SetAccessorDeclaration;
174
- "ShorthandPropertyAssignment:exit"?: ShorthandPropertyAssignment;
175
- "SourceFile:exit"?: SourceFile;
176
- "SpreadAssignment:exit"?: SpreadAssignment;
177
- "SpreadElement:exit"?: SpreadElement;
178
- "StringKeyword:exit"?: StringKeyword;
179
- "StringLiteral:exit"?: StringLiteral;
180
- "SuperKeyword:exit"?: SuperExpression;
181
- "SwitchStatement:exit"?: SwitchStatement;
182
- "SymbolKeyword:exit"?: SymbolKeyword;
183
- "SyntheticExpression:exit"?: SyntheticExpression;
184
- "TaggedTemplateExpression:exit"?: TaggedTemplateExpression;
185
- "TemplateExpression:exit"?: TemplateExpression;
186
- "TemplateHead:exit"?: TemplateHead;
187
- "TemplateLiteralType:exit"?: TemplateLiteralTypeNode;
188
- "TemplateLiteralTypeSpan:exit"?: TemplateLiteralTypeSpan;
189
- "TemplateMiddle:exit"?: TemplateMiddle;
190
- "TemplateSpan:exit"?: TemplateSpan;
191
- "TemplateTail:exit"?: TemplateTail;
192
- "ThisKeyword:exit"?: ThisExpression;
193
- "ThisType:exit"?: ThisTypeNode;
194
- "ThrowStatement:exit"?: ThrowStatement;
195
- "TrueKeyword:exit"?: TrueLiteral;
196
- "TryStatement:exit"?: TryStatement;
197
- "TupleType:exit"?: TupleTypeNode;
198
- "TypeAliasDeclaration:exit"?: TypeAliasDeclaration;
199
- "TypeAssertionExpression:exit"?: TypeAssertion;
200
- "TypeLiteral:exit"?: TypeLiteralNode;
201
- "TypeOfExpression:exit"?: TypeOfExpression;
202
- "TypeOperator:exit"?: TypeOperatorNode;
203
- "TypeParameter:exit"?: TypeParameterDeclaration;
204
- "TypePredicate:exit"?: TypePredicateNode;
205
- "TypeQuery:exit"?: TypeQueryNode;
206
- "TypeReference:exit"?: TypeReferenceNode;
207
- "UndefinedKeyword:exit"?: UndefinedKeyword;
208
- "UnionType:exit"?: UnionTypeNode;
209
- "UnknownKeyword:exit"?: UnknownKeyword;
210
- "VariableDeclaration:exit"?: VariableDeclaration;
211
- "VariableDeclarationList:exit"?: VariableDeclarationList;
212
- "VariableStatement:exit"?: VariableStatement;
213
- "VoidExpression:exit"?: VoidExpression;
214
- "VoidKeyword:exit"?: VoidKeyword;
215
- "WhileStatement:exit"?: WhileStatement;
216
- "WithStatement:exit"?: WithStatement;
217
- "YieldExpression:exit"?: YieldExpression;
218
- }>, TypeScriptFileServices>;
22
+ declare const typescriptLanguage: import("@flint.fyi/core").Language<{
23
+ AnyKeyword: AnyKeyword;
24
+ ArrayBindingPattern: ArrayBindingPattern;
25
+ ArrayLiteralExpression: ArrayLiteralExpression;
26
+ ArrayType: ArrayTypeNode;
27
+ ArrowFunction: ArrowFunction;
28
+ AsExpression: AsExpression;
29
+ AwaitExpression: AwaitExpression;
30
+ BigIntKeyword: BigIntKeyword;
31
+ BigIntLiteral: BigIntLiteral;
32
+ BinaryExpression: BinaryExpression;
33
+ BindingElement: BindingElement;
34
+ Block: Block;
35
+ BooleanKeyword: BooleanKeyword;
36
+ BreakStatement: BreakStatement;
37
+ CallExpression: CallExpression;
38
+ CallSignature: CallSignatureDeclaration;
39
+ CaseBlock: CaseBlock;
40
+ CaseClause: CaseClause;
41
+ CatchClause: CatchClause;
42
+ ClassDeclaration: ClassDeclaration;
43
+ ClassExpression: ClassExpression;
44
+ ClassStaticBlockDeclaration: ClassStaticBlockDeclaration;
45
+ CommaListExpression: CommaListExpression;
46
+ ComputedPropertyName: ComputedPropertyName;
47
+ ConditionalExpression: ConditionalExpression;
48
+ ConditionalType: ConditionalTypeNode;
49
+ Constructor: ConstructorDeclaration;
50
+ ConstructorType: ConstructorTypeNode;
51
+ ConstructSignature: ConstructSignatureDeclaration;
52
+ ContinueStatement: ContinueStatement;
53
+ DebuggerStatement: DebuggerStatement;
54
+ Decorator: Decorator;
55
+ DefaultClause: DefaultClause;
56
+ DeleteExpression: DeleteExpression;
57
+ DoStatement: DoStatement;
58
+ ElementAccessExpression: ElementAccessExpression;
59
+ EmptyStatement: EmptyStatement;
60
+ EnumDeclaration: EnumDeclaration;
61
+ EnumMember: EnumMember;
62
+ ExportAssignment: ExportAssignment;
63
+ ExportDeclaration: ExportDeclaration;
64
+ ExportSpecifier: ExportSpecifier;
65
+ ExpressionStatement: ExpressionStatement;
66
+ ExpressionWithTypeArguments: ExpressionWithTypeArguments;
67
+ ExternalModuleReference: ExternalModuleReference;
68
+ FalseKeyword: FalseLiteral;
69
+ ForInStatement: ForInStatement;
70
+ ForOfStatement: ForOfStatement;
71
+ ForStatement: ForStatement;
72
+ FunctionDeclaration: FunctionDeclaration;
73
+ FunctionExpression: FunctionExpression;
74
+ FunctionType: FunctionTypeNode;
75
+ GetAccessor: GetAccessorDeclaration;
76
+ HeritageClause: HeritageClause;
77
+ Identifier: Identifier;
78
+ IfStatement: IfStatement;
79
+ ImportAttribute: ImportAttribute;
80
+ ImportAttributes: ImportAttributes;
81
+ ImportClause: ImportClause;
82
+ ImportDeclaration: ImportDeclaration;
83
+ ImportEqualsDeclaration: ImportEqualsDeclaration;
84
+ ImportKeyword: ImportExpression;
85
+ ImportSpecifier: ImportSpecifier;
86
+ ImportType: ImportTypeNode;
87
+ IndexedAccessType: IndexedAccessTypeNode;
88
+ IndexSignature: IndexSignatureDeclaration;
89
+ InferType: InferTypeNode;
90
+ InterfaceDeclaration: InterfaceDeclaration;
91
+ IntersectionType: IntersectionTypeNode;
92
+ IntrinsicKeyword: IntrinsicKeyword;
93
+ JSDocAllType: JSDocAllType;
94
+ JSDocFunctionType: JSDocFunctionType;
95
+ JSDocLink: JSDocLink;
96
+ JSDocLinkCode: JSDocLinkCode;
97
+ JSDocLinkPlain: JSDocLinkPlain;
98
+ JSDocMemberName: JSDocMemberName;
99
+ JSDocNamepathType: JSDocNamepathType;
100
+ JSDocNonNullableType: JSDocNonNullableType;
101
+ JSDocNullableType: JSDocNullableType;
102
+ JSDocOptionalType: JSDocOptionalType;
103
+ JSDocParameterTag: JSDocParameterTag;
104
+ JSDocPropertyTag: JSDocPropertyTag;
105
+ JSDocReturnTag: JSDocReturnTag;
106
+ JSDocSignature: JSDocSignature;
107
+ JSDocTemplateTag: JSDocTemplateTag;
108
+ JSDocText: JSDocText;
109
+ JSDocTypeExpression: JSDocTypeExpression;
110
+ JSDocTypeLiteral: JSDocTypeLiteral;
111
+ JSDocUnknownType: JSDocUnknownType;
112
+ JSDocVariadicType: JSDocVariadicType;
113
+ JsxAttribute: JsxAttribute;
114
+ JsxAttributes: JsxAttributes;
115
+ JsxClosingElement: JsxClosingElement;
116
+ JsxClosingFragment: JsxClosingFragment;
117
+ JsxElement: JsxElement;
118
+ JsxExpression: JsxExpression;
119
+ JsxFragment: JsxFragment;
120
+ JsxNamespacedName: JsxNamespacedName;
121
+ JsxOpeningElement: JsxOpeningElement;
122
+ JsxOpeningFragment: JsxOpeningFragment;
123
+ JsxSelfClosingElement: JsxSelfClosingElement;
124
+ JsxSpreadAttribute: JsxSpreadAttribute;
125
+ JsxText: JsxText;
126
+ LabeledStatement: LabeledStatement;
127
+ LiteralType: LiteralTypeNode;
128
+ MappedType: MappedTypeNode;
129
+ MetaProperty: MetaProperty;
130
+ MethodDeclaration: MethodDeclaration;
131
+ MethodSignature: MethodSignature;
132
+ MissingDeclaration: MissingDeclaration;
133
+ ModuleBlock: ModuleBlock;
134
+ ModuleDeclaration: ModuleDeclaration;
135
+ NamedExports: NamedExports;
136
+ NamedImports: NamedImports;
137
+ NamedTupleMember: NamedTupleMember;
138
+ NamespaceExport: NamespaceExport;
139
+ NamespaceExportDeclaration: NamespaceExportDeclaration;
140
+ NamespaceImport: NamespaceImport;
141
+ NeverKeyword: NeverKeyword;
142
+ NewExpression: NewExpression;
143
+ NonNullExpression: NonNullExpression;
144
+ NoSubstitutionTemplateLiteral: NoSubstitutionTemplateLiteral;
145
+ NotEmittedStatement: NotEmittedStatement;
146
+ NotEmittedTypeElement: NotEmittedTypeElement;
147
+ NullKeyword: NullLiteral;
148
+ NumberKeyword: NumberKeyword;
149
+ NumericLiteral: NumericLiteral;
150
+ ObjectBindingPattern: ObjectBindingPattern;
151
+ ObjectKeyword: ObjectKeyword;
152
+ ObjectLiteralExpression: ObjectLiteralExpression;
153
+ OmittedExpression: OmittedExpression;
154
+ OptionalType: OptionalTypeNode;
155
+ Parameter: ParameterDeclaration;
156
+ ParenthesizedExpression: ParenthesizedExpression;
157
+ ParenthesizedType: ParenthesizedTypeNode;
158
+ PartiallyEmittedExpression: PartiallyEmittedExpression;
159
+ PostfixUnaryExpression: PostfixUnaryExpression;
160
+ PrefixUnaryExpression: PrefixUnaryExpression;
161
+ PrivateIdentifier: PrivateIdentifier;
162
+ PropertyAccessExpression: PropertyAccessExpression;
163
+ PropertyAssignment: PropertyAssignment;
164
+ PropertyDeclaration: PropertyDeclaration;
165
+ PropertySignature: PropertySignature;
166
+ QualifiedName: QualifiedName;
167
+ RegularExpressionLiteral: RegularExpressionLiteral;
168
+ RestType: RestTypeNode;
169
+ ReturnStatement: ReturnStatement;
170
+ SatisfiesExpression: SatisfiesExpression;
171
+ SemicolonClassElement: SemicolonClassElement;
172
+ SetAccessor: SetAccessorDeclaration;
173
+ ShorthandPropertyAssignment: ShorthandPropertyAssignment;
174
+ SourceFile: SourceFile;
175
+ SpreadAssignment: SpreadAssignment;
176
+ SpreadElement: SpreadElement;
177
+ StringKeyword: StringKeyword;
178
+ StringLiteral: StringLiteral;
179
+ SuperKeyword: SuperExpression;
180
+ SwitchStatement: SwitchStatement;
181
+ SymbolKeyword: SymbolKeyword;
182
+ SyntheticExpression: SyntheticExpression;
183
+ TaggedTemplateExpression: TaggedTemplateExpression;
184
+ TemplateExpression: TemplateExpression;
185
+ TemplateHead: TemplateHead;
186
+ TemplateLiteralType: TemplateLiteralTypeNode;
187
+ TemplateLiteralTypeSpan: TemplateLiteralTypeSpan;
188
+ TemplateMiddle: TemplateMiddle;
189
+ TemplateSpan: TemplateSpan;
190
+ TemplateTail: TemplateTail;
191
+ ThisKeyword: ThisExpression;
192
+ ThisType: ThisTypeNode;
193
+ ThrowStatement: ThrowStatement;
194
+ TrueKeyword: TrueLiteral;
195
+ TryStatement: TryStatement;
196
+ TupleType: TupleTypeNode;
197
+ TypeAliasDeclaration: TypeAliasDeclaration;
198
+ TypeAssertionExpression: TypeAssertion;
199
+ TypeLiteral: TypeLiteralNode;
200
+ TypeOfExpression: TypeOfExpression;
201
+ TypeOperator: TypeOperatorNode;
202
+ TypeParameter: TypeParameterDeclaration;
203
+ TypePredicate: TypePredicateNode;
204
+ TypeQuery: TypeQueryNode;
205
+ TypeReference: TypeReferenceNode;
206
+ UndefinedKeyword: UndefinedKeyword;
207
+ UnionType: UnionTypeNode;
208
+ UnknownKeyword: UnknownKeyword;
209
+ VariableDeclaration: VariableDeclaration;
210
+ VariableDeclarationList: VariableDeclarationList;
211
+ VariableStatement: VariableStatement;
212
+ VoidExpression: VoidExpression;
213
+ VoidKeyword: VoidKeyword;
214
+ WhileStatement: WhileStatement;
215
+ WithStatement: WithStatement;
216
+ YieldExpression: YieldExpression;
217
+ "AnyKeyword:exit": AnyKeyword;
218
+ "ArrayBindingPattern:exit": ArrayBindingPattern;
219
+ "ArrayLiteralExpression:exit": ArrayLiteralExpression;
220
+ "ArrayType:exit": ArrayTypeNode;
221
+ "ArrowFunction:exit": ArrowFunction;
222
+ "AsExpression:exit": AsExpression;
223
+ "AwaitExpression:exit": AwaitExpression;
224
+ "BigIntKeyword:exit": BigIntKeyword;
225
+ "BigIntLiteral:exit": BigIntLiteral;
226
+ "BinaryExpression:exit": BinaryExpression;
227
+ "BindingElement:exit": BindingElement;
228
+ "Block:exit": Block;
229
+ "BooleanKeyword:exit": BooleanKeyword;
230
+ "BreakStatement:exit": BreakStatement;
231
+ "CallExpression:exit": CallExpression;
232
+ "CallSignature:exit": CallSignatureDeclaration;
233
+ "CaseBlock:exit": CaseBlock;
234
+ "CaseClause:exit": CaseClause;
235
+ "CatchClause:exit": CatchClause;
236
+ "ClassDeclaration:exit": ClassDeclaration;
237
+ "ClassExpression:exit": ClassExpression;
238
+ "ClassStaticBlockDeclaration:exit": ClassStaticBlockDeclaration;
239
+ "CommaListExpression:exit": CommaListExpression;
240
+ "ComputedPropertyName:exit": ComputedPropertyName;
241
+ "ConditionalExpression:exit": ConditionalExpression;
242
+ "ConditionalType:exit": ConditionalTypeNode;
243
+ "Constructor:exit": ConstructorDeclaration;
244
+ "ConstructorType:exit": ConstructorTypeNode;
245
+ "ConstructSignature:exit": ConstructSignatureDeclaration;
246
+ "ContinueStatement:exit": ContinueStatement;
247
+ "DebuggerStatement:exit": DebuggerStatement;
248
+ "Decorator:exit": Decorator;
249
+ "DefaultClause:exit": DefaultClause;
250
+ "DeleteExpression:exit": DeleteExpression;
251
+ "DoStatement:exit": DoStatement;
252
+ "ElementAccessExpression:exit": ElementAccessExpression;
253
+ "EmptyStatement:exit": EmptyStatement;
254
+ "EnumDeclaration:exit": EnumDeclaration;
255
+ "EnumMember:exit": EnumMember;
256
+ "ExportAssignment:exit": ExportAssignment;
257
+ "ExportDeclaration:exit": ExportDeclaration;
258
+ "ExportSpecifier:exit": ExportSpecifier;
259
+ "ExpressionStatement:exit": ExpressionStatement;
260
+ "ExpressionWithTypeArguments:exit": ExpressionWithTypeArguments;
261
+ "ExternalModuleReference:exit": ExternalModuleReference;
262
+ "FalseKeyword:exit": FalseLiteral;
263
+ "ForInStatement:exit": ForInStatement;
264
+ "ForOfStatement:exit": ForOfStatement;
265
+ "ForStatement:exit": ForStatement;
266
+ "FunctionDeclaration:exit": FunctionDeclaration;
267
+ "FunctionExpression:exit": FunctionExpression;
268
+ "FunctionType:exit": FunctionTypeNode;
269
+ "GetAccessor:exit": GetAccessorDeclaration;
270
+ "HeritageClause:exit": HeritageClause;
271
+ "Identifier:exit": Identifier;
272
+ "IfStatement:exit": IfStatement;
273
+ "ImportAttribute:exit": ImportAttribute;
274
+ "ImportAttributes:exit": ImportAttributes;
275
+ "ImportClause:exit": ImportClause;
276
+ "ImportDeclaration:exit": ImportDeclaration;
277
+ "ImportEqualsDeclaration:exit": ImportEqualsDeclaration;
278
+ "ImportKeyword:exit": ImportExpression;
279
+ "ImportSpecifier:exit": ImportSpecifier;
280
+ "ImportType:exit": ImportTypeNode;
281
+ "IndexedAccessType:exit": IndexedAccessTypeNode;
282
+ "IndexSignature:exit": IndexSignatureDeclaration;
283
+ "InferType:exit": InferTypeNode;
284
+ "InterfaceDeclaration:exit": InterfaceDeclaration;
285
+ "IntersectionType:exit": IntersectionTypeNode;
286
+ "IntrinsicKeyword:exit": IntrinsicKeyword;
287
+ "JSDocAllType:exit": JSDocAllType;
288
+ "JSDocFunctionType:exit": JSDocFunctionType;
289
+ "JSDocLink:exit": JSDocLink;
290
+ "JSDocLinkCode:exit": JSDocLinkCode;
291
+ "JSDocLinkPlain:exit": JSDocLinkPlain;
292
+ "JSDocMemberName:exit": JSDocMemberName;
293
+ "JSDocNamepathType:exit": JSDocNamepathType;
294
+ "JSDocNonNullableType:exit": JSDocNonNullableType;
295
+ "JSDocNullableType:exit": JSDocNullableType;
296
+ "JSDocOptionalType:exit": JSDocOptionalType;
297
+ "JSDocParameterTag:exit": JSDocParameterTag;
298
+ "JSDocPropertyTag:exit": JSDocPropertyTag;
299
+ "JSDocReturnTag:exit": JSDocReturnTag;
300
+ "JSDocSignature:exit": JSDocSignature;
301
+ "JSDocTemplateTag:exit": JSDocTemplateTag;
302
+ "JSDocText:exit": JSDocText;
303
+ "JSDocTypeExpression:exit": JSDocTypeExpression;
304
+ "JSDocTypeLiteral:exit": JSDocTypeLiteral;
305
+ "JSDocUnknownType:exit": JSDocUnknownType;
306
+ "JSDocVariadicType:exit": JSDocVariadicType;
307
+ "JsxAttribute:exit": JsxAttribute;
308
+ "JsxAttributes:exit": JsxAttributes;
309
+ "JsxClosingElement:exit": JsxClosingElement;
310
+ "JsxClosingFragment:exit": JsxClosingFragment;
311
+ "JsxElement:exit": JsxElement;
312
+ "JsxExpression:exit": JsxExpression;
313
+ "JsxFragment:exit": JsxFragment;
314
+ "JsxNamespacedName:exit": JsxNamespacedName;
315
+ "JsxOpeningElement:exit": JsxOpeningElement;
316
+ "JsxOpeningFragment:exit": JsxOpeningFragment;
317
+ "JsxSelfClosingElement:exit": JsxSelfClosingElement;
318
+ "JsxSpreadAttribute:exit": JsxSpreadAttribute;
319
+ "JsxText:exit": JsxText;
320
+ "LabeledStatement:exit": LabeledStatement;
321
+ "LiteralType:exit": LiteralTypeNode;
322
+ "MappedType:exit": MappedTypeNode;
323
+ "MetaProperty:exit": MetaProperty;
324
+ "MethodDeclaration:exit": MethodDeclaration;
325
+ "MethodSignature:exit": MethodSignature;
326
+ "MissingDeclaration:exit": MissingDeclaration;
327
+ "ModuleBlock:exit": ModuleBlock;
328
+ "ModuleDeclaration:exit": ModuleDeclaration;
329
+ "NamedExports:exit": NamedExports;
330
+ "NamedImports:exit": NamedImports;
331
+ "NamedTupleMember:exit": NamedTupleMember;
332
+ "NamespaceExport:exit": NamespaceExport;
333
+ "NamespaceExportDeclaration:exit": NamespaceExportDeclaration;
334
+ "NamespaceImport:exit": NamespaceImport;
335
+ "NeverKeyword:exit": NeverKeyword;
336
+ "NewExpression:exit": NewExpression;
337
+ "NonNullExpression:exit": NonNullExpression;
338
+ "NoSubstitutionTemplateLiteral:exit": NoSubstitutionTemplateLiteral;
339
+ "NotEmittedStatement:exit": NotEmittedStatement;
340
+ "NotEmittedTypeElement:exit": NotEmittedTypeElement;
341
+ "NullKeyword:exit": NullLiteral;
342
+ "NumberKeyword:exit": NumberKeyword;
343
+ "NumericLiteral:exit": NumericLiteral;
344
+ "ObjectBindingPattern:exit": ObjectBindingPattern;
345
+ "ObjectKeyword:exit": ObjectKeyword;
346
+ "ObjectLiteralExpression:exit": ObjectLiteralExpression;
347
+ "OmittedExpression:exit": OmittedExpression;
348
+ "OptionalType:exit": OptionalTypeNode;
349
+ "Parameter:exit": ParameterDeclaration;
350
+ "ParenthesizedExpression:exit": ParenthesizedExpression;
351
+ "ParenthesizedType:exit": ParenthesizedTypeNode;
352
+ "PartiallyEmittedExpression:exit": PartiallyEmittedExpression;
353
+ "PostfixUnaryExpression:exit": PostfixUnaryExpression;
354
+ "PrefixUnaryExpression:exit": PrefixUnaryExpression;
355
+ "PrivateIdentifier:exit": PrivateIdentifier;
356
+ "PropertyAccessExpression:exit": PropertyAccessExpression;
357
+ "PropertyAssignment:exit": PropertyAssignment;
358
+ "PropertyDeclaration:exit": PropertyDeclaration;
359
+ "PropertySignature:exit": PropertySignature;
360
+ "QualifiedName:exit": QualifiedName;
361
+ "RegularExpressionLiteral:exit": RegularExpressionLiteral;
362
+ "RestType:exit": RestTypeNode;
363
+ "ReturnStatement:exit": ReturnStatement;
364
+ "SatisfiesExpression:exit": SatisfiesExpression;
365
+ "SemicolonClassElement:exit": SemicolonClassElement;
366
+ "SetAccessor:exit": SetAccessorDeclaration;
367
+ "ShorthandPropertyAssignment:exit": ShorthandPropertyAssignment;
368
+ "SourceFile:exit": SourceFile;
369
+ "SpreadAssignment:exit": SpreadAssignment;
370
+ "SpreadElement:exit": SpreadElement;
371
+ "StringKeyword:exit": StringKeyword;
372
+ "StringLiteral:exit": StringLiteral;
373
+ "SuperKeyword:exit": SuperExpression;
374
+ "SwitchStatement:exit": SwitchStatement;
375
+ "SymbolKeyword:exit": SymbolKeyword;
376
+ "SyntheticExpression:exit": SyntheticExpression;
377
+ "TaggedTemplateExpression:exit": TaggedTemplateExpression;
378
+ "TemplateExpression:exit": TemplateExpression;
379
+ "TemplateHead:exit": TemplateHead;
380
+ "TemplateLiteralType:exit": TemplateLiteralTypeNode;
381
+ "TemplateLiteralTypeSpan:exit": TemplateLiteralTypeSpan;
382
+ "TemplateMiddle:exit": TemplateMiddle;
383
+ "TemplateSpan:exit": TemplateSpan;
384
+ "TemplateTail:exit": TemplateTail;
385
+ "ThisKeyword:exit": ThisExpression;
386
+ "ThisType:exit": ThisTypeNode;
387
+ "ThrowStatement:exit": ThrowStatement;
388
+ "TrueKeyword:exit": TrueLiteral;
389
+ "TryStatement:exit": TryStatement;
390
+ "TupleType:exit": TupleTypeNode;
391
+ "TypeAliasDeclaration:exit": TypeAliasDeclaration;
392
+ "TypeAssertionExpression:exit": TypeAssertion;
393
+ "TypeLiteral:exit": TypeLiteralNode;
394
+ "TypeOfExpression:exit": TypeOfExpression;
395
+ "TypeOperator:exit": TypeOperatorNode;
396
+ "TypeParameter:exit": TypeParameterDeclaration;
397
+ "TypePredicate:exit": TypePredicateNode;
398
+ "TypeQuery:exit": TypeQueryNode;
399
+ "TypeReference:exit": TypeReferenceNode;
400
+ "UndefinedKeyword:exit": UndefinedKeyword;
401
+ "UnionType:exit": UnionTypeNode;
402
+ "UnknownKeyword:exit": UnknownKeyword;
403
+ "VariableDeclaration:exit": VariableDeclaration;
404
+ "VariableDeclarationList:exit": VariableDeclarationList;
405
+ "VariableStatement:exit": VariableStatement;
406
+ "VoidExpression:exit": VoidExpression;
407
+ "VoidKeyword:exit": VoidKeyword;
408
+ "WhileStatement:exit": WhileStatement;
409
+ "WithStatement:exit": WithStatement;
410
+ "YieldExpression:exit": YieldExpression;
411
+ }, TypeScriptFileServices>;
219
412
  declare function throwUnknownLanguageExtension(filename: string): never;
220
413
  //#endregion
221
- export { NodeSyntaxKinds, TypeScriptFileServices, setVolarCreateFile, throwUnknownLanguageExtension, typescriptLanguage };
222
- //# sourceMappingURL=language.d.ts.map
414
+ export { NodeSyntaxKinds, TypeScriptFileServices, setVolarCreateFile, throwUnknownLanguageExtension, typescriptLanguage };
package/lib/language.js CHANGED
@@ -5,12 +5,12 @@ import { createTypeScriptServerHost } from "./createTypeScriptServerHost.js";
5
5
  import { getFirstEnumValues } from "./getFirstEnumValues.js";
6
6
  import { getTypeScriptFileCacheImpacts } from "./getTypeScriptFileCacheImpacts.js";
7
7
  import { orderTypeScriptFilePaths } from "./orderTypeScriptFilePaths.js";
8
- import { createLanguage } from "@flint.fyi/core";
9
8
  import * as ts$1 from "typescript";
9
+ import { createLanguage } from "@flint.fyi/core";
10
10
  import { assert, nullThrows } from "@flint.fyi/utils";
11
+ import path from "node:path";
11
12
  import { createProjectService } from "@typescript-eslint/project-service";
12
13
  import { debugForFile } from "debug-for-file";
13
- import path from "node:path";
14
14
  //#region src/language.ts
15
15
  const log = debugForFile(import.meta.filename);
16
16
  const NodeSyntaxKinds = getFirstEnumValues(ts$1.SyntaxKind);
@@ -115,5 +115,3 @@ function throwUnknownLanguageExtension(filename) {
115
115
  }
116
116
  //#endregion
117
117
  export { NodeSyntaxKinds, setVolarCreateFile, throwUnknownLanguageExtension, typescriptLanguage };
118
-
119
- //# sourceMappingURL=language.js.map
package/lib/nodes.d.ts CHANGED
@@ -200,5 +200,4 @@ interface TypeScriptNodesByName {
200
200
  }
201
201
  type TypeScriptNodeVisitors = WithExitKeys<TypeScriptNodesByName>;
202
202
  //#endregion
203
- export { TypeScriptNodeVisitors, TypeScriptNodesByName };
204
- //# sourceMappingURL=nodes.d.ts.map
203
+ export { TypeScriptNodeVisitors, TypeScriptNodesByName };
@@ -1,4 +1,3 @@
1
1
  import { type CharacterReportRange, type NormalizedReportRangeObject } from "@flint.fyi/core";
2
2
  import type * as AST from "./types/ast.ts";
3
3
  export declare function normalizeRange(original: CharacterReportRange, sourceFile: AST.SourceFile): NormalizedReportRangeObject;
4
- //# sourceMappingURL=normalizeRange.d.ts.map