@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.
- package/lib/collectReferencedFilePaths.d.ts +0 -1
- package/lib/collectReferencedFilePaths.js +1 -3
- package/lib/convertTypeScriptDiagnosticToLanguageReport.d.ts +2 -3
- package/lib/convertTypeScriptDiagnosticToLanguageReport.js +3 -4
- package/lib/createTypeScriptServerHost.d.ts +1 -2
- package/lib/createTypeScriptServerHost.js +1 -3
- package/lib/directives/parseDirectivesFromTypeScriptFile.d.ts +1 -2
- package/lib/directives/parseDirectivesFromTypeScriptFile.js +2 -4
- package/lib/getFirstEnumValues.d.ts +0 -1
- package/lib/getFirstEnumValues.js +0 -2
- package/lib/getTSNodeRange.d.ts +2 -3
- package/lib/getTSNodeRange.js +0 -2
- package/lib/getTypeScriptFileCacheImpacts.d.ts +0 -1
- package/lib/getTypeScriptFileCacheImpacts.js +5 -3
- package/lib/index.d.ts +8 -3
- package/lib/index.js +5 -1
- package/lib/language.d.ts +393 -201
- package/lib/language.js +2 -4
- package/lib/nodes.d.ts +1 -2
- package/lib/normalizeRange.d.ts +0 -1
- package/lib/normalizeRange.js +0 -2
- package/lib/orderTypeScriptFilePaths.d.ts +0 -1
- package/lib/orderTypeScriptFilePaths.js +0 -2
- package/lib/package.js +1 -3
- package/lib/scope/identifierReferences.d.ts +3 -0
- package/lib/scope/identifierReferences.js +89 -0
- package/lib/scope/scopeManager.d.ts +14 -0
- package/lib/scope/scopeManager.js +153 -0
- package/lib/scope/scopes.d.ts +7 -0
- package/lib/scope/scopes.js +64 -0
- package/lib/scope/types.d.ts +45 -0
- package/lib/types/ast.d.ts +2 -2
- package/lib/types/checker.d.ts +1 -2
- package/lib/utils/containsGlobalDeclarations.d.ts +6 -0
- package/lib/utils/containsGlobalDeclarations.js +17 -0
- package/lib/utils/createRuleTesterTSConfig.d.ts +1 -2
- package/lib/utils/createRuleTesterTSConfig.js +0 -2
- package/lib/utils/declarationIncludesGlobal.d.ts +1 -2
- package/lib/utils/declarationIncludesGlobal.js +0 -2
- package/lib/utils/declarationsIncludeGlobal.d.ts +0 -1
- package/lib/utils/declarationsIncludeGlobal.js +0 -2
- package/lib/utils/forEachChild.d.ts +7 -0
- package/lib/utils/forEachChild.js +5 -0
- package/lib/utils/getDeclarationsIfGlobal.d.ts +2 -5
- package/lib/utils/getDeclarationsIfGlobal.js +0 -2
- package/lib/utils/getModifyingReferences.d.ts +2 -7
- package/lib/utils/getModifyingReferences.js +5 -27
- package/lib/utils/hasSameTokens.d.ts +1 -2
- package/lib/utils/hasSameTokens.js +0 -2
- package/lib/utils/isBuiltinArrayMethod.d.ts +1 -2
- package/lib/utils/isBuiltinArrayMethod.js +0 -2
- package/lib/utils/isFunction.d.ts +1 -2
- package/lib/utils/isFunction.js +0 -2
- package/lib/utils/isGlobalDeclaration.d.ts +1 -2
- package/lib/utils/isGlobalDeclaration.js +0 -2
- package/lib/utils/isGlobalDeclarationOfName.d.ts +1 -2
- package/lib/utils/isGlobalDeclarationOfName.js +0 -2
- package/lib/utils/isGlobalVariable.d.ts +1 -2
- package/lib/utils/isGlobalVariable.js +0 -2
- package/lib/utils/isInlineArrayCreation.d.ts +1 -2
- package/lib/utils/isInlineArrayCreation.js +0 -2
- package/lib/utils/isStaticString.d.ts +5 -0
- package/lib/utils/isStaticString.js +7 -0
- package/lib/utils/isStringRawNoSubstitution.d.ts +7 -0
- package/lib/utils/isStringRawNoSubstitution.js +9 -0
- package/lib/utils/unwrapParentParenthesizedExpressions.d.ts +1 -2
- package/lib/utils/unwrapParentParenthesizedExpressions.js +0 -2
- package/lib/utils/unwrapParenthesizedNode.d.ts +1 -2
- package/lib/utils/unwrapParenthesizedNode.js +0 -2
- 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
|
|
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:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
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 };
|
package/lib/normalizeRange.d.ts
CHANGED
|
@@ -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
|