@artel/artc 0.6.26026 → 0.6.26028
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/build/Cli.js +3 -3
- package/build/api/Api.js +10 -4
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +91 -362
- package/build/{chunk-35ZDOLQ3.js → chunk-G5UKABEH.js} +2 -2
- package/build/{chunk-UY7U6EAT.js → chunk-SPNTJ746.js} +2219 -1830
- package/build/{chunk-TWDMG7M3.js → chunk-SYVSMJJH.js} +2 -2
- package/build/types/analysis/a/SourceFileAnalyzer.d.ts +59 -28
- package/build/types/api/Api.d.ts +5 -1
- package/build/types/api/ApiServices.d.ts +5 -0
- package/build/types/diagnostic/DiagnosticCode.d.ts +144 -142
- package/build/types/services/CustomRequests.d.ts +0 -55
- package/build/types/services/LanguageServer.d.ts +13 -7
- package/build/types/services/LanguageServerMessageHandler.d.ts +30 -0
- package/package.json +2 -2
- package/build/types/services/a/ScriptEditingService.d.ts +0 -13
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
Analyzer3 as Analyzer,
|
|
3
3
|
CompilationLoader,
|
|
4
4
|
DefaultNamesOfDirectoriesToIgnore,
|
|
5
5
|
Diagnostic,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
WellKnownDeclarationsLoadError,
|
|
10
10
|
__async,
|
|
11
11
|
createTsInteropInputsForCompilation
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-SPNTJ746.js";
|
|
13
13
|
|
|
14
14
|
// source/executor/Compiler.ts
|
|
15
15
|
var Compiler = class {
|
|
@@ -21,37 +21,33 @@ export declare class SourceFileAnalyzer {
|
|
|
21
21
|
constructor(analyzer: Analyzer, sourceFile: project.SourceFileA);
|
|
22
22
|
analyze(taskController: TaskController): Promise<Diagnostic[]>;
|
|
23
23
|
private analyzeNode;
|
|
24
|
-
private
|
|
24
|
+
private checkTag;
|
|
25
|
+
private checkPackageReducedTypeDeclaration;
|
|
26
|
+
private checkPackageAliasTypeDeclaration;
|
|
27
|
+
private checkPackageEntryPointDeclaration;
|
|
28
|
+
private checkPackageConstructorDeclaration;
|
|
29
|
+
private checkTranslationsDeclaration;
|
|
30
|
+
private addNotTranslatedTextsDiagnostics;
|
|
31
|
+
private collectNotTranslatedTexts;
|
|
32
|
+
private createNotTranslatedTextsDiagnostic;
|
|
33
|
+
private checkTextTranslationDeclaration;
|
|
25
34
|
private checkPackageVariantDeclaration;
|
|
26
|
-
private checkTypeMemberDeclarationBlock;
|
|
27
|
-
private checkAssumptionExpression;
|
|
28
|
-
private checkStatementBlock;
|
|
29
|
-
private checkFunctionBlock;
|
|
30
35
|
private checkPackageStructuredTypeDeclaration;
|
|
31
36
|
private checkAllFieldsOfStructureAreConst;
|
|
32
37
|
private checkStructureHasRecursiveLayout;
|
|
33
38
|
private checkStructureIsReferencedByFieldTypeRecursively;
|
|
34
39
|
private checkStructureIsReferencedByFieldsOfStructure;
|
|
35
40
|
private isReferencedAutomaticallyGeneratedBackingVariable;
|
|
36
|
-
private
|
|
37
|
-
private checkBreakLoopOrContinueLoopStatement;
|
|
38
|
-
private isStatementUsedInsideLoop;
|
|
39
|
-
private checkTypeParameterList;
|
|
40
|
-
private checkTypeParameterDeclaration;
|
|
41
|
-
private checkFunctionLiteral;
|
|
42
|
-
private checkFunctionBlockLiteral;
|
|
43
|
-
private checkDereferenceExpression;
|
|
44
|
-
private checkIndexedAccessExpression;
|
|
45
|
-
private checkCallExpression;
|
|
46
|
-
private addNotTranslatedTextsDiagnostics;
|
|
47
|
-
private collectNotTranslatedTexts;
|
|
48
|
-
private createNotTranslatedTextsDiagnostic;
|
|
49
|
-
private checkAllDefaultConstructorArgumentsAreNamed;
|
|
41
|
+
private checkAspectsHaveNotBeenExtendedWithDifferentTypeArguments;
|
|
50
42
|
private checkPackageVariableDeclaration;
|
|
51
43
|
private checkPackageFunctionDeclaration;
|
|
52
44
|
private checkPackageVariableGetterDeclaration;
|
|
53
45
|
private checkPackageVariableSetterDeclaration;
|
|
46
|
+
private checkPackageMemberBodyPresence;
|
|
47
|
+
private checkTypeExtensionDeclaration;
|
|
48
|
+
private checkTypeMemberDeclarationBlock;
|
|
54
49
|
private checkConstructorDeclaration;
|
|
50
|
+
private checkDestructorDeclaration;
|
|
55
51
|
private checkMethodDeclaration;
|
|
56
52
|
private checkFieldDeclaration;
|
|
57
53
|
private checkFieldGetterDeclaration;
|
|
@@ -60,12 +56,54 @@ export declare class SourceFileAnalyzer {
|
|
|
60
56
|
private checkIndexedElementSetterDeclaration;
|
|
61
57
|
private checkDereferencedVariableGetterDeclaration;
|
|
62
58
|
private checkDereferencedVariableSetterDeclaration;
|
|
59
|
+
private checkTypeMemberBodyPresence;
|
|
60
|
+
private checkTypeParameterList;
|
|
61
|
+
private checkTypeParameterDeclaration;
|
|
62
|
+
private checkNamedTypeSpecifier;
|
|
63
|
+
private checkAnonymousClassDeclaration;
|
|
64
|
+
private checkAnonymousFunctionTypeDeclaration;
|
|
65
|
+
private checkParameterList;
|
|
66
|
+
private checkRequiredParametersDoNotFollowOptionalParameters;
|
|
67
|
+
private parameterListCanDeclareObjectParameter;
|
|
68
|
+
private checkObjectParameterIsTheFirstParameter;
|
|
69
|
+
private checkParameterDeclaration;
|
|
70
|
+
private checkOwnConstructorCallExpression;
|
|
71
|
+
private checkReferenceExpression;
|
|
72
|
+
private checkMatchExpressionList;
|
|
73
|
+
private checkWhileStatement;
|
|
74
|
+
private checkLoopStatement;
|
|
75
|
+
private checkElseIfClause;
|
|
76
|
+
private checkIfStatement;
|
|
77
|
+
private checkArgument;
|
|
78
|
+
private checkErrorVariableDeclaration;
|
|
79
|
+
private checkForStatementVariableDeclaration;
|
|
80
|
+
private checkLocalVariableDeclaration;
|
|
81
|
+
private checkBaseExpression;
|
|
82
|
+
private checkObjectExpression;
|
|
83
|
+
private checkAssignmentStatement;
|
|
84
|
+
private checkPrefixUnaryExpression;
|
|
85
|
+
private checkCatchClause;
|
|
86
|
+
private checkForStatement;
|
|
87
|
+
private checkLocalizableTextTemplateLiteral;
|
|
88
|
+
private checkLocalizableTextLiteral;
|
|
89
|
+
private checkAutotypeCallExpression;
|
|
90
|
+
private checkBinaryExpression;
|
|
91
|
+
private checkAssumptionExpression;
|
|
92
|
+
private checkStatementBlock;
|
|
93
|
+
private checkFunctionBlock;
|
|
94
|
+
private checkErrorStatement;
|
|
95
|
+
private checkBreakLoopOrContinueLoopStatement;
|
|
96
|
+
private isStatementUsedInsideLoop;
|
|
97
|
+
private checkFunctionLiteral;
|
|
98
|
+
private checkFunctionBlockLiteral;
|
|
99
|
+
private checkDereferenceExpression;
|
|
100
|
+
private checkIndexedAccessExpression;
|
|
101
|
+
private checkCallExpression;
|
|
102
|
+
private checkAllDefaultConstructorArgumentsAreNamed;
|
|
63
103
|
private checkNestedFunctionDeclaration;
|
|
64
104
|
private checkPossibleGeneratorFunctionReturnType;
|
|
65
105
|
private checkReturnStatement;
|
|
66
106
|
private checkYieldStatement;
|
|
67
|
-
private checkPackageMemberBodyPresence;
|
|
68
|
-
private checkTypeMemberBodyPresence;
|
|
69
107
|
private checkIdentifierExpression;
|
|
70
108
|
private checkLocalVariableUsedBeforeDeclaration;
|
|
71
109
|
private checkLocalVariableIsUsedBeforeBeingAssigned;
|
|
@@ -88,18 +126,11 @@ export declare class SourceFileAnalyzer {
|
|
|
88
126
|
private checkOptionalChainingIsUsedOnTheLeftSideOfAssignment;
|
|
89
127
|
private checkGenericSpecializationExpression;
|
|
90
128
|
private checkTypeArgumentTypesAreAssignableToConstraints;
|
|
91
|
-
private checkParameterList;
|
|
92
|
-
private checkRequiredParametersDoNotFollowOptionalParameters;
|
|
93
|
-
private parameterListCanDeclareObjectParameter;
|
|
94
|
-
private checkObjectParameterIsTheFirstParameter;
|
|
95
|
-
private checkParameterDeclaration;
|
|
96
129
|
private checkIfVariableIsUnused;
|
|
97
130
|
private checkIfNestedFunctionIsUnused;
|
|
98
131
|
private checkIfTypeParameterIsUnused;
|
|
99
132
|
private checkAllCodePathsReturnOrResultVariableIsAssigned;
|
|
100
133
|
private isReceiverBaseAutoVariableAccess;
|
|
101
|
-
private overridingMemberHasCorrectHiding;
|
|
102
|
-
private checkTextTranslationDeclaration;
|
|
103
134
|
private attachNodeLocationAndAddDiagnostics;
|
|
104
135
|
private createAndAddDiagnostic;
|
|
105
136
|
private addDiagnostic;
|
package/build/types/api/Api.d.ts
CHANGED
|
@@ -17,7 +17,9 @@ export * from '../analysis/a/SourceFileAnalyzer.js';
|
|
|
17
17
|
export type { Meaning as TagMeaning } from '../analysis/a/TagMeaning.js';
|
|
18
18
|
export * from '../analysis/AccessedFunction.js';
|
|
19
19
|
export * from '../analysis/Analyzer.js';
|
|
20
|
+
export { Analyzer } from '../analysis/Analyzer.js';
|
|
20
21
|
export * from '../analysis/ImportedPackageNameTree.js';
|
|
22
|
+
export { Analyzer as AnalyzerM } from '../analysis/m/Analyzer.js';
|
|
21
23
|
export * from '../analysis/PackageMemberLookup.js';
|
|
22
24
|
export * from '../analysis/SourcePackageDependencyGraph.js';
|
|
23
25
|
export * from '../analysis/SubstitutedFunction.js';
|
|
@@ -40,7 +42,9 @@ export * from '../parser/CharacterCodes.js';
|
|
|
40
42
|
export * from '../parser/ParseNumber.js';
|
|
41
43
|
export * from '../parser/UnescapeText.js';
|
|
42
44
|
export * from '../project/index.js';
|
|
43
|
-
export * as
|
|
45
|
+
export * as treeA from '../tree/a/index.js';
|
|
46
|
+
export * as tree from '../tree/index.js';
|
|
47
|
+
export * as treeM from '../tree/m/index.js';
|
|
44
48
|
export * from '../ts-interop/TsLibrariesProvider.js';
|
|
45
49
|
export * from '../ts-interop/Utils.js';
|
|
46
50
|
export * as type from '../types/index.js';
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
export { Range, TaskController, Uri, UrisRelativityKind } from '../common/index.js';
|
|
2
|
+
export * from '../services/common/Types.js';
|
|
1
3
|
export * from '../services/CustomRequests.js';
|
|
2
4
|
export * from '../services/LanguageServer.js';
|
|
5
|
+
export * from '../services/LanguageServerMessageHandler.js';
|
|
6
|
+
export { Workspace } from '../services/workspace/Workspace.js';
|
|
7
|
+
export type { WorkspaceElementInfo } from '../services/workspace/Workspace.js';
|
|
3
8
|
export * from '../services/workspace/WorkspaceFileSystem.js';
|
|
@@ -135,148 +135,150 @@ export declare enum DiagnosticCode {
|
|
|
135
135
|
CorrespondingBasicTypeMemberNotFound = 2100,
|
|
136
136
|
CorrespondingBasicReadFunctionNotFound = 2101,
|
|
137
137
|
CorrespondingBasicWriteFunctionNotFound = 2102,
|
|
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
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
138
|
+
BasicVariableDoesNotHaveAWriteFunctionBecauseItIsAConstant = 2103,
|
|
139
|
+
AsyncFunctionCanOnlyBeCalledFromFunctionMarkedWithAsyncModifier = 2104,
|
|
140
|
+
TagNotFound = 2105,
|
|
141
|
+
TypeOrFunctionNameExpected = 2106,
|
|
142
|
+
PackageNameOrAliasExpected = 2107,
|
|
143
|
+
ExpressionCanBeNull = 2108,
|
|
144
|
+
TargetVariableExpressionInTheAssignmentStatementCannotContainQuestionOperator = 2109,
|
|
145
|
+
UnreachableCode = 2110,
|
|
146
|
+
RecursionOccurredWhileCalculatingTheTypeOfTheExpression = 2111,
|
|
147
|
+
RecursionOccurredWhileInferringTheTypeOfTheVariable = 2112,
|
|
148
|
+
ScopeAlreadyContainsDeclarationWithTheSameName = 2113,
|
|
149
|
+
ScopeAlreadyContainsFunctionWithTheSameNameAndParameterTypes = 2114,
|
|
150
|
+
ParameterName0ConflictsWithAutomaticallyGeneratedVariableName = 2115,
|
|
151
|
+
PackageAlreadyContainsDeclarationWithTheSameName = 2116,
|
|
152
|
+
PackageAlreadyContainsFunctionWithTheSameNameAndParameterTypes = 2117,
|
|
153
|
+
PackageAlreadyContainsTypeWithTheSameNameAndSameOrIntersectingTypeParameterCount = 2118,
|
|
154
|
+
PackageAliasWithTheSameNameAlreadyExits = 2119,
|
|
155
|
+
TypeAlreadyContainsDeclarationWithTheSameName = 2120,
|
|
156
|
+
TypeAlreadyContainsMethodWithTheSameNameAndParameterTypes = 2121,
|
|
157
|
+
TypeAlreadyContainsOperatorWithTheSameNameAndParameterTypes = 2122,
|
|
158
|
+
TypeAlreadyContainsConstructorWithTheSameParameterTypes = 2123,
|
|
159
|
+
TypeAlreadyContainsIndexerWithTheSameParameterTypes = 2124,
|
|
160
|
+
TypeCanHaveOnlyOneDestructor = 2125,
|
|
161
|
+
TypeCanHaveOnlyOneDereferenceOperator = 2126,
|
|
162
|
+
VariableIsUsedBeforeItsDeclaration = 2127,
|
|
163
|
+
VariableMayNotHasBeenAssignedBeforeUsage = 2128,
|
|
164
|
+
NotAllCodePathsReturnAValueAndResultLocalVariableMayNotHasBeenAssigned = 2129,
|
|
165
|
+
TypeCannotHaveMultipleBaseObjectTypes = 2130,
|
|
166
|
+
TypeThatIsNotMarkedAsBasicCannotBeUsedAsBaseType = 2131,
|
|
167
|
+
StructureCannotBeUsedAsBaseType = 2132,
|
|
168
|
+
ThisTypeIsAlreadyListedInBaseTypeList = 2133,
|
|
169
|
+
OnlyObjectAndAspectTypesCanBeUsedAsBaseTypes = 2134,
|
|
170
|
+
StructureCanHaveOnlyAspectsAsBaseTypes = 2135,
|
|
171
|
+
AspectTypeCanHaveOnlyAspectsAsBaseTypes = 2136,
|
|
172
|
+
ModifierListAlreadyContains0Modifier = 2137,
|
|
173
|
+
ModifierListOfOuterDeclarationGroupAlreadyContains0Modifier = 2138,
|
|
174
|
+
_0ModifierIsNotAllowedHere = 2139,
|
|
175
|
+
DeclarationCannotBePlacedInGroupHaving0Modifier = 2140,
|
|
176
|
+
PackageConstructorDeclarationCannotHaveModifiers = 2141,
|
|
177
|
+
PackageEntryPointDeclarationCannotHaveModifiers = 2142,
|
|
178
|
+
TranslationsCannotHaveModifiers = 2143,
|
|
179
|
+
AbstractModifierCanOnlyBeUsedInAbstractObjectTypes = 2144,
|
|
180
|
+
BasicModifierCanOnlyBeUsedInObjectTypesAspectTypesAndTypeAliases = 2145,
|
|
181
|
+
OverrideModifierCanOnlyBeUsedInObjectAndAspectTypes = 2146,
|
|
182
|
+
_0ModifierCannotBeUsedWith1Modifier = 2147,
|
|
183
|
+
VariantValueCannotBeHidden = 2148,
|
|
184
|
+
BasicModifierCanOnlyBeAppliedToObjectTypes = 2149,
|
|
185
|
+
AbstractModifierCanOnlyBeAppliedToObjectTypes = 2150,
|
|
186
|
+
NotBasicObjectTypesCannotHaveBasicMembers = 2151,
|
|
187
|
+
BasicModifierCannotBeAppliedToAspectTypeFields = 2152,
|
|
188
|
+
DeclarationConflictsWithBaseTypeMember0 = 2153,
|
|
189
|
+
DeclarationConflictsWithBaseTypeMember0AddOverrideModifier = 2154,
|
|
190
|
+
DeclarationConflictsWithBaseTypeMember0ThisMemberCannotBeOverridden = 2155,
|
|
191
|
+
DeclarationConflictsWithBaseTypeMember0ToOverrideTypeMustBeAssignableTo1 = 2156,
|
|
192
|
+
DeclarationConflictsWithBaseTypeMember0ToOverrideReturnTypeMustBeAssignableTo1 = 2157,
|
|
193
|
+
OverridingMemberMustHaveTheSameHidingLevelAsBaseMember0 = 2158,
|
|
194
|
+
OverridingMethodMustBeAsyncBecauseBaseMethod0IsAsync = 2159,
|
|
195
|
+
OverridingMethodMustNotBeAsyncBecauseBaseMethod0IsNotAsync = 2160,
|
|
196
|
+
OverridingFieldMustMustBeMutableToMatchBaseField0 = 2161,
|
|
197
|
+
OverridingMemberMustHaveWriteFunctionToMatchBaseMember0 = 2162,
|
|
198
|
+
TypeDoesNotImplementMember0 = 2163,
|
|
199
|
+
TypeDoesNotImplementMember0ImplicitImplementationTypeMismatch1 = 2164,
|
|
200
|
+
TypeDoesNotImplementMember0ImplicitImplementation1IsAsync = 2165,
|
|
201
|
+
TypeDoesNotImplementMember0ImplicitImplementation1IsNotAsync = 2166,
|
|
202
|
+
TypeDoesNotImplementMember0ImplicitImplementation1IsNotMutable = 2167,
|
|
203
|
+
TypeDoesNotImplementMember0ImplicitImplementation1WriteFunctionIsHidden = 2168,
|
|
204
|
+
CannotAccessAbstractMemberOfBaseType = 2169,
|
|
205
|
+
TheFollowingBaseTypeMembersConflictAndMustBeOverridden0 = 2170,
|
|
206
|
+
TheFollowingBaseTypeMembersConflictBecauseTheyHaveTheSameOriginalName0AndMustBeOverridden1 = 2171,
|
|
207
|
+
TheFirstStatementOfConstructorBlockMustBeEitherBaseOrOwnConstructorCall = 2172,
|
|
208
|
+
ThisCallCausesOwnConstructorCallCycle = 2173,
|
|
209
|
+
OwnConstructorCallMustBeTheFirstStatementOfConstructorBlock = 2174,
|
|
210
|
+
BaseConstructorCallMustBeTheFirstStatementOfConstructorBlock = 2175,
|
|
211
|
+
Field0HasNoInitializerAndMayNotBeAssignedInConstructor = 2176,
|
|
212
|
+
Field0HasNoInitializerAndMayNotBeAssignedInPackageConstructor = 2177,
|
|
213
|
+
Variable0HasNoInitializerAndMayNotBeAssignedInPackageConstructor = 2178,
|
|
214
|
+
ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1 = 2179,
|
|
215
|
+
ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType = 2180,
|
|
216
|
+
CannotInferTypeArguments = 2181,
|
|
217
|
+
CanNotInferReturnTypeAddExplicitReturnTypeSpecifier = 2182,
|
|
218
|
+
ImmutableVariablesBustBeInitialized = 2183,
|
|
219
|
+
VariableTypeIsNotSpecified = 2184,
|
|
220
|
+
CannotInferTypeOfFunctionLiteralAddTypeSpecifierForParameter = 2185,
|
|
221
|
+
TypeParameterDefaultCanReferenceOnlyPreviouslyDeclaredTypeParameters = 2186,
|
|
222
|
+
RequiredTypeParametersCannotFollowTypeParametersWithDefaults = 2187,
|
|
223
|
+
RequiredParametersCannotFollowOptionalParameters = 2188,
|
|
224
|
+
ExpressionCannotBeReferenced = 2189,
|
|
225
|
+
TextIsMissingAmongPrimaryTextTranslationDefinitions = 2190,
|
|
226
|
+
DeclarationHasAlreadyBeenTranslated = 2191,
|
|
227
|
+
TheNumberOfTranslatedParametersMustBeEqualToTheNumberOfSourceParameters = 2192,
|
|
228
|
+
TheNumberOfTranslatedTypeParametersMustBeEqualToTheNumberOfSourceTypeParameters = 2193,
|
|
229
|
+
TranslatedOperatorMustBeNamed0 = 2194,
|
|
230
|
+
TranslationOfFunctionTypeMustIncludeParameterList = 2195,
|
|
231
|
+
OnlyOneTextTranslationPackageShouldBeMarkedAsPrimary = 2196,
|
|
232
|
+
Declarations0And1HaveTheSameSourceNamesButDifferentTranslatedNames23 = 2197,
|
|
233
|
+
TranslatedDeclarations0And1HaveTheSameTranslatedNamesButDifferentSourceNames23 = 2198,
|
|
234
|
+
TranslatedOverridingMember0MustTheSameNameAsBaseMember1 = 2199,
|
|
235
|
+
TextTranslationAlreadyExistsInTheTextTranslationPackage = 2200,
|
|
236
|
+
PackageDoesNotContainImplementationOf0 = 2201,
|
|
237
|
+
TypeDoesNotContainImplementationOf0 = 2202,
|
|
238
|
+
ImplementationVariableMustBeMutableToMatchInterfacePackageVariable0 = 2203,
|
|
239
|
+
ImplementationFunctionMustBeAsyncToMatchInterfacePackageFunction0 = 2204,
|
|
240
|
+
ImplementationFunctionMustNotBeAsyncToMatchInterfacePackageFunction0 = 2205,
|
|
241
|
+
ImplementationTypeMustBeBasicToMatchInterfacePackageType0 = 2206,
|
|
242
|
+
ImplementationTypeMustNotBeAbstractToMatchInterfacePackageType0 = 2207,
|
|
243
|
+
ImplementationTypeMemberMustBeBasicToMatchInterfacePackageTypeMember0 = 2208,
|
|
244
|
+
ImplementationTypeMemberMustNotBeAbstractToMatchInterfacePackageTypeMember0 = 2209,
|
|
245
|
+
ImplementationTypeMemberMustHaveWriteFunctionToMatchInterfacePackageTypeMember0 = 2210,
|
|
246
|
+
BreakLoopAndContinueLoopStatementsCanOnlyBeUsedInsideALoop = 2211,
|
|
247
|
+
BreakLoopAndContinueLoopStatementsCannotBeUsedInFinallyBlock = 2212,
|
|
248
|
+
TheCodeWasExpectedToBeUnreachable = 2213,
|
|
249
|
+
CorrespondingReductionSourceTypeMemberNotFound = 2214,
|
|
250
|
+
OnlyTypesPresentInBaseTypeListOrReductionSourceCanBeSpecified = 2215,
|
|
251
|
+
ReducedTypeMemberMustHaveTheSameTypeAsReductionSourceMember = 2216,
|
|
252
|
+
ReducedTypeMemberMustHaveTheSameHidingLevelAsReductionSourceMember = 2217,
|
|
253
|
+
ReducedTypeFieldMustBeImmutableToMatchReductionSourceField = 2218,
|
|
254
|
+
ReducedTypeMethodMustBeAsyncToMatchReductionSourceMethod = 2219,
|
|
255
|
+
ReducedTypeMethodMustNotBeAsyncToMatchReductionSourceMethod = 2220,
|
|
256
|
+
ReducedTypeMemberMustHaveNoWriteFunctionToMatchReductionSourceMember = 2221,
|
|
257
|
+
StructureFieldsMustBeImmutable = 2222,
|
|
258
|
+
StructureFieldsMustBeImmutableAutomaticallyCreatedStoredFieldIsMutable = 2223,
|
|
259
|
+
FieldTypeCausesRecursiveStructureLayout = 2224,
|
|
260
|
+
QuestionOperatorCanBeUsedOnlyInSpecificExpressions = 2225,
|
|
261
|
+
BaseTypeListMustNotBeEmpty = 2226,
|
|
262
|
+
ObjectParameterMustBeTheFirstParameter = 2227,
|
|
263
|
+
ObjectParameterCannotBeDeclaredHere = 2228,
|
|
264
|
+
OperatorCannotBeAsync = 2229,
|
|
265
|
+
OperatorCannotBeStatic = 2230,
|
|
266
|
+
OperatorCannotContainTypeParameterDeclarations = 2231,
|
|
267
|
+
TypeNameExpectedAtLastQualifier = 2232,
|
|
268
|
+
ExpressionsWithTypes0And1CannotBeCompared = 2233,
|
|
269
|
+
ReadAndWriteFunctionsMustBeEitherBothAbstractOrBothHaveImplementation = 2234,
|
|
270
|
+
IfOneOfAccessorsIsNotBasicItMustBeHiddenInType = 2235,
|
|
271
|
+
CannotReadValueOfAVariableBecauseItDoesNotHaveAReadFunction = 2236,
|
|
272
|
+
CannotReadValueOfAVariableBecauseItsReadFunctionIsHidden = 2237,
|
|
273
|
+
CannotAssignValueToAVariableBecauseItDoesNotHaveAWriteFunction = 2238,
|
|
274
|
+
CannotAssignValueToAnImmutableVariable = 2239,
|
|
275
|
+
CannotAssignValueToAVariableBecauseItsWriteFunctionIsHidden = 2240,
|
|
276
|
+
CannotReadValueBecauseReadFunctionIsNotDefined = 2241,
|
|
277
|
+
CannotReadValueBecauseReadFunctionIsHidden = 2242,
|
|
278
|
+
CannotAssignValueBecauseWriteFunctionIsNotDefined = 2243,
|
|
279
|
+
CannotAssignValueBecauseWriteFunctionIsHidden = 2244,
|
|
280
|
+
ReadFunctionMustHaveTheSameTypeAsWriteFunction = 2245,
|
|
281
|
+
AspectHasAlreadyBeenExtendedWithDifferentTypeArguments0 = 2246,
|
|
280
282
|
CannotFindTsLibDirectoryBaseSearchPaths0 = 3000,
|
|
281
283
|
SourceFile0IsNotPartOfThePackageAndWontBeLoaded = 3001,
|
|
282
284
|
ProgramWithoutMainPackageCannotBeCompiled = 3002,
|
|
@@ -10,11 +10,6 @@ export declare const customRequests: {
|
|
|
10
10
|
displayFileSystemTree: CustomRequestType<DisplayFileSystemTreeParams, string | null>;
|
|
11
11
|
createOrUpdateSourceFile: CustomRequestType<CreateOrUpdateSourceFileParams, void>;
|
|
12
12
|
deleteSourceFile: CustomRequestType<DeleteSourceFileParams, void>;
|
|
13
|
-
getNodeRange: CustomRequestType<GetNodeRangeParams, ls.Range | null>;
|
|
14
|
-
assignField: CustomRequestType<AssignFieldParams, void>;
|
|
15
|
-
addBlocksToScript: CustomRequestType<AddBlocksToScriptParams, void>;
|
|
16
|
-
canDeleteBlocksFromScript: CustomRequestType<CanDeleteBlocksFromScriptParams, boolean>;
|
|
17
|
-
deleteBlocksFromScript: CustomRequestType<DeleteBlocksFromScriptParams, void>;
|
|
18
13
|
};
|
|
19
14
|
export type GetLocalesAvailableForTranslationParams = {
|
|
20
15
|
textDocument: ls.TextDocumentIdentifier;
|
|
@@ -62,54 +57,4 @@ export type CreateOrUpdateSourceFileParams = {
|
|
|
62
57
|
export type DeleteSourceFileParams = {
|
|
63
58
|
uri: ls.DocumentUri;
|
|
64
59
|
};
|
|
65
|
-
/**
|
|
66
|
-
* Uri файла, в фрагменте которого указан путь к синтаксическому узлу.
|
|
67
|
-
*
|
|
68
|
-
* Пример: `file:///path/Program.art#1.0.1`
|
|
69
|
-
*/
|
|
70
|
-
export type SyntaxNodeUri = ls.DocumentUri;
|
|
71
|
-
export type GetNodeRangeParams = {
|
|
72
|
-
uri: SyntaxNodeUri;
|
|
73
|
-
};
|
|
74
|
-
export type AssignFieldParams = {
|
|
75
|
-
/**
|
|
76
|
-
* Путь к узлу функции, в котором нужно расположить присваивание.
|
|
77
|
-
*/
|
|
78
|
-
scriptFunctionUri: SyntaxNodeUri;
|
|
79
|
-
/**
|
|
80
|
-
* Имя поля.
|
|
81
|
-
*/
|
|
82
|
-
fieldName: string;
|
|
83
|
-
/**
|
|
84
|
-
* Выражение, которое необходимо присвоить.
|
|
85
|
-
*
|
|
86
|
-
* Пример: `"текст"`, `1`, `да`
|
|
87
|
-
*/
|
|
88
|
-
value: string;
|
|
89
|
-
/**
|
|
90
|
-
* Путь к синтаксическому узлу, соответствующему месту последнего присваивания значения.
|
|
91
|
-
*/
|
|
92
|
-
lastAssignmentNodeUri?: SyntaxNodeUri;
|
|
93
|
-
};
|
|
94
|
-
export type AddBlocksToScriptParams = ScriptBlocksAddedToOuterScript[];
|
|
95
|
-
export type ScriptBlocksAddedToOuterScript = {
|
|
96
|
-
outerScriptFunctionUri: SyntaxNodeUri;
|
|
97
|
-
values: AddedScriptBlock[];
|
|
98
|
-
};
|
|
99
|
-
export type AddedScriptBlock = {
|
|
100
|
-
name: string;
|
|
101
|
-
key: string;
|
|
102
|
-
areaIndex?: string;
|
|
103
|
-
elementProperties?: {
|
|
104
|
-
[T in string]: string;
|
|
105
|
-
};
|
|
106
|
-
nestedBlocks?: AddedScriptBlock[];
|
|
107
|
-
};
|
|
108
|
-
export type CanDeleteBlocksFromScriptParams = {
|
|
109
|
-
outerScriptFunctionUri: SyntaxNodeUri;
|
|
110
|
-
scriptFunctionUris: SyntaxNodeUri[];
|
|
111
|
-
};
|
|
112
|
-
export type DeleteBlocksFromScriptParams = {
|
|
113
|
-
scriptFunctionUris: SyntaxNodeUri[];
|
|
114
|
-
};
|
|
115
60
|
export {};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import * as ls from 'vscode-languageserver';
|
|
2
|
+
import { Analyzer } from '../analysis/Analyzer.js';
|
|
2
3
|
import { CancellationToken, Uri } from '../common/index.js';
|
|
4
|
+
import { SourceFile } from '../project/index.js';
|
|
3
5
|
import { PackageContent } from '../project/PackageContent.js';
|
|
4
6
|
import { TypeScriptLibrariesProvider } from '../ts-interop/TsLibrariesProvider.js';
|
|
5
|
-
import {
|
|
7
|
+
import { LanguageServerMessageHandler } from './LanguageServerMessageHandler.js';
|
|
8
|
+
import { CompilationController, WorkspaceFileSystem } from './workspace/index.js';
|
|
6
9
|
export declare class LanguageServer {
|
|
7
10
|
static readonly DefaultCancellationTokenThrottleTime = 50;
|
|
8
11
|
private readonly connection;
|
|
@@ -16,6 +19,7 @@ export declare class LanguageServer {
|
|
|
16
19
|
private workspaceDiagnosticsPartialResultToken;
|
|
17
20
|
private fileSystemUpdateNotificationsPublisher;
|
|
18
21
|
private manuallyUpdatedFileSystemTreeProvider;
|
|
22
|
+
private messageHandlerContext;
|
|
19
23
|
private readonly sourceFileItemsService;
|
|
20
24
|
private readonly workspaceItemsService;
|
|
21
25
|
private definitionServiceA;
|
|
@@ -32,9 +36,9 @@ export declare class LanguageServer {
|
|
|
32
36
|
private readonly signatureHelpServiceA;
|
|
33
37
|
private readonly fileSystemTreeDisplayService;
|
|
34
38
|
private readonly selectionRangeServiceA;
|
|
35
|
-
private readonly scriptEditingServiceA;
|
|
36
39
|
private readonly codeActionsServiceA;
|
|
37
40
|
constructor(config: LanguageServerConfig);
|
|
41
|
+
registerMessageHandler(handler: LanguageServerMessageHandler): void;
|
|
38
42
|
start(): void;
|
|
39
43
|
dispose(): void;
|
|
40
44
|
private onInitialize;
|
|
@@ -60,13 +64,8 @@ export declare class LanguageServer {
|
|
|
60
64
|
private onHover;
|
|
61
65
|
private convertSourceFileItemKind;
|
|
62
66
|
private convertDiagnostic;
|
|
63
|
-
private onAssignField;
|
|
64
|
-
private onAddBlocksToScript;
|
|
65
|
-
private onCanDeleteBlocksFromScript;
|
|
66
|
-
private onDeleteBlocksFromScript;
|
|
67
67
|
private convertSourceFileEdit;
|
|
68
68
|
private convertSourceFileEditsToWorkspaceEdit;
|
|
69
|
-
private onGetNodeRange;
|
|
70
69
|
private onCreateOrUpdateSourceFile;
|
|
71
70
|
private onDeleteSourceFile;
|
|
72
71
|
private onDisplayFileSystemTree;
|
|
@@ -99,6 +98,7 @@ export declare class LanguageServer {
|
|
|
99
98
|
private getSourceFileContext;
|
|
100
99
|
private convertUriToVscodeUri;
|
|
101
100
|
private convertVscodeUriToUri;
|
|
101
|
+
private getOrCreateMessageHandlerContext;
|
|
102
102
|
private createCancellationToken;
|
|
103
103
|
private withTaskController;
|
|
104
104
|
}
|
|
@@ -136,3 +136,9 @@ export declare class ClientCancellationToken implements CancellationToken {
|
|
|
136
136
|
constructor(token: ls.CancellationToken);
|
|
137
137
|
throwIfCancellationRequested(): void;
|
|
138
138
|
}
|
|
139
|
+
export declare class SourceFileContext {
|
|
140
|
+
readonly compilationController: CompilationController;
|
|
141
|
+
readonly analyzer: Analyzer;
|
|
142
|
+
readonly sourceFile: SourceFile;
|
|
143
|
+
constructor(compilationController: CompilationController, analyzer: Analyzer, sourceFile: SourceFile);
|
|
144
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as ls from 'vscode-languageserver';
|
|
2
|
+
import { URI } from 'vscode-uri';
|
|
3
|
+
import { Range, TaskController, Uri } from '../common/index.js';
|
|
4
|
+
import { SourceFile } from '../project/SourceFile.js';
|
|
5
|
+
import { SourceFileContext } from './LanguageServer.js';
|
|
6
|
+
import { SourceFileEdit } from './common/Types.js';
|
|
7
|
+
import { Workspace } from './workspace/Workspace.js';
|
|
8
|
+
export type LanguageServerMessageHandler = LanguageServerRequestHandler<any, any> | LanguageServerNotificationHandler<any>;
|
|
9
|
+
export interface LanguageServerRequestHandler<TParams, TResult> {
|
|
10
|
+
readonly kind: 'request';
|
|
11
|
+
readonly requestType: ls.RequestType<TParams, TResult, void>;
|
|
12
|
+
readonly onRequest: (params: TParams, context: MessageHandlerContext, taskController: TaskController) => Promise<RequestResult<TResult>>;
|
|
13
|
+
}
|
|
14
|
+
export interface LanguageServerNotificationHandler<TParams> {
|
|
15
|
+
readonly kind: 'notification';
|
|
16
|
+
readonly notificationType: ls.NotificationType<TParams>;
|
|
17
|
+
readonly onNotification: (params: TParams, context: MessageHandlerContext, taskController: TaskController) => Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
export interface MessageHandlerContext {
|
|
20
|
+
readonly connection: ls.Connection;
|
|
21
|
+
readonly workspace: Workspace;
|
|
22
|
+
getSourceFileContext(vscodeUri: URI, taskController: TaskController): Promise<SourceFileContext | undefined>;
|
|
23
|
+
convertUriToVscodeUri(uri: Uri): URI;
|
|
24
|
+
convertVscodeUriToUri(uri: URI): Uri;
|
|
25
|
+
convertSourceFileRange(sourceFile: SourceFile, range: Range): ls.Range;
|
|
26
|
+
convertSourceFileEdit(edit: SourceFileEdit): ls.TextDocumentEdit;
|
|
27
|
+
convertSourceFileEditsToWorkspaceEdit(edits: readonly SourceFileEdit[]): ls.WorkspaceEdit;
|
|
28
|
+
}
|
|
29
|
+
type RequestResult<TResult> = TResult extends null ? undefined : TResult;
|
|
30
|
+
export {};
|