@artel/artc 0.6.25277 → 0.6.25279
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 +14 -20
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +609 -565
- package/build/{chunk-QK3TWMY2.js → chunk-65GDIOT3.js} +20 -24
- package/build/{chunk-DKZTCPRN.js → chunk-C4HHHOM5.js} +15 -15
- package/build/{chunk-EVYL6VFM.js → chunk-HPU7DXMO.js} +2235 -1500
- package/build/types/analysis/AccessedFunction.d.ts +3 -3
- package/build/types/analysis/AnalyzedTextTranslationPackage.d.ts +2 -2
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +11 -8
- package/build/types/analysis/Analyzer.d.ts +23 -19
- package/build/types/analysis/DeclarationsUsageCounter.d.ts +2 -2
- package/build/types/analysis/{DiagnosticCollector.d.ts → SourceFileAnalyzer.d.ts} +4 -5
- package/build/types/analysis/SourcePackageDependencyGraph.d.ts +2 -2
- package/build/types/analysis/SubstitutedFunction.d.ts +3 -3
- package/build/types/analysis/TranslatedEntityNameConflictsValidator.d.ts +28 -0
- package/build/types/analysis/Translation.d.ts +1 -2
- package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +1 -1
- package/build/types/analysis/UserDefinableUnaryOperatorResolver.d.ts +1 -1
- package/build/types/analysis/index.d.ts +1 -1
- package/build/types/analysis/semantic-context/Declarations.d.ts +3 -3
- package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +2 -2
- package/build/types/api/Api.d.ts +1 -1
- package/build/types/api/ApiServices.d.ts +1 -1
- package/build/types/common/TaskController.d.ts +14 -0
- package/build/types/common/TreeTraversal.d.ts +10 -9
- package/build/types/common/index.d.ts +1 -5
- package/build/types/diagnostic/DiagnosticCode.d.ts +5 -1
- package/build/types/{common → diagnostic}/WithDiagnostics.d.ts +1 -1
- package/build/types/emitter/Emitter.d.ts +3 -3
- package/build/types/emitter/EmitterContext.d.ts +1 -1
- package/build/types/emitter/EntityMap.d.ts +1 -1
- package/build/types/entities/Entity.d.ts +3 -1
- package/build/types/entities/EntityNaming.d.ts +2 -0
- package/build/types/entities/interfaces/FunctionEntity.d.ts +19 -6
- package/build/types/entities/interfaces/TypeParameterEntity.d.ts +2 -2
- package/build/types/entities/intrinsic/IntrinsicFunctionEntity.d.ts +3 -1
- package/build/types/entities/source/SourceFunctionEntity.d.ts +86 -5
- package/build/types/entities/source/SourceVariableEntity.d.ts +3 -1
- package/build/types/entities/translated/TranslatedAliasTypeEntity.d.ts +0 -1
- package/build/types/entities/translated/TranslatedConstructorEntity.d.ts +1 -1
- package/build/types/entities/translated/TranslatedFunctionEntity.d.ts +29 -14
- package/build/types/entities/translated/TranslatedFunctionTypeEntity.d.ts +0 -1
- package/build/types/entities/translated/TranslatedIndexerEntity.d.ts +19 -9
- package/build/types/entities/translated/TranslatedOperatorEntity.d.ts +21 -10
- package/build/types/entities/translated/TranslatedPackageEntity.d.ts +0 -2
- package/build/types/entities/translated/TranslatedStructuredTypeEntity.d.ts +0 -1
- package/build/types/entities/translated/TranslatedVariantTypeEntity.d.ts +0 -1
- package/build/types/executor/Compiler.d.ts +6 -6
- package/build/types/executor/NodeCompiler.d.ts +6 -6
- package/build/types/project/CompilationLoader.d.ts +5 -5
- package/build/types/project/FileSystemTree.d.ts +1 -1
- package/build/types/project/PackageContentCreator.d.ts +2 -1
- package/build/types/services/{CustomCommand.d.ts → CustomRequests.d.ts} +20 -51
- package/build/types/services/DefinitionService.d.ts +2 -2
- package/build/types/services/DeleteBlockFromScriptService.d.ts +6 -0
- package/build/types/services/DisplayService.d.ts +22 -7
- package/build/types/services/DocumentHighlightsService.d.ts +2 -2
- package/build/types/services/LanguageServer.d.ts +4 -3
- package/build/types/services/NodeSemanticInfo.d.ts +1 -6
- package/build/types/services/ReferencesService.d.ts +3 -3
- package/build/types/services/RenameService.d.ts +2 -2
- package/build/types/services/SemanticTokensService.d.ts +4 -4
- package/build/types/services/source-generation/SourceGenerationService.d.ts +6 -5
- package/build/types/services/workspace/CompilationController.d.ts +7 -5
- package/build/types/services/workspace/FileSystemTreeProviderBasedOnWatchedFileSystem.d.ts +2 -2
- package/build/types/services/workspace/ManuallyUpdatedFileSystemTreeProvider.d.ts +2 -2
- package/build/types/services/workspace/Workspace.d.ts +3 -5
- package/build/types/services/workspace/WorkspaceFiles.d.ts +3 -3
- package/build/types/ts-interop/Entities.d.ts +3 -0
- package/package.json +1 -1
- package/build/types/common/Delayed.d.ts +0 -7
- package/build/types/common/ThrottledCancellationToken.d.ts +0 -17
- package/build/types/common/YieldExecution.d.ts +0 -1
- /package/build/types/{common → analysis}/TreeQuery.d.ts +0 -0
|
@@ -1,45 +1,18 @@
|
|
|
1
1
|
import * as ls from 'vscode-languageserver';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
* Возвращает `string | null`.
|
|
17
|
-
*/
|
|
18
|
-
provideServerOwnedDocumentContent: string;
|
|
19
|
-
/**
|
|
20
|
-
* Возвращает `EmitCodeToStringResult`.
|
|
21
|
-
*/
|
|
22
|
-
emitCodeToString: string;
|
|
23
|
-
/**
|
|
24
|
-
* Возвращает `string | null`.
|
|
25
|
-
*/
|
|
26
|
-
displayFileSystemTree: string;
|
|
27
|
-
/**
|
|
28
|
-
* Возвращает `void`.
|
|
29
|
-
*/
|
|
30
|
-
createOrUpdateSourceFile: string;
|
|
31
|
-
/**
|
|
32
|
-
* Возвращает `void`.
|
|
33
|
-
*/
|
|
34
|
-
deleteSourceFile: string;
|
|
35
|
-
/**
|
|
36
|
-
* Возвращает `ls.Range | null`.
|
|
37
|
-
*/
|
|
38
|
-
getNodeRange: string;
|
|
39
|
-
/**
|
|
40
|
-
* Возвращает `void`.
|
|
41
|
-
*/
|
|
42
|
-
assignField: string;
|
|
2
|
+
declare class CustomRequestType<P, R> extends ls.RequestType<P, R, void> {
|
|
3
|
+
}
|
|
4
|
+
export declare const customRequests: {
|
|
5
|
+
getLocalesAvailableForTranslation: CustomRequestType<GetLocalesAvailableForTranslationParams, string[] | null>;
|
|
6
|
+
translateSourceFile: CustomRequestType<TranslateSourceFileParams, string | null>;
|
|
7
|
+
provideEvaluatableExpression: CustomRequestType<ProvideEvaluatableExpressionParams, EvaluatableExpression | null>;
|
|
8
|
+
provideServerOwnedDocumentContent: CustomRequestType<ProvideServerOwnedDocumentContentParams, string | null>;
|
|
9
|
+
emitCodeToString: CustomRequestType<EmitCodeToStringParams, EmitCodeToStringResult>;
|
|
10
|
+
displayFileSystemTree: CustomRequestType<DisplayFileSystemTreeParams, string | null>;
|
|
11
|
+
createOrUpdateSourceFile: CustomRequestType<CreateOrUpdateSourceFileParams, void>;
|
|
12
|
+
deleteSourceFile: CustomRequestType<DeleteSourceFileParams, void>;
|
|
13
|
+
getNodeRange: CustomRequestType<GetNodeRangeParams, ls.Range | null>;
|
|
14
|
+
assignField: CustomRequestType<AssignFieldParams, void>;
|
|
15
|
+
deleteBlockFromScript: CustomRequestType<DeleteBlockFromScriptParams, void>;
|
|
43
16
|
};
|
|
44
17
|
export type GetLocalesAvailableForTranslationParams = {
|
|
45
18
|
textDocument: ls.TextDocumentIdentifier;
|
|
@@ -100,7 +73,7 @@ export type AssignFieldParams = {
|
|
|
100
73
|
/**
|
|
101
74
|
* Путь к узлу функции, в котором нужно расположить присваивание.
|
|
102
75
|
*/
|
|
103
|
-
|
|
76
|
+
functionNodeUri: SyntaxNodeUri;
|
|
104
77
|
/**
|
|
105
78
|
* Имя поля.
|
|
106
79
|
*/
|
|
@@ -114,13 +87,9 @@ export type AssignFieldParams = {
|
|
|
114
87
|
/**
|
|
115
88
|
* Путь к синтаксическому узлу, соответствующему месту последнего присваивания значения.
|
|
116
89
|
*/
|
|
117
|
-
|
|
90
|
+
lastAssignmentNodeUri?: SyntaxNodeUri;
|
|
91
|
+
};
|
|
92
|
+
export type DeleteBlockFromScriptParams = {
|
|
93
|
+
functionNodeUri: SyntaxNodeUri;
|
|
118
94
|
};
|
|
119
|
-
export
|
|
120
|
-
export declare function isProvideServerOwnedDocumentContentParams(value: unknown): value is ProvideServerOwnedDocumentContentParams;
|
|
121
|
-
export declare function isEmitCodeToStringParams(value: unknown): value is EmitCodeToStringParams;
|
|
122
|
-
export declare function isDisplayFileSystemTreeParams(value: unknown): value is DisplayFileSystemTreeParams;
|
|
123
|
-
export declare function isCreateOrUpdateSourceFileParams(value: unknown): value is CreateOrUpdateSourceFileParams;
|
|
124
|
-
export declare function isDeleteSourceFileParams(value: unknown): value is DeleteSourceFileParams;
|
|
125
|
-
export declare function isGetNodeRangeParams(value: unknown): value is GetNodeRangeParams;
|
|
126
|
-
export declare function isAssignFieldParams(value: unknown): value is AssignFieldParams;
|
|
95
|
+
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Analyzer } from '../analysis/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { Range, TaskController } from '../common/index.js';
|
|
3
3
|
import { SourceFile } from '../project/index.js';
|
|
4
4
|
import { SourceGenerationService } from './source-generation/SourceGenerationService.js';
|
|
5
5
|
import { SourceLocation } from './Types.js';
|
|
6
6
|
export declare class DefinitionService {
|
|
7
7
|
private readonly sourceGenerationService;
|
|
8
8
|
constructor(sourceGenerationService: SourceGenerationService | undefined);
|
|
9
|
-
getDefinition(analyzer: Analyzer, sourceFile: SourceFile, offset: number,
|
|
9
|
+
getDefinition(analyzer: Analyzer, sourceFile: SourceFile, offset: number, taskController: TaskController): Promise<DefinitionsAndReferenceInfo | undefined>;
|
|
10
10
|
private getDefinitionOfReference;
|
|
11
11
|
private getReferenceTargetSourceLocation;
|
|
12
12
|
private getReferenceTargetEntity;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SubprogramDeclarationOrLiteral } from '../analysis/NodeTypeUtils.js';
|
|
2
|
+
import { SourceFile } from '../project/index.js';
|
|
3
|
+
import { SourceFileEdit } from './Types.js';
|
|
4
|
+
export declare class DeleteBlockFromScriptService {
|
|
5
|
+
createEditDeletingBlock(sourceFile: SourceFile, subprogramDeclaration: SubprogramDeclarationOrLiteral): SourceFileEdit | undefined;
|
|
6
|
+
}
|
|
@@ -27,6 +27,7 @@ export declare class DisplayService {
|
|
|
27
27
|
getParameterDeclarationDisplayParts(parameter: ParameterDeclaration, options?: TypeDisplayOptions): ParameterDeclarationDisplayParts;
|
|
28
28
|
displayFunctionDeclaration(func: FunctionDeclaration): string;
|
|
29
29
|
getFunctionDeclarationDisplayParts(func: FunctionDeclaration): FunctionDeclarationDisplayParts;
|
|
30
|
+
displayAnonymousFunctionDeclaration(func: AnonymousFunctionDeclaration): string;
|
|
30
31
|
displayOperatorDeclaration(operator: OperatorDeclaration): string;
|
|
31
32
|
getOperatorDeclarationDisplayParts(operator: OperatorDeclaration): OperatorDeclarationDisplayParts;
|
|
32
33
|
displayOperatorKind(kind: e.OperatorKind): string;
|
|
@@ -111,9 +112,9 @@ interface IVariableDeclaration {
|
|
|
111
112
|
export type FunctionDeclaration = FunctionDeclaration_entity | FunctionDeclaration_typeMember | FunctionDeclaration_substitutedFunction | FunctionDeclaration_accessedFunction;
|
|
112
113
|
export declare class FunctionDeclaration_entity implements IFunctionDeclaration {
|
|
113
114
|
readonly kind = "entity";
|
|
114
|
-
readonly func: e.
|
|
115
|
-
constructor(func: e.
|
|
116
|
-
getEntity(): e.
|
|
115
|
+
readonly func: e.NamedFunctionEntity;
|
|
116
|
+
constructor(func: e.NamedFunctionEntity);
|
|
117
|
+
getEntity(): e.NamedFunctionEntity;
|
|
117
118
|
getTypeParameterValues(): readonly TypeParameterValue[];
|
|
118
119
|
getParameters(): readonly ParameterDeclaration[];
|
|
119
120
|
getReturnType(): types.Type;
|
|
@@ -124,7 +125,7 @@ export declare class FunctionDeclaration_typeMember implements IFunctionDeclarat
|
|
|
124
125
|
readonly kind = "type-member";
|
|
125
126
|
readonly func: types.Method;
|
|
126
127
|
constructor(func: types.Method);
|
|
127
|
-
getEntity(): e.
|
|
128
|
+
getEntity(): e.NamedFunctionEntity;
|
|
128
129
|
getTypeParameterValues(): readonly TypeParameterValue[];
|
|
129
130
|
getParameters(): readonly ParameterDeclaration[];
|
|
130
131
|
getReturnType(): types.Type;
|
|
@@ -135,7 +136,7 @@ export declare class FunctionDeclaration_substitutedFunction implements IFunctio
|
|
|
135
136
|
readonly func: SubstitutedFunction;
|
|
136
137
|
readonly kind = "substituted-function";
|
|
137
138
|
constructor(func: SubstitutedFunction);
|
|
138
|
-
getEntity(): e.
|
|
139
|
+
getEntity(): e.NamedFunctionEntity;
|
|
139
140
|
getTypeParameterValues(): readonly TypeParameterValue[];
|
|
140
141
|
getParameters(): readonly ParameterDeclaration[];
|
|
141
142
|
getReturnType(): types.Type;
|
|
@@ -146,7 +147,7 @@ export declare class FunctionDeclaration_accessedFunction implements IFunctionDe
|
|
|
146
147
|
readonly func: AccessedFunction;
|
|
147
148
|
readonly kind = "accessed-function";
|
|
148
149
|
constructor(func: AccessedFunction);
|
|
149
|
-
getEntity(): e.
|
|
150
|
+
getEntity(): e.NamedFunctionEntity;
|
|
150
151
|
getTypeParameterValues(): readonly TypeParameterValue[];
|
|
151
152
|
getParameters(): readonly ParameterDeclaration[];
|
|
152
153
|
getReturnType(): types.Type;
|
|
@@ -154,13 +155,27 @@ export declare class FunctionDeclaration_accessedFunction implements IFunctionDe
|
|
|
154
155
|
getContainer(analyzer: Analyzer | undefined): DeclarationContainer | undefined;
|
|
155
156
|
}
|
|
156
157
|
interface IFunctionDeclaration {
|
|
157
|
-
getEntity(): e.
|
|
158
|
+
getEntity(): e.NamedFunctionEntity;
|
|
158
159
|
getTypeParameterValues(): readonly TypeParameterValue[];
|
|
159
160
|
getParameters(): readonly ParameterDeclaration[];
|
|
160
161
|
getReturnType(): types.Type;
|
|
161
162
|
isAsync(): boolean;
|
|
162
163
|
getContainer(analyzer: Analyzer | undefined): DeclarationContainer | undefined;
|
|
163
164
|
}
|
|
165
|
+
export type AnonymousFunctionDeclaration = AnonymousFunctionDeclaration_entity;
|
|
166
|
+
export declare class AnonymousFunctionDeclaration_entity implements IAnonymousFunctionDeclaration {
|
|
167
|
+
readonly kind = "entity";
|
|
168
|
+
readonly func: e.AnonymousFunctionEntity;
|
|
169
|
+
constructor(func: e.AnonymousFunctionEntity);
|
|
170
|
+
getParameters(): readonly ParameterDeclaration[];
|
|
171
|
+
getReturnType(): types.Type;
|
|
172
|
+
isAsync(): boolean;
|
|
173
|
+
}
|
|
174
|
+
interface IAnonymousFunctionDeclaration {
|
|
175
|
+
getParameters(): readonly ParameterDeclaration[];
|
|
176
|
+
getReturnType(): types.Type;
|
|
177
|
+
isAsync(): boolean;
|
|
178
|
+
}
|
|
164
179
|
export type ConstructorDeclaration = ConstructorDeclaration_entity | ConstructorDeclaration_typeMember;
|
|
165
180
|
export declare class ConstructorDeclaration_entity implements IConstructorDeclaration {
|
|
166
181
|
readonly kind = "type-member";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Analyzer } from '../analysis/index.js';
|
|
2
|
-
import { Range,
|
|
2
|
+
import { Range, TaskController } from '../common/index.js';
|
|
3
3
|
import { SourceFile } from '../project/index.js';
|
|
4
4
|
export declare class DocumentHighlightsService {
|
|
5
5
|
private readonly referencesService;
|
|
6
|
-
getDocumentHighlights(analyzer: Analyzer, sourceFile: SourceFile, offset: number,
|
|
6
|
+
getDocumentHighlights(analyzer: Analyzer, sourceFile: SourceFile, offset: number, taskController: TaskController | undefined): Promise<Highlight[]>;
|
|
7
7
|
private static referenceKindToHighlightKind;
|
|
8
8
|
}
|
|
9
9
|
export declare class Highlight {
|
|
@@ -33,6 +33,7 @@ export declare class LanguageServer {
|
|
|
33
33
|
private readonly fileSystemTreeDisplayService;
|
|
34
34
|
private readonly selectionRangeService;
|
|
35
35
|
private readonly assignFieldService;
|
|
36
|
+
private readonly deleteBlockFromScriptService;
|
|
36
37
|
private readonly codeActionsService;
|
|
37
38
|
constructor(config: LanguageServerConfig);
|
|
38
39
|
start(): void;
|
|
@@ -59,8 +60,8 @@ export declare class LanguageServer {
|
|
|
59
60
|
private onHover;
|
|
60
61
|
private convertSourceFileItemKind;
|
|
61
62
|
private convertDiagnostic;
|
|
62
|
-
private onExecuteCommand;
|
|
63
63
|
private onAssignField;
|
|
64
|
+
private onDeleteBlockFromScript;
|
|
64
65
|
private convertSourceFileEdit;
|
|
65
66
|
private convertSourceFileEditsToWorkspaceEdit;
|
|
66
67
|
private onGetNodeRange;
|
|
@@ -68,7 +69,7 @@ export declare class LanguageServer {
|
|
|
68
69
|
private onDeleteSourceFile;
|
|
69
70
|
private onDisplayFileSystemTree;
|
|
70
71
|
private onEmitCodeToString;
|
|
71
|
-
private
|
|
72
|
+
private onProvideServerOwnedDocumentContent;
|
|
72
73
|
private onProvideEvaluatableExpression;
|
|
73
74
|
private onCompletion;
|
|
74
75
|
private onCompletionResolve;
|
|
@@ -97,7 +98,7 @@ export declare class LanguageServer {
|
|
|
97
98
|
private convertUriToVscodeUri;
|
|
98
99
|
private convertVscodeUriToUri;
|
|
99
100
|
private createCancellationToken;
|
|
100
|
-
private
|
|
101
|
+
private withTaskController;
|
|
101
102
|
}
|
|
102
103
|
export interface LanguageServerConfig {
|
|
103
104
|
readonly connection: ls.Connection;
|
|
@@ -48,7 +48,7 @@ export type NodeSemanticInfoServiceOptions = {
|
|
|
48
48
|
readonly preferredTargetOfExplicitConstructorCall: 'type-declaration' | 'constructor-declaration';
|
|
49
49
|
readonly includeBetterReferenceTargets: boolean;
|
|
50
50
|
};
|
|
51
|
-
export type NodeSemanticInfo = DefinitionNodeSemanticInfo | ReferenceNodeSemanticInfo | DefaultSwitchMatchNodeSemanticInfo
|
|
51
|
+
export type NodeSemanticInfo = DefinitionNodeSemanticInfo | ReferenceNodeSemanticInfo | DefaultSwitchMatchNodeSemanticInfo;
|
|
52
52
|
export declare class DefinitionNodeSemanticInfo {
|
|
53
53
|
readonly entity: Entity;
|
|
54
54
|
readonly kind = "definition";
|
|
@@ -147,9 +147,4 @@ export declare class DefaultSwitchMatchNodeSemanticInfo {
|
|
|
147
147
|
readonly kind = "default-switch-match";
|
|
148
148
|
constructor(type: types.Type);
|
|
149
149
|
}
|
|
150
|
-
export declare class RegularOrBlockFunctionLiteralNodeSemanticInfo {
|
|
151
|
-
readonly type: types.Type;
|
|
152
|
-
readonly kind = "regular-or-block-function-literal";
|
|
153
|
-
constructor(type: types.Type);
|
|
154
|
-
}
|
|
155
150
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Analyzer } from '../analysis/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { Range, TaskController } from '../common/index.js';
|
|
3
3
|
import { SourceFile } from '../project/index.js';
|
|
4
4
|
export declare class ReferencesService {
|
|
5
|
-
getReferencesInCompilation(analyzer: Analyzer, sourceFile: SourceFile, offset: number, options: ReferencesSearchOptions,
|
|
6
|
-
getReferencesInFiles(analyzer: Analyzer, sourceFile: SourceFile, offset: number, sourceFiles: Iterable<SourceFile>, options: ReferencesSearchOptions,
|
|
5
|
+
getReferencesInCompilation(analyzer: Analyzer, sourceFile: SourceFile, offset: number, options: ReferencesSearchOptions, taskController: TaskController | undefined): Promise<Reference[]>;
|
|
6
|
+
getReferencesInFiles(analyzer: Analyzer, sourceFile: SourceFile, offset: number, sourceFiles: Iterable<SourceFile>, options: ReferencesSearchOptions, taskController: TaskController | undefined): Promise<Reference[]>;
|
|
7
7
|
private getReferencedDefinitionInfosAtOffset;
|
|
8
8
|
private getDefinitionsFromNodeSemanticInfo;
|
|
9
9
|
private getReferenceRestrictions;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Analyzer } from '../analysis/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { Range, TaskController } from '../common/index.js';
|
|
3
3
|
import { SourceFile } from '../project/index.js';
|
|
4
4
|
export declare class RenameService {
|
|
5
5
|
private readonly referencesService;
|
|
6
6
|
prepareRename(analyzer: Analyzer, sourceFile: SourceFile, offset: number): Range | undefined;
|
|
7
|
-
rename(analyzer: Analyzer, sourceFile: SourceFile, offset: number, newText: string,
|
|
7
|
+
rename(analyzer: Analyzer, sourceFile: SourceFile, offset: number, newText: string, taskController: TaskController | undefined): Promise<Rename[]>;
|
|
8
8
|
private canRename;
|
|
9
9
|
private entityCanBeRenamed;
|
|
10
10
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Analyzer } from '../analysis/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { Range, TaskController } from '../common/index.js';
|
|
3
3
|
import { SourceFile } from '../project/index.js';
|
|
4
4
|
export declare class SemanticTokensService {
|
|
5
|
-
getSemanticTokens(analyzer: Analyzer, sourceFile: SourceFile,
|
|
6
|
-
getSemanticTokensInRange(analyzer: Analyzer, sourceFile: SourceFile, range: Range,
|
|
5
|
+
getSemanticTokens(analyzer: Analyzer, sourceFile: SourceFile, taskController: TaskController | undefined): Promise<SemanticToken[]>;
|
|
6
|
+
getSemanticTokensInRange(analyzer: Analyzer, sourceFile: SourceFile, range: Range, taskController: TaskController | undefined): Promise<SemanticToken[]>;
|
|
7
7
|
private rangesOverlap;
|
|
8
|
-
private
|
|
8
|
+
private getSemanticTokenKindForNamedFunctionEntity;
|
|
9
9
|
private isCapitalizedName;
|
|
10
10
|
}
|
|
11
11
|
export declare class SemanticToken {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ObservableObject } from 'reactronic';
|
|
2
2
|
import { Analyzer } from '../../analysis/Analyzer.js';
|
|
3
|
-
import {
|
|
4
|
-
import { Entity } from '../../entities/index.js';
|
|
3
|
+
import { TaskController } from '../../common/index.js';
|
|
4
|
+
import type { Entity } from '../../entities/index.js';
|
|
5
5
|
import { PackageContent } from '../../project/PackageContent.js';
|
|
6
6
|
import { TypeScriptLibrariesProvider } from '../../ts-interop/TsLibrariesProvider.js';
|
|
7
7
|
import { SourceLocation } from '../Types.js';
|
|
@@ -11,13 +11,14 @@ export declare class SourceGenerationService extends ObservableObject {
|
|
|
11
11
|
private readonly tsLibrariesProvider;
|
|
12
12
|
private readonly standardPackageContentsProviders;
|
|
13
13
|
private readonly generatedPackageStates;
|
|
14
|
+
private packagesToDeleteAfterFileIsClosed;
|
|
15
|
+
private nextId;
|
|
14
16
|
get compilationControllers(): readonly CompilationController[];
|
|
15
|
-
constructor(trackedSourceFiles: ReadonlyClientTrackedSourceFiles, tsLibrariesProvider: TypeScriptLibrariesProvider, standardPackageContentsProviders: (
|
|
16
|
-
getDefinitionInGeneratedCode(analyzer: Analyzer, entity: Entity,
|
|
17
|
+
constructor(trackedSourceFiles: ReadonlyClientTrackedSourceFiles, tsLibrariesProvider: TypeScriptLibrariesProvider, standardPackageContentsProviders: (taskController: TaskController) => Promise<readonly PackageContent[] | undefined>);
|
|
18
|
+
getDefinitionInGeneratedCode(analyzer: Analyzer, entity: Entity, taskController: TaskController): Promise<SourceLocation[] | undefined>;
|
|
17
19
|
entityDefinitionRequiresSourceGeneration(entity: Entity): boolean;
|
|
18
20
|
protected onOpenedSourceFilesChanged(): void;
|
|
19
21
|
private getOrGeneratePackageSource;
|
|
20
22
|
private createGeneratedPackageConfiguration;
|
|
21
23
|
private checkIfEntityOfKindIsPresentInGeneratedCode;
|
|
22
|
-
private setDeleteGeneratedPackageTimeout;
|
|
23
24
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Indicator, ObservableObject } from 'reactronic';
|
|
2
2
|
import { Analyzer, TsInteropInputs } from '../../analysis/index.js';
|
|
3
|
-
import {
|
|
3
|
+
import { TaskController, Uri } from '../../common/index.js';
|
|
4
4
|
import { Diagnostic } from '../../diagnostic/Diagnostic.js';
|
|
5
5
|
import { ConvertedConfiguration, ProgramPackageConfiguration, SourceFile, fsTree } from '../../project/index.js';
|
|
6
6
|
import { PackageContent } from '../../project/PackageContent.js';
|
|
@@ -32,6 +32,8 @@ export declare class CompilationController extends ObservableObject {
|
|
|
32
32
|
get configurationControllerByPackageUri(): ReadonlyMap<string, ConfigurationController>;
|
|
33
33
|
get state(): CompilationControllerState;
|
|
34
34
|
constructor(config: CompilationControllerConfig);
|
|
35
|
+
waitFullyLoadedAndConfigsProcessed(taskController: TaskController): Promise<void>;
|
|
36
|
+
hasAllConfigsProcessed(): boolean;
|
|
35
37
|
waitFullyLoaded(): Promise<void>;
|
|
36
38
|
getStateOfCompilationContainingItemAtUri(uri: Uri): Promise<ReadonlyCompilationState | undefined>;
|
|
37
39
|
notifyReportedSourceFileDiagnostics(uri: Uri, compilationVersion: number): void;
|
|
@@ -90,10 +92,10 @@ export declare class ReadonlyCompilationState {
|
|
|
90
92
|
readonly version: number;
|
|
91
93
|
private diagnosticsCollectionSummaryByUri;
|
|
92
94
|
constructor(analyzer: Analyzer, version: number);
|
|
93
|
-
collectSourceFileDiagnosticsWithHighPriority(sourceFile: SourceFile,
|
|
94
|
-
collectSourceFileDiagnosticsWithLowPriority(sourceFile: SourceFile,
|
|
95
|
-
getDiagnosticsCollectionSummary(sourceFile: SourceFile,
|
|
96
|
-
private
|
|
95
|
+
collectSourceFileDiagnosticsWithHighPriority(sourceFile: SourceFile, taskController: TaskController): Promise<readonly Diagnostic[]>;
|
|
96
|
+
collectSourceFileDiagnosticsWithLowPriority(sourceFile: SourceFile, taskController: TaskController): Promise<readonly Diagnostic[]>;
|
|
97
|
+
getDiagnosticsCollectionSummary(sourceFile: SourceFile, taskController: TaskController): Promise<DiagnosticsCollectionSummary>;
|
|
98
|
+
private analyzeSourceFile;
|
|
97
99
|
private createDiagnosticsCollectionSummary;
|
|
98
100
|
}
|
|
99
101
|
export declare class DiagnosticsCollectionSummary {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ObservableArray, ObservableMap, ObservableObject } from 'reactronic';
|
|
2
|
-
import {
|
|
2
|
+
import { TaskController, Uri } from '../../common/index.js';
|
|
3
3
|
import * as fsTree from '../../project/FileSystemTree.js';
|
|
4
4
|
import { ReadonlyClientTrackedSourceFiles } from './ClientTrackedSourceFiles.js';
|
|
5
5
|
import { FileSystemTreeProvider } from './WorkspaceFiles.js';
|
|
@@ -25,7 +25,7 @@ export declare class FileSystemTreeProviderBasedOnWatchedFileSystem extends Obse
|
|
|
25
25
|
private readonly loadedDirectoryUris;
|
|
26
26
|
constructor(fileSystem: WorkspaceFileSystem, notificationsPublisher: FileSystemUpdateNotificationsPublisher, namesOfDirectoriesToIgnore?: string[], additionalUrisOfDirectoriesToLoad?: readonly Uri[]);
|
|
27
27
|
initialize(workspaceFolderUris: ObservableArray<Uri>, trackedSourceFiles: ReadonlyClientTrackedSourceFiles): void;
|
|
28
|
-
waitLoaded(
|
|
28
|
+
waitLoaded(taskController: TaskController | undefined): Promise<void>;
|
|
29
29
|
dispose(): void;
|
|
30
30
|
protected onTrackedSourceFilesUpdated(): void;
|
|
31
31
|
protected onWorkspaceFolderUrisUpdated(): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ObservableArray, ObservableMap, ObservableObject } from 'reactronic';
|
|
2
|
-
import { CancellationToken } from '../../common/CancellationToken.js';
|
|
3
2
|
import { Uri } from '../../common/Uri.js';
|
|
4
3
|
import * as fsTree from '../../project/FileSystemTree.js';
|
|
5
4
|
import { ReadonlyClientTrackedSourceFiles } from './ClientTrackedSourceFiles.js';
|
|
6
5
|
import { FileSystemTreeProvider } from './WorkspaceFiles.js';
|
|
6
|
+
import { TaskController } from '../../common/TaskController.js';
|
|
7
7
|
export declare class ManuallyUpdatedFileSystemTreeProvider extends ObservableObject implements FileSystemTreeProvider {
|
|
8
8
|
readonly fileSystemTree: fsTree.FileSystemTree;
|
|
9
9
|
readonly loadedWorkspaceFolderByUri: ObservableMap<string, fsTree.Directory>;
|
|
@@ -12,7 +12,7 @@ export declare class ManuallyUpdatedFileSystemTreeProvider extends ObservableObj
|
|
|
12
12
|
private readonly lastCheckedTrackedSourceFileInfoByUri;
|
|
13
13
|
private readonly manuallyCreatedSourceFileTextByUri;
|
|
14
14
|
initialize(workspaceFolderUris: ObservableArray<Uri>, trackedSourceFiles: ReadonlyClientTrackedSourceFiles): void;
|
|
15
|
-
waitLoaded(
|
|
15
|
+
waitLoaded(_taskController: TaskController | undefined): Promise<void>;
|
|
16
16
|
dispose(): void;
|
|
17
17
|
createOrUpdateSourceFile(uri: Uri, text: string): void;
|
|
18
18
|
deleteSourceFile(uri: Uri): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ObservableMap, ObservableObject } from 'reactronic';
|
|
2
2
|
import { Analyzer } from '../../analysis/index.js';
|
|
3
|
-
import {
|
|
3
|
+
import { TaskController, Uri } from '../../common/index.js';
|
|
4
4
|
import * as fsTree from '../../project/FileSystemTree.js';
|
|
5
5
|
import { SourceFile, SourcePackage } from '../../project/index.js';
|
|
6
6
|
import { PackageContent } from '../../project/PackageContent.js';
|
|
@@ -32,8 +32,8 @@ export declare class Workspace extends ObservableObject {
|
|
|
32
32
|
notifyUpdatedTextDocument(uri: Uri, textOrEditor: string | ((text: string) => string), version: number): void;
|
|
33
33
|
notifySavedTextDocument(uri: Uri): void;
|
|
34
34
|
notifyClosedTextDocument(uri: Uri): void;
|
|
35
|
-
waitLoadedAndGetWorkspaceElementInfo(uri: Uri,
|
|
36
|
-
getStandardPackageContents(
|
|
35
|
+
waitLoadedAndGetWorkspaceElementInfo(uri: Uri, taskController: TaskController): Promise<WorkspaceElementInfo | undefined>;
|
|
36
|
+
getStandardPackageContents(taskController: TaskController): Promise<readonly PackageContent[] | undefined>;
|
|
37
37
|
dispose(): void;
|
|
38
38
|
protected updateCompilationControllers(): void;
|
|
39
39
|
protected processControllersWithUnprocessedConfigs(): Promise<void>;
|
|
@@ -42,8 +42,6 @@ export declare class Workspace extends ObservableObject {
|
|
|
42
42
|
private deleteCompilationController;
|
|
43
43
|
private createCompilationController;
|
|
44
44
|
private getControllerToLoad;
|
|
45
|
-
private isCompilationControllerStateWithProcessedConfigs;
|
|
46
|
-
private waitForControllerToFullyLoad;
|
|
47
45
|
}
|
|
48
46
|
export interface WorkspaceElementInfo {
|
|
49
47
|
compilationController: CompilationController;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ObservableArray, ObservableMap, ObservableObject } from 'reactronic';
|
|
2
|
-
import {
|
|
2
|
+
import { Uri, TaskController } from '../../common/index.js';
|
|
3
3
|
import * as fsTree from '../../project/FileSystemTree.js';
|
|
4
4
|
import { ClientTrackedSourceFiles, ReadonlyClientTrackedSourceFiles } from './ClientTrackedSourceFiles.js';
|
|
5
5
|
export declare class WorkspaceFiles extends ObservableObject {
|
|
@@ -19,7 +19,7 @@ export declare class WorkspaceFiles extends ObservableObject {
|
|
|
19
19
|
updateTrackedSourceFile(uri: Uri, textOrEditor: string | ((text: string) => string), version: number): void;
|
|
20
20
|
notifyTrackedSourceFileSaved(uri: Uri): void;
|
|
21
21
|
stopTrackingSourceFile(uri: Uri): void;
|
|
22
|
-
waitLoaded(
|
|
22
|
+
waitLoaded(taskController: TaskController): Promise<void>;
|
|
23
23
|
dispose(): void;
|
|
24
24
|
protected updateWorkspaceFolderWithArtelProjectByUri(): void;
|
|
25
25
|
}
|
|
@@ -30,6 +30,6 @@ export interface FileSystemTreeProvider {
|
|
|
30
30
|
* Должен быть вызван до вызова всех остальных методов.
|
|
31
31
|
*/
|
|
32
32
|
initialize(workspaceFolderUris: ObservableArray<Uri>, trackedSourceFiles: ReadonlyClientTrackedSourceFiles): void;
|
|
33
|
-
waitLoaded(
|
|
33
|
+
waitLoaded(taskController: TaskController | undefined): Promise<void>;
|
|
34
34
|
dispose(): void;
|
|
35
35
|
}
|
|
@@ -103,6 +103,7 @@ export declare class TsGlobalFunctionEntity implements PackageFunctionEntity {
|
|
|
103
103
|
private readonly hiding;
|
|
104
104
|
constructor(tsctx: TsInteropContext, symbol: ts.Symbol, isDefaultExport: boolean, declaration: ts.FunctionDeclaration, containingPackage: PackageEntity, forceHiddenInPackage: boolean);
|
|
105
105
|
getName(): Name;
|
|
106
|
+
getNaming(): EntityNaming;
|
|
106
107
|
getContainingPackage(): PackageEntity;
|
|
107
108
|
getTypeParameters(): readonly TypeParameterEntity[];
|
|
108
109
|
getParameters(): readonly ParameterEntity[];
|
|
@@ -457,6 +458,7 @@ export declare class TsMethodEntity implements MethodEntity {
|
|
|
457
458
|
private readonly hiding;
|
|
458
459
|
constructor(tsctx: TsInteropContext, symbol: ts.Symbol, declaration: ts.MethodDeclaration | ts.MethodSignature, containingType: TypeEntityWithMembers, forceStatic: boolean);
|
|
459
460
|
getName(): Name;
|
|
461
|
+
getNaming(): EntityNaming;
|
|
460
462
|
getTypeParameters(): readonly TypeParameterEntity[];
|
|
461
463
|
getParameters(): readonly ParameterEntity[];
|
|
462
464
|
getReturnType(): types.Type;
|
|
@@ -490,6 +492,7 @@ export declare class TsIteratorFunctionEntity implements MethodEntity {
|
|
|
490
492
|
private readonly returnType;
|
|
491
493
|
constructor(tsctx: TsInteropContext, symbol: ts.Symbol, containingType: TypeEntityWithMembers);
|
|
492
494
|
getName(): Name;
|
|
495
|
+
getNaming(): EntityNaming;
|
|
493
496
|
getTypeParameters(): readonly TypeParameterEntity[];
|
|
494
497
|
getParameters(): readonly ParameterEntity[];
|
|
495
498
|
getReturnType(): types.Type;
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { CancellationToken } from './index.js';
|
|
2
|
-
export declare class ThrottledCancellationToken {
|
|
3
|
-
private readonly token;
|
|
4
|
-
private readonly throttleTimeMs;
|
|
5
|
-
private readonly checkThrottleTimeEveryN;
|
|
6
|
-
private checkNumber;
|
|
7
|
-
private lastTimeMs;
|
|
8
|
-
constructor(token: CancellationToken, throttleTimeMs: number, checkThrottleTimeEveryN: number);
|
|
9
|
-
isThrottleTimeOver(): boolean;
|
|
10
|
-
throwIfCancellationRequestedAndReset(): void;
|
|
11
|
-
throwIfCancellationRequestedAndResetAsync(): Promise<void>;
|
|
12
|
-
withOptions(options: ThrottledCancellationTokenOptions): ThrottledCancellationToken;
|
|
13
|
-
}
|
|
14
|
-
export interface ThrottledCancellationTokenOptions {
|
|
15
|
-
throttleTimeMs?: number;
|
|
16
|
-
checkThrottleTimeEveryN?: number;
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function yieldExecution(timeMs?: number): Promise<void>;
|
|
File without changes
|