@artel/artc 0.6.25206 → 0.6.25208
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 +32 -18
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +9964 -9262
- package/build/{chunk-LAJRVDPO.js → chunk-FABHNF5H.js} +8 -6
- package/build/{chunk-EDDZCW2I.js → chunk-LZ4IJBSA.js} +3 -4
- package/build/{chunk-AY3Z4HOX.js → chunk-PNUVVKWZ.js} +38838 -46249
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +10 -7
- package/build/types/analysis/Analyzer.d.ts +27 -10
- package/build/types/analysis/DereferenceExpressionMeaning.d.ts +6 -1
- package/build/types/analysis/DereferencedVariableAccess.d.ts +14 -0
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +2 -5
- package/build/types/analysis/IndexedAccess.d.ts +14 -0
- package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +6 -3
- package/build/types/analysis/ObjectExpressionMeaning.d.ts +2 -2
- package/build/types/analysis/PropertyAccessExpressionMeaning.d.ts +2 -4
- package/build/types/analysis/SemanticContext.d.ts +4 -4
- package/build/types/analysis/VariableAccess.d.ts +6 -2
- package/build/types/analysis/index.d.ts +4 -2
- package/build/types/api/Api.d.ts +2 -2
- package/build/types/common/AccessKind.d.ts +2 -1
- package/build/types/common/Constants.d.ts +1 -1
- package/build/types/common/JavaScriptIdentifier.d.ts +6 -0
- package/build/types/common/Logger.d.ts +1 -0
- package/build/types/common/Name.d.ts +18 -21
- package/build/types/common/Query.d.ts +4 -0
- package/build/types/common/TreeQuery.d.ts +0 -2
- package/build/types/common/index.d.ts +2 -1
- package/build/types/emitter/Emitter.d.ts +50 -16
- package/build/types/emitter/EmitterContext.d.ts +42 -337
- package/build/types/emitter/EmitterGeneratedDeclarationKind.d.ts +55 -17
- package/build/types/emitter/Entities.d.ts +144 -0
- package/build/types/emitter/EntityMap.d.ts +45 -0
- package/build/types/emitter/ExpressionTransformationResult.d.ts +1 -1
- package/build/types/emitter/GeneralLowering.d.ts +4 -68
- package/build/types/emitter/Internal.d.ts +0 -1
- package/build/types/emitter/IrBuilder.d.ts +27 -17
- package/build/types/emitter/IrToJs.d.ts +17 -11
- package/build/types/emitter/StatementTransformationResult.d.ts +5 -2
- package/build/types/emitter/Transformer.d.ts +21 -93
- package/build/types/emitter/ir/AccessedEntities.d.ts +5 -11
- package/build/types/emitter/ir/ComputedAccess.d.ts +19 -0
- package/build/types/emitter/ir/LoweringState.d.ts +25 -0
- package/build/types/emitter/ir/Nodes.d.ts +531 -1109
- package/build/types/emitter/ir/index.d.ts +3 -1
- package/build/types/emitter/ir/types.d.ts +6 -7
- package/build/types/entities/PackageMembers.d.ts +2 -2
- package/build/types/entities/TypeEntityMembers.d.ts +2 -2
- package/build/types/entities/Variants.d.ts +2 -2
- package/build/types/entities/index.d.ts +3 -1
- package/build/types/parser/Scanner.d.ts +1 -0
- package/build/types/project/CompilationLoader.d.ts +17 -22
- package/build/types/project/PackageContent.d.ts +16 -0
- package/build/types/project/PackageContentCreator.d.ts +3 -0
- package/build/types/project/SourceFile.d.ts +1 -1
- package/build/types/project/SourcePackage.d.ts +3 -3
- package/build/types/project/configuration/ConfigurationConverter.d.ts +2 -3
- package/build/types/project/configuration/ConfigurationTranslator.d.ts +23 -0
- package/build/types/project/configuration/PackageConfigurationInterpreter.d.ts +1 -27
- package/build/types/project/index.d.ts +3 -1
- package/build/types/services/AddPropertyAssignmentService.d.ts +2 -2
- package/build/types/services/CodeActionsService.d.ts +22 -0
- package/build/types/services/DefinitionService.d.ts +2 -2
- package/build/types/services/LanguageServer.d.ts +9 -2
- package/build/types/services/NodeSemanticInfo.d.ts +13 -7
- package/build/types/services/ReferencesService.d.ts +1 -3
- package/build/types/services/TranslationsGenerationService.d.ts +7 -0
- package/build/types/services/Types.d.ts +10 -0
- package/build/types/services/source-generation/SourceGenerationService.d.ts +6 -4
- package/build/types/services/workspace/CompilationController.d.ts +4 -3
- package/build/types/services/workspace/FileSystemTreeProviderBasedOnWatchedFileSystem.d.ts +5 -2
- package/build/types/services/workspace/ManuallyUpdatedFileSystemTreeProvider.d.ts +1 -1
- package/build/types/services/workspace/Workspace.d.ts +5 -2
- package/build/types/services/workspace/WorkspaceFiles.d.ts +2 -2
- package/build/types/tree/KeywordKind.d.ts +47 -46
- package/build/types/tree/green/SyntaxToCode.d.ts +4 -3
- package/build/types/ts-interop/TsInteropContext.d.ts +2 -2
- package/build/types/ts-interop/TsPackageMembersCreator.d.ts +3 -3
- package/build/types/ts-interop/Utils.d.ts +39 -33
- package/package.json +4 -5
- package/build/types/analysis/IndexerAccess.d.ts +0 -10
- package/build/types/emitter/EmitterPackage.d.ts +0 -60
- package/build/types/emitter/EntityNameProviders.d.ts +0 -33
- package/build/types/generated/BuiltInSystemPackages.d.ts +0 -3
- package/build/types/old/Executor.d.ts +0 -14
- package/build/types/old/JavaScriptEmittingVisitor.d.ts +0 -1
- package/build/types/old/NzonParser.d.ts +0 -1
- package/build/types/old/NzonScanner.d.ts +0 -1
- package/build/types/old/NzonSyntax.d.ts +0 -1
- package/build/types/old/RemoteWorkspaceFileSystem.d.ts +0 -1
- /package/build/types/{old/JavaScriptEmitter.d.ts → emitter/EmitterContextOld.d.ts} +0 -0
@@ -1,5 +1,7 @@
|
|
1
1
|
export * from './AccessedEntities.js';
|
2
|
+
export * from './ComputedAccess.js';
|
3
|
+
export * from './LoweringOptions.js';
|
4
|
+
export * from './LoweringState.js';
|
2
5
|
export * from './Nodes.js';
|
3
6
|
export * from './SourceLocation.js';
|
4
7
|
export * from './types.js';
|
5
|
-
export * from './LoweringOptions.js';
|
@@ -1,10 +1,9 @@
|
|
1
1
|
import * as ir from './Nodes.js';
|
2
|
-
export type Node = ir.ArrayLiteral | ir.AsExpression | ir.AssertionExpression | ir.AssumptionExpression | ir.AssignmentExpression | ir.AssignmentStatement | ir.BaseConstructorCallExpression | ir.BinaryExpression | ir.BlockStatement | ir.BooleanLiteral | ir.BreakLoopStatement | ir.CallExpression | ir.CharLiteral | ir.CommaExpression | ir.ConstructorCallExpression | ir.ContinueLoopStatement | ir.DisposeStatement | ir.RunStatement | ir.NoneLiteral | ir.EmptyStatement | ir.ErrorStatement | ir.ExpressionStatement | ir.FinallyClause | ir.ForStatement | ir.
|
3
|
-
export type Declaration = ir.
|
4
|
-
export type Statement = ir.AssignmentStatement | ir.BlockStatement | ir.BreakLoopStatement | ir.ContinueLoopStatement | ir.DisposeStatement | ir.RunStatement | ir.EmptyStatement | ir.ErrorStatement | ir.ExpressionStatement | ir.ForStatement | ir.IfStatement | ir.NestedMethodDeclarationStatement | ir.LocalVariableDeclarationStatement | ir.LoopStatement | ir.ReturnStatement | ir.SwitchStatement | ir.TryCatchFinallyStatement | ir.WhileStatement | ir.YieldStatement | ir.
|
5
|
-
export type Expression = ir.ArrayLiteral | ir.AsExpression | ir.AssertionExpression | ir.AssumptionExpression | ir.AssignmentExpression | ir.BinaryExpression | ir.BooleanLiteral | ir.CallExpression | ir.CharLiteral | ir.CommaExpression | ir.ConstructorCallExpression | ir.NoneLiteral | ir.HelperMethodCallExpression | ir.
|
6
|
-
export type
|
7
|
-
export type
|
8
|
-
export type PackageMemberDeclaration = ir.PackageConstructorDeclaration | ir.PackageEntryPointDeclaration | ir.PackageMethodDeclaration | ir.PackageTypeDeclaration | ir.PackageVariableDeclaration | ir.PackageVariantTypeDeclaration | ir.TypeExtensionDeclaration;
|
2
|
+
export type Node = ir.ArrayLiteral | ir.AsExpression | ir.AssertionExpression | ir.AssumptionExpression | ir.AssignmentExpression | ir.AssignmentStatement | ir.BaseConstructorCallExpression | ir.BinaryExpression | ir.BlockStatement | ir.BooleanLiteral | ir.BreakLoopStatement | ir.CallExpression | ir.CharLiteral | ir.CommaExpression | ir.ConstructorCallExpression | ir.ContinueLoopStatement | ir.DisposeStatement | ir.RunStatement | ir.NoneLiteral | ir.EmptyStatement | ir.ErrorStatement | ir.ExpressionStatement | ir.FinallyClause | ir.ForStatement | ir.PackageMethodDeclaration | ir.PackageTypeDeclaration | ir.PackageVariableDeclaration | ir.PackageVariableGetterDeclaration | ir.PackageVariableSetterDeclaration | ir.PackageVariantTypeDeclaration | ir.HelperMethodCallExpression | ir.IfStatement | ir.IndexedAccessExpression | ir.InlineJsExpression | ir.TypeMethodAccessExpression | ir.TypeVariableAccessExpression | ir.IntegerLiteral | ir.IsExpression | ir.JsIndexedAccessExpression | ir.NestedMethodDeclaration | ir.NestedMethodDeclarationStatement | ir.LocalVariableDeclaration | ir.LocalVariableDeclarationStatement | ir.NotExpression | ir.NumericLiteral | ir.OnErrorClause | ir.MethodAccessExpression | ir.MethodLiteral | ir.PrefixUnaryExpression | ir.MeasureLiteral | ir.ReferenceExpression | ir.LoopStatement | ir.Package | ir.ReturnStatement | ir.TextLiteral | ir.TextTemplateLiteral | ir.TypeConstructorDeclaration | ir.TypeDestructorDeclaration | ir.TypeIndexedGetterDeclaration | ir.TypeIndexedSetterDeclaration | ir.TypeMethodDeclaration | ir.TypeVariableDeclaration | ir.TypeVariableGetterDeclaration | ir.TypeVariableSetterDeclaration | ir.SwitchStatement | ir.TernaryExpression | ir.ThisExpression | ir.TryCatchFinallyStatement | ir.TypeAccessExpression | ir.ValueParameterDeclaration | ir.VariableAccessExpression | ir.VariantAccessExpression | ir.VariantDeclaration | ir.WhileStatement | ir.YieldStatement | ir.JsObjectLiteral | ir.JsObjectLiteralProperty | ir.JsPropertyAccessExpression | ir.JsFunctionLiteral | ir.JsTypeOfExpression | ir.JsInstanceOfExpression | ir.JsIdentifierExpression | ir.DereferenceExpression | ir.BaseExpression | ir.OwnConstructorCallExpression | ir.EsModuleImportDirectiveStatement | ir.CjsModuleImportDirectiveStatement | ir.JsNamespaceDestructuringStatement | ir.TypeDereferencedVariableGetterDeclaration | ir.TypeDereferencedVariableSetterDeclaration;
|
3
|
+
export type Declaration = ir.PackageMethodDeclaration | ir.PackageTypeDeclaration | ir.PackageVariableDeclaration | ir.PackageVariableGetterDeclaration | ir.PackageVariableSetterDeclaration | ir.PackageVariantTypeDeclaration | ir.NestedMethodDeclaration | ir.LocalVariableDeclaration | ir.TypeConstructorDeclaration | ir.TypeDestructorDeclaration | ir.TypeIndexedGetterDeclaration | ir.TypeIndexedSetterDeclaration | ir.TypeMethodDeclaration | ir.TypeVariableDeclaration | ir.TypeVariableGetterDeclaration | ir.TypeVariableSetterDeclaration | ir.ValueParameterDeclaration | ir.VariantDeclaration | ir.TypeDereferencedVariableGetterDeclaration | ir.TypeDereferencedVariableSetterDeclaration;
|
4
|
+
export type Statement = ir.AssignmentStatement | ir.BlockStatement | ir.BreakLoopStatement | ir.ContinueLoopStatement | ir.DisposeStatement | ir.RunStatement | ir.EmptyStatement | ir.ErrorStatement | ir.ExpressionStatement | ir.ForStatement | ir.IfStatement | ir.NestedMethodDeclarationStatement | ir.LocalVariableDeclarationStatement | ir.LoopStatement | ir.ReturnStatement | ir.SwitchStatement | ir.TryCatchFinallyStatement | ir.WhileStatement | ir.YieldStatement | ir.EsModuleImportDirectiveStatement | ir.CjsModuleImportDirectiveStatement | ir.JsNamespaceDestructuringStatement;
|
5
|
+
export type Expression = ir.ArrayLiteral | ir.AsExpression | ir.AssertionExpression | ir.AssumptionExpression | ir.AssignmentExpression | ir.BinaryExpression | ir.BooleanLiteral | ir.CallExpression | ir.CharLiteral | ir.CommaExpression | ir.ConstructorCallExpression | ir.NoneLiteral | ir.HelperMethodCallExpression | ir.IndexedAccessExpression | ir.InlineJsExpression | ir.TypeMethodAccessExpression | ir.TypeVariableAccessExpression | ir.IntegerLiteral | ir.IsExpression | ir.NotExpression | ir.NumericLiteral | ir.MethodAccessExpression | ir.MethodLiteral | ir.PrefixUnaryExpression | ir.MeasureLiteral | ir.ReferenceExpression | ir.DereferenceExpression | ir.TextLiteral | ir.TextTemplateLiteral | ir.TernaryExpression | ir.ThisExpression | ir.TypeAccessExpression | ir.VariableAccessExpression | ir.VariantAccessExpression | ir.BaseConstructorCallExpression | ir.JsIndexedAccessExpression | ir.JsObjectLiteral | ir.JsPropertyAccessExpression | ir.JsFunctionLiteral | ir.JsTypeOfExpression | ir.JsInstanceOfExpression | ir.JsIdentifierExpression | ir.BaseExpression | ir.OwnConstructorCallExpression;
|
6
|
+
export type TypeMemberDeclaration = ir.TypeVariableDeclaration | ir.TypeVariableGetterDeclaration | ir.TypeVariableSetterDeclaration | ir.TypeMethodDeclaration | ir.TypeConstructorDeclaration | ir.TypeDestructorDeclaration | ir.TypeIndexedGetterDeclaration | ir.TypeIndexedSetterDeclaration | ir.TypeDereferencedVariableGetterDeclaration | ir.TypeDereferencedVariableSetterDeclaration;
|
7
|
+
export type PackageMemberDeclaration = ir.PackageMethodDeclaration | ir.PackageTypeDeclaration | ir.PackageVariableDeclaration | ir.PackageVariableGetterDeclaration | ir.PackageVariableSetterDeclaration | ir.PackageVariantTypeDeclaration;
|
9
8
|
export type LValueExpression = ir.VariableAccessExpression | ir.TypeVariableAccessExpression | ir.IndexedAccessExpression | ir.JsIndexedAccessExpression | ir.JsPropertyAccessExpression | ir.ThisExpression | ir.DereferenceExpression;
|
10
9
|
export declare function isLValueExpression(node: Expression): node is LValueExpression;
|
@@ -5,8 +5,8 @@ import * as types from '../types/index.js';
|
|
5
5
|
export declare class OriginalPackageMembers {
|
6
6
|
private readonly _namedMembers;
|
7
7
|
private readonly _typeExtensions;
|
8
|
-
private readonly
|
9
|
-
private get
|
8
|
+
private readonly _membersByNameKey;
|
9
|
+
private get membersByNameKey();
|
10
10
|
constructor(_namedMembers: readonly NamedMember[], _typeExtensions: readonly TypeExtensionEntity[]);
|
11
11
|
getNamedMembers(): readonly NamedMember[];
|
12
12
|
getNamedMembersByName(name: Name): readonly NamedMember[];
|
@@ -15,10 +15,10 @@ export declare class OriginalTypeEntityMembers {
|
|
15
15
|
private readonly _referenceOperators;
|
16
16
|
private readonly _unaryOperators;
|
17
17
|
private readonly _binaryOperators;
|
18
|
-
private readonly
|
18
|
+
private readonly _membersByNameKey;
|
19
19
|
private readonly _unaryOperatorsByKind;
|
20
20
|
private readonly _binaryOperatorsByKind;
|
21
|
-
private get
|
21
|
+
private get membersByNameKey();
|
22
22
|
private get unaryOperatorByKind();
|
23
23
|
private get binaryOperatorByKind();
|
24
24
|
constructor(_namedMembers: readonly NamedTypeMemberEntity[], _constructors: readonly ConstructorEntity[], _destructors: readonly DestructorEntity[], _indexers: readonly IndexerEntity[], _referenceOperators: readonly DereferenceOperatorEntity[], _unaryOperators: readonly UnaryOperatorEntity[], _binaryOperators: readonly BinaryOperatorEntity[]);
|
@@ -2,8 +2,8 @@ import { Name } from '../common/index.js';
|
|
2
2
|
import { VariantEntity } from './VariantEntity.js';
|
3
3
|
export declare class OriginalVariants {
|
4
4
|
private readonly _variants;
|
5
|
-
private readonly
|
6
|
-
private get
|
5
|
+
private readonly _variantsByNameKey;
|
6
|
+
private get variantsByNameKey();
|
7
7
|
constructor(_variants: readonly VariantEntity[]);
|
8
8
|
get(): readonly VariantEntity[];
|
9
9
|
getByName(name: Name): readonly VariantEntity[];
|
@@ -75,7 +75,9 @@ export type TypeEntityWithMembers = MethodTypeEntity | StructuredTypeEntity | Va
|
|
75
75
|
export declare function isTypeEntityWithMembers(entity: TypeEntity): entity is TypeEntityWithMembers;
|
76
76
|
export declare function isTypeEntity(entity: Entity): entity is TypeEntity;
|
77
77
|
export declare function isNamedTypeEntity(entity: TypeEntity): entity is NamedTypeEntity;
|
78
|
-
export type PackageMemberEntity = PackageVariableEntity | PackageMethodEntity | PackageTypeEntity;
|
78
|
+
export type PackageMemberEntity = PackageVariableEntity | PackageMethodEntity | PackageTypeEntity | TypeExtensionEntity;
|
79
|
+
export declare function isPackageMemberEntity(entity: Entity): entity is PackageMemberEntity;
|
80
|
+
export type NamedPackageMemberEntity = PackageVariableEntity | PackageMethodEntity | PackageTypeEntity;
|
79
81
|
export type EntityWithTags = AliasTypeEntity | ConstructorEntity | DestructorEntity | IndexerEntity | DereferenceOperatorEntity | MethodEntity | MethodTypeEntity | StructuredTypeEntity | VariableEntity | VariantEntity | VariantTypeEntity;
|
80
82
|
export declare function isEntityWithTags(entity: Entity): entity is EntityWithTags;
|
81
83
|
export type TypeMemberEntity = TypeVariableEntity | TypeMethodEntity | ConstructorEntity | DestructorEntity | IndexerEntity | DereferenceOperatorEntity | UnaryOperatorEntity | BinaryOperatorEntity;
|
@@ -1,25 +1,24 @@
|
|
1
1
|
import { CancellationToken, Uri } from '../common/index.js';
|
2
2
|
import { Diagnostic, DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
|
3
3
|
import { Compilation } from './Compilation.js';
|
4
|
+
import { ConvertedConfiguration } from './configuration/ConfigurationConverter.js';
|
4
5
|
import * as fsTree from './FileSystemTree.js';
|
6
|
+
import * as packageContent from './PackageContent.js';
|
5
7
|
import { PackageName, ProgramPackageConfiguration } from './SourcePackage.js';
|
6
|
-
import { ConvertedConfiguration } from './configuration/ConfigurationConverter.js';
|
7
8
|
export declare class CompilationLoader {
|
8
9
|
static readonly artelSystemPackageName: PackageName;
|
9
|
-
private readonly
|
10
|
-
private readonly _fileSystemTree;
|
10
|
+
private readonly _source;
|
11
11
|
private readonly _config;
|
12
12
|
private readonly _diagnostics;
|
13
13
|
private readonly _cancellationToken;
|
14
14
|
private _configurationsByPackageOrGroupUri;
|
15
|
-
private readonly _userPackages;
|
16
|
-
private readonly _libraryPackages;
|
17
15
|
private constructor();
|
18
|
-
static loadUsingSourcesProvider(uri: Uri, sourcesProvider: SourcesProvider,
|
16
|
+
static loadUsingSourcesProvider(uri: Uri, sourcesProvider: SourcesProvider, options?: CompilationLoaderOptions, diagnostics?: DiagnosticAcceptor, workspaceUri?: Uri, namesOfDirectoriesToIgnore?: readonly string[], cancellationToken?: CancellationToken): Promise<{
|
19
17
|
loadResult: CompilationLoadResult;
|
20
18
|
fileSystemTree: fsTree.FileSystemTree;
|
21
19
|
}>;
|
22
|
-
static loadFromFileSystemTree(rootDirectory: fsTree.Directory, fileSystemTree: fsTree.ReadonlyFileSystemTree
|
20
|
+
static loadFromFileSystemTree(rootDirectory: fsTree.Directory, fileSystemTree: fsTree.ReadonlyFileSystemTree, options?: CompilationLoaderOptions, diagnostics?: DiagnosticAcceptor, cancellationToken?: CancellationToken): Promise<CompilationLoadResult>;
|
21
|
+
static loadFromPackageContents(contents: readonly packageContent.PackageContent[], options?: CompilationLoaderOptions, diagnostics?: DiagnosticAcceptor, cancellationToken?: CancellationToken): Promise<CompilationLoadResult>;
|
23
22
|
/**
|
24
23
|
* Ищет папку с конфигурацией (папку '.артель') в переданной папке.
|
25
24
|
*/
|
@@ -38,20 +37,9 @@ export declare class CompilationLoader {
|
|
38
37
|
* Проверяет, содержит ли папка конфигурационную папку (папку с именем '.артель').
|
39
38
|
*/
|
40
39
|
static checkIfDirectoryContainsArtelConfigurationUsingSourcesProvider(uri: Uri, sourcesProvider: SourcesProvider): Promise<boolean>;
|
41
|
-
private static
|
40
|
+
private static convertOptions;
|
42
41
|
private static loadArtelFiles;
|
43
42
|
private load;
|
44
|
-
private loadSystemPackages;
|
45
|
-
private loadPackagesFromAllAccessibleNodeModulesDirectories;
|
46
|
-
private loadAndAccumulatePackagesFromSingleNodeModulesDirectory;
|
47
|
-
private loadPackageGroupRecursively;
|
48
|
-
private loadDirectoryWithUnprocessedConfiguration;
|
49
|
-
private loadDirectoryWithProcessedConfiguration;
|
50
|
-
private loadPackage;
|
51
|
-
private loadPackageDirectoryAndAccumulateFilesRecursively;
|
52
|
-
private createOrReuseSourceFile;
|
53
|
-
private processOrReuseConfiguration;
|
54
|
-
private processConfiguration;
|
55
43
|
}
|
56
44
|
export declare class DirectoryEntry {
|
57
45
|
readonly uri: Uri;
|
@@ -68,7 +56,7 @@ export interface SourcesProvider {
|
|
68
56
|
readDirectory(uri: Uri, fileNameExtensions?: Set<string>): Promise<readonly DirectoryEntry[]>;
|
69
57
|
readFile(uri: Uri): Promise<string | undefined>;
|
70
58
|
}
|
71
|
-
export interface
|
59
|
+
export interface CompilationLoaderOptions {
|
72
60
|
previousLoadResult?: CompilationLoadResult;
|
73
61
|
treatRootAsPackageIfConfigIsMissing?: boolean;
|
74
62
|
/**
|
@@ -76,9 +64,16 @@ export interface CompilationLoadConfig {
|
|
76
64
|
*/
|
77
65
|
getMainPackageConfigurationIfAbsent?: MainPackageConfigurationProvider;
|
78
66
|
compilationKind?: CompilationKind;
|
79
|
-
systemProjectDirectoriesOverride?: readonly fsTree.Directory[];
|
80
67
|
provideConfiguration?: ConfigurationProvider;
|
81
|
-
|
68
|
+
/**
|
69
|
+
* Путь к папке со стандартными пакетами, указанный в конфигурации пользователем.
|
70
|
+
*/
|
71
|
+
userStandardPackagesUri?: Uri;
|
72
|
+
/**
|
73
|
+
* Путь к папке со стандартными пакетами, поставляемыми вместе с компилятором.
|
74
|
+
*/
|
75
|
+
builtInStandardPackagesUri?: Uri;
|
76
|
+
additionalPackageContents?: readonly packageContent.PackageContent[];
|
82
77
|
enableLogging?: boolean;
|
83
78
|
}
|
84
79
|
export declare enum CompilationKind {
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import * as configEn from './configuration/types/PackageConfigurationEn.js';
|
2
|
+
import * as configRu from './configuration/types/PackageConfigurationRu.js';
|
3
|
+
export type PackageOrTranslationsConfiguration = configEn.Package | configEn.Translations | configRu.Пакет | configRu.Переводы;
|
4
|
+
export type PackageConfigurationLocale = 'en' | 'ru';
|
5
|
+
export interface PackageContent {
|
6
|
+
configuration: PackageOrTranslationsConfiguration;
|
7
|
+
configurationLocale: PackageConfigurationLocale;
|
8
|
+
fileContents: FileContent[];
|
9
|
+
}
|
10
|
+
export interface FileContent {
|
11
|
+
/**
|
12
|
+
* Сегменты пути должны быть разделены символом `/`.
|
13
|
+
*/
|
14
|
+
relativePath: string;
|
15
|
+
text: string;
|
16
|
+
}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
import { Directory, ReadonlyFileSystemTree } from './FileSystemTree.js';
|
2
|
+
import { PackageContent } from './PackageContent.js';
|
3
|
+
export declare function createPackageContentsFromFSTree(rootDirectory: Directory, fileSystemTree: ReadonlyFileSystemTree): Promise<PackageContent[]>;
|
@@ -8,7 +8,7 @@ export declare class SourceFile extends TextFile {
|
|
8
8
|
private readonly _node;
|
9
9
|
get package(): SourcePackage;
|
10
10
|
private constructor();
|
11
|
-
static create(text: string, uri: Uri,
|
11
|
+
static create(text: string, uri: Uri, version: number): SourceFile;
|
12
12
|
/**
|
13
13
|
* Данный метод должен вызываться только пакетом этого исходного файла.
|
14
14
|
*/
|
@@ -38,6 +38,7 @@ export declare class TranslationPackageConfiguration {
|
|
38
38
|
readonly targetPackageName: PackageName;
|
39
39
|
readonly translatedName: PackageName;
|
40
40
|
readonly translationLocale: PackageLocale;
|
41
|
+
get name(): PackageName;
|
41
42
|
constructor(targetPackageName: PackageName, translatedName: PackageName, translationLocale: PackageLocale);
|
42
43
|
}
|
43
44
|
export declare class ProgramPackageConfiguration {
|
@@ -56,10 +57,9 @@ export declare class ProgramPackageConfiguration {
|
|
56
57
|
}
|
57
58
|
export declare class PackageName {
|
58
59
|
readonly segments: ReadonlyNonEmptyArray<Name>;
|
59
|
-
get lastSegment(): Name;
|
60
60
|
constructor(segments: ReadonlyNonEmptyArray<Name>);
|
61
|
-
static
|
62
|
-
|
61
|
+
static parse(name: string): PackageName;
|
62
|
+
considerEqual(name: PackageName): boolean;
|
63
63
|
toString(original?: boolean): string;
|
64
64
|
}
|
65
65
|
export type RequiredPackageConfig = RequiredPackageConfig.Npm | RequiredPackageConfig.NuGet;
|
@@ -2,13 +2,13 @@ import { PackageDialect } from '../../common/index.js';
|
|
2
2
|
import { PackageLocale } from '../../common/PackageLocale.js';
|
3
3
|
import { Uri } from '../../common/Uri.js';
|
4
4
|
import * as origin from '../configuration/types/PackageConfigurationEn.js';
|
5
|
-
import { PackageConfiguration,
|
5
|
+
import { PackageConfiguration, ProgramPackageConfiguration, TranslationPackageConfiguration } from '../SourcePackage.js';
|
6
6
|
export declare class ConfigurationConverter {
|
7
7
|
private static readonly _uriRegexp;
|
8
8
|
static convert(configurations: readonly origin.Configuration[], packageOrGroupUri?: Uri, defaultLocale?: PackageLocale, defaultDialect?: PackageDialect): ConvertedConfiguration;
|
9
9
|
static convertPackageConfiguration(configuration: origin.Package, packageOrGroupUri?: Uri, defaultLocale?: PackageLocale, defaultDialect?: PackageDialect): ProgramPackageConfiguration;
|
10
10
|
static convertPackageGroupConfiguration(configuration: origin.PackageGroup): PackageGroupConfiguration;
|
11
|
-
static convertTranslationsConfiguration(configuration: origin.Translations): TranslationPackageConfiguration
|
11
|
+
static convertTranslationsConfiguration(configuration: origin.Translations): TranslationPackageConfiguration;
|
12
12
|
private static convertJavaScriptImplementation;
|
13
13
|
private static convertLanguage;
|
14
14
|
private static convertDialect;
|
@@ -21,5 +21,4 @@ export interface ConvertedConfiguration {
|
|
21
21
|
}
|
22
22
|
export declare class PackageGroupConfiguration {
|
23
23
|
}
|
24
|
-
export declare function parsePackageName(text: string): PackageName | undefined;
|
25
24
|
export declare function createDefaultPackageConfiguration(packageUri: Uri | undefined, locale?: PackageLocale, dialect?: PackageDialect): ProgramPackageConfiguration;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { PackageLocale } from '../../common/PackageLocale.js';
|
2
|
+
import * as configEn from '../configuration/types/PackageConfigurationEn.js';
|
3
|
+
import * as configRu from '../configuration/types/PackageConfigurationRu.js';
|
4
|
+
export type ConfigurationArray = configEn.ConfigurationArray | configRu.МассивКонфигураций;
|
5
|
+
export type Configuration = configEn.Configuration | configRu.Конфигурация;
|
6
|
+
/**
|
7
|
+
* Заменяет ключи объектов конфигурации на ключи на английском языке.
|
8
|
+
*
|
9
|
+
* @example
|
10
|
+
* [{
|
11
|
+
* "тип": "Пакет",
|
12
|
+
* "имя": "МойПакет"
|
13
|
+
* }]
|
14
|
+
* ->
|
15
|
+
* [{
|
16
|
+
* "type": "Package",
|
17
|
+
* "name": "МойПакет"
|
18
|
+
* }]
|
19
|
+
*/
|
20
|
+
export declare class ConfigurationTranslator {
|
21
|
+
static translate(configuration: ConfigurationArray, locale: PackageLocale): configEn.ConfigurationArray;
|
22
|
+
static translateConfiguration(configuration: Configuration, locale: PackageLocale): configEn.Configuration;
|
23
|
+
}
|
@@ -1,27 +1 @@
|
|
1
|
-
|
2
|
-
import { CancellationToken, Result, Uri } from '../../common/index.js';
|
3
|
-
import { Diagnostic, DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
|
4
|
-
import { TypeScriptLibrariesProvider } from '../../ts-interop/TsLibrariesProvider.js';
|
5
|
-
import { Compilation } from '../Compilation.js';
|
6
|
-
import { CompilationLoadResult } from '../CompilationLoader.js';
|
7
|
-
import * as fsTree from '../FileSystemTree.js';
|
8
|
-
import * as buildScript from './BuildPackageApi.js';
|
9
|
-
export declare class PackageConfigurationInterpreter {
|
10
|
-
static readonly artelPackageUri: Uri;
|
11
|
-
static readonly buildPackageUri: Uri;
|
12
|
-
static readonly platformJavaScriptPackageUri: Uri;
|
13
|
-
static readonly availablePackageUris: Uri[];
|
14
|
-
static readonly asyncFunctionConstructor: any;
|
15
|
-
static interpret(configurationDirectory: fsTree.Directory, tsInteropInputs: TsInteropInputs, diagnostics: DiagnosticAcceptor | undefined, cancellationToken?: CancellationToken): Promise<Result<buildScript.Package | undefined, undefined>>;
|
16
|
-
static createTsInteropInputsForInterpretation(librariesProvider: TypeScriptLibrariesProvider): TsInteropInputs;
|
17
|
-
static loadConfigurationCompilation(configurationDirectory: fsTree.Directory, diagnostics: DiagnosticAcceptor | undefined, previousLoadResult?: CompilationLoadResult, cancellationToken?: CancellationToken): Promise<Compilation | undefined>;
|
18
|
-
static compileAndExecuteConfiguration(analyzer: Analyzer, diagnostics: DiagnosticAcceptor | undefined, cancellationToken?: CancellationToken): Promise<Result<buildScript.Package | undefined, undefined>>;
|
19
|
-
private static analyze;
|
20
|
-
private static executeConfigurationCode;
|
21
|
-
}
|
22
|
-
export declare class RawInterpretationResult {
|
23
|
-
readonly configuration: buildScript.Package | undefined;
|
24
|
-
readonly isSuccessful: boolean;
|
25
|
-
readonly diagnostics: readonly Diagnostic[];
|
26
|
-
constructor(configuration: buildScript.Package | undefined, isSuccessful: boolean, diagnostics: readonly Diagnostic[]);
|
27
|
-
}
|
1
|
+
export {};
|
@@ -1,11 +1,13 @@
|
|
1
1
|
export * from './Compilation.js';
|
2
2
|
export * from './CompilationLoader.js';
|
3
|
+
export * from './configuration/ConfigurationConverter.js';
|
3
4
|
export * from './configuration/ConfigurationFileParser.js';
|
4
5
|
export * from './configuration/PackageConfigurationInterpreter.js';
|
5
|
-
export * from './configuration/ConfigurationConverter.js';
|
6
6
|
export * as config from './configuration/types/PackageConfigurationEn.js';
|
7
7
|
export * as configRu from './configuration/types/PackageConfigurationRu.js';
|
8
8
|
export * as fsTree from './FileSystemTree.js';
|
9
|
+
export * as packageContent from './PackageContent.js';
|
10
|
+
export * from './PackageContentCreator.js';
|
9
11
|
export * from './Position.js';
|
10
12
|
export * from './SourceFile.js';
|
11
13
|
export * from './SourcePackage.js';
|
@@ -9,7 +9,7 @@ export declare class AddPropertyAssignmentService {
|
|
9
9
|
* Если предыдущее присваивание не вложено ни в какие конструкции ветвления, присваивание нового значение можно
|
10
10
|
* расположить сразу после. Иначе присваивание необходимо расположить в конце подпрограммы (после всех ветвлений).
|
11
11
|
*/
|
12
|
-
private
|
13
|
-
private
|
12
|
+
private ifShouldBeAssignedAtTheEndOfSubprogramThenBody;
|
13
|
+
private getContainingSubprogram;
|
14
14
|
private detectNewLine;
|
15
15
|
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { Analyzer } from '../analysis/Analyzer.js';
|
2
|
+
import { DiagnosticCode } from '../diagnostic/DiagnosticCode.js';
|
3
|
+
import { SourceFile } from '../project/SourceFile.js';
|
4
|
+
import { SourceFileEdit } from './Types.js';
|
5
|
+
export declare class CodeActionsService {
|
6
|
+
private readonly _translationsGeneratorService;
|
7
|
+
getCodeActions(analyzer: Analyzer, sourceFile: SourceFile, offset: number, diagnosticCodes: readonly DiagnosticCode[] | undefined): CodeAction[] | undefined;
|
8
|
+
resolveEdits(analyzer: Analyzer, sourceFile: SourceFile, offset: number, name: string, data: any): SourceFileEdit[] | undefined;
|
9
|
+
}
|
10
|
+
export declare class CodeAction {
|
11
|
+
readonly title: string;
|
12
|
+
readonly name: string;
|
13
|
+
readonly kind: CodeActionKind;
|
14
|
+
readonly edits: readonly SourceFileEdit[] | undefined;
|
15
|
+
readonly data: any | undefined;
|
16
|
+
constructor(title: string, name: string, kind: CodeActionKind, edits: readonly SourceFileEdit[] | undefined, data: any | undefined);
|
17
|
+
static resolved(title: string, name: string, kind: CodeActionKind, edits: readonly SourceFileEdit[]): CodeAction;
|
18
|
+
static unresolved(title: string, name: string, kind: CodeActionKind, data: any): CodeAction;
|
19
|
+
}
|
20
|
+
export declare enum CodeActionKind {
|
21
|
+
QuickFix = 0
|
22
|
+
}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { Analyzer } from '../analysis/index.js';
|
2
|
-
import { Range } from '../common/index.js';
|
2
|
+
import { CancellationToken, Range } 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): Promise<DefinitionsAndReferenceInfo | undefined>;
|
9
|
+
getDefinition(analyzer: Analyzer, sourceFile: SourceFile, offset: number, cancellationToken: CancellationToken | undefined): Promise<DefinitionsAndReferenceInfo | undefined>;
|
10
10
|
private getDefinitionOfReference;
|
11
11
|
private getReferenceTargetSourceLocation;
|
12
12
|
private getReferenceTargetEntity;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as ls from 'vscode-languageserver';
|
2
|
-
import { CancellationToken } from '../common/index.js';
|
2
|
+
import { CancellationToken, Uri } from '../common/index.js';
|
3
3
|
import { TypeScriptLibrariesProvider } from '../ts-interop/TsLibrariesProvider.js';
|
4
4
|
import { WorkspaceFileSystem } from './workspace/index.js';
|
5
5
|
export declare class LanguageServer {
|
@@ -32,6 +32,7 @@ export declare class LanguageServer {
|
|
32
32
|
private readonly _fileSystemTreeDisplayService;
|
33
33
|
private readonly _selectionRangeService;
|
34
34
|
private readonly _addPropertyAssignmentService;
|
35
|
+
private readonly _codeActionsService;
|
35
36
|
constructor(config: LanguageServerConfig);
|
36
37
|
start(): void;
|
37
38
|
dispose(): void;
|
@@ -60,6 +61,7 @@ export declare class LanguageServer {
|
|
60
61
|
private onExecuteCommand;
|
61
62
|
private onAddPropertyAssignment;
|
62
63
|
private convertSourceFileEdit;
|
64
|
+
private convertSourceFileEditsToWorkspaceEdit;
|
63
65
|
private onGetNodeRange;
|
64
66
|
private onCreateOrUpdateSourceFile;
|
65
67
|
private onDeleteSourceFile;
|
@@ -84,6 +86,10 @@ export declare class LanguageServer {
|
|
84
86
|
private onSignatureHelp;
|
85
87
|
private onSelectionRanges;
|
86
88
|
private convertSelectionRange;
|
89
|
+
private onCodeAction;
|
90
|
+
private onCodeActionResolve;
|
91
|
+
private convertCodeAction;
|
92
|
+
private convertCodeActionKind;
|
87
93
|
private onRawPackageConfigurationsChanged;
|
88
94
|
private convertSourceFileRange;
|
89
95
|
private getSourceFileContext;
|
@@ -101,8 +107,9 @@ export type FileSystemSynchronizationMode = FileSystemSynchronizationMode.Client
|
|
101
107
|
export declare namespace FileSystemSynchronizationMode {
|
102
108
|
class ClientSideFSWatcher {
|
103
109
|
readonly fileSystem: WorkspaceFileSystem;
|
110
|
+
readonly builtInStandardPackagesUri?: Uri | undefined;
|
104
111
|
readonly kind = "client-side-fs-watcher";
|
105
|
-
constructor(fileSystem: WorkspaceFileSystem);
|
112
|
+
constructor(fileSystem: WorkspaceFileSystem, builtInStandardPackagesUri?: Uri | undefined);
|
106
113
|
}
|
107
114
|
class ClientToServerRequests {
|
108
115
|
readonly kind = "client-to-server-requests";
|
@@ -3,7 +3,7 @@ import { MatchResultValueParameter } from '../analysis/CallArgumentToParameterMa
|
|
3
3
|
import { Translation, WithLocalization } from '../analysis/Localization.js';
|
4
4
|
import { TypeIndexedAccessorDeclaration } from '../analysis/NodeTypeUtils.js';
|
5
5
|
import { Analyzer } from '../analysis/index.js';
|
6
|
-
import { ReadonlyNonEmptyArray } from '../common/index.js';
|
6
|
+
import { AccessKind, ReadonlyNonEmptyArray } from '../common/index.js';
|
7
7
|
import { AliasTypeEntity, Entity, MethodEntity, MethodTypeEntity, PackageAliasEntity, PackageEntity, StructuredTypeEntity, TypeParameterEntity, VariableEntity, VariantEntity, VariantTypeEntity } from '../entities/index.js';
|
8
8
|
import * as tree from '../tree/index.js';
|
9
9
|
import * as types from '../types/index.js';
|
@@ -55,19 +55,22 @@ export declare class ReferenceNodeSemanticInfo {
|
|
55
55
|
export type ReferenceTarget = EntityReferenceTarget | TypeVariableReferenceTarget | TypeValueParameterReferenceTarget | TypeConstructorReferenceTarget | TypeUnaryOperatorReferenceTarget | TypeBinaryOperatorReferenceTarget | TypeDereferenceOperatorReferenceTarget | AccessedMethodReferenceTarget | TypeIndexerReferenceTarget | MatchResultValueParameterReferenceTarget | PackageReferenceTarget | TypeContextReferenceTarget;
|
56
56
|
export declare class EntityReferenceTarget {
|
57
57
|
readonly entity: ReferencedEntity;
|
58
|
+
readonly accessKind: AccessKind;
|
58
59
|
readonly kind = "entity";
|
59
|
-
constructor(entity: ReferencedEntity);
|
60
|
+
constructor(entity: ReferencedEntity, accessKind: AccessKind);
|
60
61
|
}
|
61
62
|
export type ReferencedEntity = VariableEntity | VariantEntity | VariantTypeEntity | MethodEntity | TypeParameterEntity | MethodTypeEntity | StructuredTypeEntity | PackageAliasEntity | AliasTypeEntity;
|
62
63
|
export declare class TypeVariableReferenceTarget {
|
63
64
|
readonly variable: types.Variable;
|
65
|
+
readonly accessKind: AccessKind;
|
64
66
|
readonly kind = "type-variable";
|
65
|
-
constructor(variable: types.Variable);
|
67
|
+
constructor(variable: types.Variable, accessKind: AccessKind);
|
66
68
|
}
|
67
69
|
export declare class TypeValueParameterReferenceTarget {
|
68
70
|
readonly parameter: types.ValueParameter;
|
71
|
+
readonly accessKind: AccessKind;
|
69
72
|
readonly kind = "type-value-parameter";
|
70
|
-
constructor(parameter: types.ValueParameter);
|
73
|
+
constructor(parameter: types.ValueParameter, accessKind: AccessKind);
|
71
74
|
}
|
72
75
|
export declare class TypeConstructorReferenceTarget {
|
73
76
|
readonly constructor_: types.Constructor;
|
@@ -86,8 +89,9 @@ export declare class TypeBinaryOperatorReferenceTarget {
|
|
86
89
|
}
|
87
90
|
export declare class TypeDereferenceOperatorReferenceTarget {
|
88
91
|
readonly operator: types.DereferenceOperator;
|
92
|
+
readonly accessKind: AccessKind;
|
89
93
|
readonly kind = "type-dereference-operator";
|
90
|
-
constructor(operator: types.DereferenceOperator);
|
94
|
+
constructor(operator: types.DereferenceOperator, accessKind: AccessKind);
|
91
95
|
}
|
92
96
|
export declare class AccessedMethodReferenceTarget {
|
93
97
|
readonly method: AccessedMethod;
|
@@ -96,8 +100,9 @@ export declare class AccessedMethodReferenceTarget {
|
|
96
100
|
}
|
97
101
|
export declare class MatchResultValueParameterReferenceTarget {
|
98
102
|
readonly parameter: MatchResultValueParameter;
|
103
|
+
readonly accessKind: AccessKind;
|
99
104
|
readonly kind = "match-result-value-parameter";
|
100
|
-
constructor(parameter: MatchResultValueParameter);
|
105
|
+
constructor(parameter: MatchResultValueParameter, accessKind: AccessKind);
|
101
106
|
}
|
102
107
|
export declare class PackageReferenceTarget {
|
103
108
|
readonly package_: PackageEntity;
|
@@ -112,8 +117,9 @@ export declare class TypeContextReferenceTarget {
|
|
112
117
|
}
|
113
118
|
export declare class TypeIndexerReferenceTarget {
|
114
119
|
readonly indexer: types.Indexer;
|
120
|
+
readonly accessKind: AccessKind;
|
115
121
|
readonly kind = "type-indexer";
|
116
|
-
constructor(indexer: types.Indexer);
|
122
|
+
constructor(indexer: types.Indexer, accessKind: AccessKind);
|
117
123
|
}
|
118
124
|
export declare class NameTranslationNodeSemanticInfo {
|
119
125
|
readonly targets: ReadonlyNonEmptyArray<TranslationTargetEntity>;
|
@@ -7,9 +7,7 @@ export declare class ReferencesService {
|
|
7
7
|
private getDefinitionAndReferenceInfoAtOffset;
|
8
8
|
private getDefinitionFromNodeSemanticInfo;
|
9
9
|
private getReferenceRestrictions;
|
10
|
-
private
|
11
|
-
private determineReferenceKind;
|
12
|
-
private accessKindToReferenceKind;
|
10
|
+
private ifReferenceToDefinitionThenKind;
|
13
11
|
private isEntityWithRegularName;
|
14
12
|
}
|
15
13
|
export declare class Reference {
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Analyzer } from '../analysis/Analyzer.js';
|
2
|
+
import { SourceFile } from '../project/SourceFile.js';
|
3
|
+
import { SourceFileEdit } from './Types.js';
|
4
|
+
export declare class TranslationsGenerationService {
|
5
|
+
generateMissingTranslations(analyzer: Analyzer, sourceFile: SourceFile, offset: number, onlyTypeMembers: boolean): SourceFileEdit[] | undefined;
|
6
|
+
isOffsetAtTranslationsContainingPartiallyTranslatedTypes(analyzer: Analyzer, sourceFile: SourceFile, offset: number): boolean;
|
7
|
+
}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import * as ls from 'vscode-languageserver';
|
1
2
|
import { Range, Uri } from '../common/index.js';
|
2
3
|
import { SourceFile } from '../project/index.js';
|
3
4
|
export type RangeLocation = {
|
@@ -13,7 +14,16 @@ export type CompletionItemData = {
|
|
13
14
|
cacheId: number;
|
14
15
|
indexInCache: number;
|
15
16
|
};
|
17
|
+
export type CodeActionData = {
|
18
|
+
name: string;
|
19
|
+
location: {
|
20
|
+
uri: ls.DocumentUri;
|
21
|
+
position: ls.Position;
|
22
|
+
};
|
23
|
+
data: any;
|
24
|
+
};
|
16
25
|
export declare function isCompletionItemData(value: unknown): value is CompletionItemData;
|
26
|
+
export declare function isCodeActionData(value: unknown): value is CodeActionData;
|
17
27
|
export declare class SourceFileEdit {
|
18
28
|
readonly sourceFile: SourceFile;
|
19
29
|
readonly range: Range;
|
@@ -1,18 +1,20 @@
|
|
1
1
|
import { ObservableObject } from 'reactronic';
|
2
|
-
import { Analyzer
|
2
|
+
import { Analyzer } from '../../analysis/Analyzer.js';
|
3
3
|
import { LocalizationContext } from '../../analysis/LocalizationContext.js';
|
4
|
+
import { CancellationToken } from '../../common/index.js';
|
4
5
|
import { Entity } from '../../entities/index.js';
|
6
|
+
import { PackageContent } from '../../project/PackageContent.js';
|
5
7
|
import { TypeScriptLibrariesProvider } from '../../ts-interop/TsLibrariesProvider.js';
|
6
8
|
import { SourceLocation } from '../Types.js';
|
7
9
|
import { CompilationController, ReadonlyClientTrackedSourceFiles } from '../workspace/index.js';
|
8
10
|
export declare class SourceGenerationService extends ObservableObject {
|
9
11
|
private readonly _trackedSourceFiles;
|
10
12
|
private readonly _tsLibrariesProvider;
|
11
|
-
private readonly
|
13
|
+
private readonly _standardPackageContentsProviders;
|
12
14
|
private readonly _generatedPackageStates;
|
13
15
|
get compilationControllers(): readonly CompilationController[];
|
14
|
-
constructor(_trackedSourceFiles: ReadonlyClientTrackedSourceFiles, _tsLibrariesProvider: TypeScriptLibrariesProvider,
|
15
|
-
getDefinitionInGeneratedCode(analyzer: Analyzer, entity: Entity, localizationContext: LocalizationContext | undefined): Promise<SourceLocation[] | undefined>;
|
16
|
+
constructor(_trackedSourceFiles: ReadonlyClientTrackedSourceFiles, _tsLibrariesProvider: TypeScriptLibrariesProvider, _standardPackageContentsProviders: (cancellationToken: CancellationToken | undefined) => Promise<readonly PackageContent[] | undefined>);
|
17
|
+
getDefinitionInGeneratedCode(analyzer: Analyzer, entity: Entity, localizationContext: LocalizationContext | undefined, cancellationToken: CancellationToken | undefined): Promise<SourceLocation[] | undefined>;
|
16
18
|
entityDefinitionRequiresSourceGeneration(entity: Entity): boolean;
|
17
19
|
protected onOpenedSourceFilesChanged(): void;
|
18
20
|
private getOrGeneratePackageSource;
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import { Indicator, ObservableObject } from 'reactronic';
|
2
|
-
import { Analyzer
|
2
|
+
import { Analyzer } from '../../analysis/index.js';
|
3
3
|
import { CancellationToken, 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
|
+
import { PackageContent } from '../../project/PackageContent.js';
|
6
7
|
import { TypeScriptLibrariesProvider } from '../../ts-interop/TsLibrariesProvider.js';
|
7
8
|
import { ReadonlyClientTrackedSourceFiles } from './ClientTrackedSourceFiles.js';
|
8
9
|
export declare class CompilationController extends ObservableObject {
|
@@ -24,7 +25,6 @@ export declare class CompilationController extends ObservableObject {
|
|
24
25
|
private _tsInteropInputs;
|
25
26
|
private _tsProgramLoaderInputs;
|
26
27
|
private _state;
|
27
|
-
private _builtInSystemPackagesConfigurations;
|
28
28
|
private _configurationsOfPackagesOutsideProject;
|
29
29
|
get uri(): Uri;
|
30
30
|
get mainCompilationState(): ReadonlyCompilationState | undefined;
|
@@ -52,7 +52,6 @@ export interface CompilationControllerConfig {
|
|
52
52
|
readonly rootDirectory: fsTree.Directory;
|
53
53
|
readonly fileSystemTree: fsTree.ReadonlyFileSystemTree;
|
54
54
|
readonly tsLibrariesProvider: TypeScriptLibrariesProvider;
|
55
|
-
readonly configurationPackagesTsInteropInputs: TsInteropInputs;
|
56
55
|
readonly trackedSourceFiles: ReadonlyClientTrackedSourceFiles;
|
57
56
|
readonly diagnosticsCollectedInBackgroundHandler?: DiagnosticsCollectedInBackgroundHandler;
|
58
57
|
readonly rawPackageConfigurationsChangedHandler?: RawPackageConfigurationsChangedHandler;
|
@@ -60,6 +59,8 @@ export interface CompilationControllerConfig {
|
|
60
59
|
readonly getTreatRootAsPackageIfConfigIsMissing?: () => boolean;
|
61
60
|
readonly standardPackagesUri?: Uri;
|
62
61
|
readonly showErrorMessage?: (message: string) => Promise<void>;
|
62
|
+
readonly builtInStandardPackagesUri?: Uri;
|
63
|
+
readonly additionalPackageContents?: readonly PackageContent[];
|
63
64
|
}
|
64
65
|
export declare enum CompilationControllerState {
|
65
66
|
Created = 0,
|