@artel/artc 0.6.25277 → 0.6.25278
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 -10
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +286 -293
- package/build/{chunk-QK3TWMY2.js → chunk-4C7CEJJF.js} +20 -24
- package/build/{chunk-EVYL6VFM.js → chunk-A2QTLTGI.js} +1935 -1176
- package/build/{chunk-DKZTCPRN.js → chunk-L44WWCT7.js} +15 -15
- 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 +21 -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/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/common/TaskController.d.ts +14 -0
- package/build/types/common/TreeTraversal.d.ts +10 -9
- package/build/types/common/index.d.ts +1 -2
- package/build/types/diagnostic/DiagnosticCode.d.ts +5 -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/DefinitionService.d.ts +2 -2
- 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 +1 -1
- 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 +3 -3
- 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/ThrottledCancellationToken.d.ts +0 -17
- package/build/types/common/YieldExecution.d.ts +0 -1
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
CompilationLoader,
|
|
4
4
|
DefaultNamesOfDirectoriesToIgnore,
|
|
5
5
|
Diagnostic,
|
|
6
|
-
DiagnosticCollector,
|
|
7
6
|
DiagnosticData,
|
|
8
7
|
Emitter,
|
|
8
|
+
SourceFileAnalyzer,
|
|
9
9
|
SourcePackageDependencyGraph,
|
|
10
10
|
WellKnownDeclarationsLoadError,
|
|
11
11
|
__async,
|
|
12
12
|
createTsInteropInputsForCompilation
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-A2QTLTGI.js";
|
|
14
14
|
|
|
15
15
|
// source/executor/Compiler.ts
|
|
16
16
|
var Compiler = class {
|
|
17
|
-
static loadCompilation(projectUri, sourcesProvider, tsLibrariesProvider, diagnostics,
|
|
17
|
+
static loadCompilation(projectUri, sourcesProvider, tsLibrariesProvider, diagnostics, taskController, options) {
|
|
18
18
|
return __async(this, null, function* () {
|
|
19
19
|
const loaderOptions = {
|
|
20
20
|
treatRootAsPackageIfConfigIsMissing: true,
|
|
@@ -25,16 +25,16 @@ var Compiler = class {
|
|
|
25
25
|
const { loadResult } = yield CompilationLoader.loadUsingSourcesProvider(
|
|
26
26
|
projectUri,
|
|
27
27
|
sourcesProvider,
|
|
28
|
+
taskController,
|
|
28
29
|
loaderOptions,
|
|
29
30
|
diagnostics,
|
|
30
31
|
options?.workspaceUri,
|
|
31
|
-
DefaultNamesOfDirectoriesToIgnore
|
|
32
|
-
cancellationToken
|
|
32
|
+
DefaultNamesOfDirectoriesToIgnore
|
|
33
33
|
);
|
|
34
34
|
return loadResult.compilation;
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
static createAnalyzer(compilation, tsLibrariesProvider, diagnostics,
|
|
37
|
+
static createAnalyzer(compilation, tsLibrariesProvider, diagnostics, _taskController) {
|
|
38
38
|
return __async(this, null, function* () {
|
|
39
39
|
const tsInteropInputs = createTsInteropInputsForCompilation(compilation, tsLibrariesProvider);
|
|
40
40
|
try {
|
|
@@ -48,15 +48,15 @@ var Compiler = class {
|
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
static analyze(analyzer, diagnostics,
|
|
51
|
+
static analyze(analyzer, diagnostics, taskController) {
|
|
52
52
|
return __async(this, null, function* () {
|
|
53
53
|
let hasErrorsPreventingCompilation = false;
|
|
54
54
|
const sourcePackageGraph = new SourcePackageDependencyGraph(analyzer);
|
|
55
|
-
const packages = Array.from(sourcePackageGraph.
|
|
55
|
+
const packages = Array.from(sourcePackageGraph.packagesForTargetPlatform(0 /* JavaScript */));
|
|
56
56
|
for (const pkg of packages) {
|
|
57
57
|
for (const sourceFile of pkg.sourceFiles) {
|
|
58
|
-
const
|
|
59
|
-
const fileDiagnostics = yield
|
|
58
|
+
const sourceFileAnalyzer = new SourceFileAnalyzer(analyzer, sourceFile);
|
|
59
|
+
const fileDiagnostics = yield sourceFileAnalyzer.analyze(taskController);
|
|
60
60
|
for (const diagnostic of fileDiagnostics) {
|
|
61
61
|
diagnostics?.addDiagnostic(diagnostic);
|
|
62
62
|
hasErrorsPreventingCompilation ||= pkg.kind === "program" && fileDiagnostics.some((d) => d.data.kind === 0 /* Error */);
|
|
@@ -66,21 +66,21 @@ var Compiler = class {
|
|
|
66
66
|
return !hasErrorsPreventingCompilation;
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
static emit(analyzer, outputUri, outputAcceptor,
|
|
69
|
+
static emit(analyzer, outputUri, outputAcceptor, diagnostics, taskController, emitOptions) {
|
|
70
70
|
return __async(this, null, function* () {
|
|
71
71
|
if (analyzer.compilation.mainPackage === void 0) {
|
|
72
|
-
|
|
72
|
+
diagnostics?.addDiagnostic(new Diagnostic(DiagnosticData.withCode(
|
|
73
73
|
403 /* ProgramWithoutMainPackageCannotBeCompiled */
|
|
74
74
|
), void 0));
|
|
75
75
|
return void 0;
|
|
76
76
|
}
|
|
77
77
|
const emitter = new Emitter(analyzer, emitOptions);
|
|
78
|
-
yield emitter.emitToFileSystem(outputUri, outputAcceptor,
|
|
78
|
+
yield emitter.emitToFileSystem(outputUri, outputAcceptor, taskController);
|
|
79
79
|
const launchUri = outputUri.append(Emitter.LaunchFileName);
|
|
80
80
|
return launchUri;
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
|
-
static emitToString(analyzer, _diagnostics,
|
|
83
|
+
static emitToString(analyzer, _diagnostics, taskController, emitOptions) {
|
|
84
84
|
return __async(this, null, function* () {
|
|
85
85
|
if (analyzer.compilation.mainPackage === void 0) {
|
|
86
86
|
_diagnostics?.addDiagnostic(new Diagnostic(DiagnosticData.withCode(
|
|
@@ -89,7 +89,7 @@ var Compiler = class {
|
|
|
89
89
|
return "";
|
|
90
90
|
}
|
|
91
91
|
const emitter = new Emitter(analyzer, emitOptions);
|
|
92
|
-
const result = yield emitter.emitToString(
|
|
92
|
+
const result = yield emitter.emitToString(taskController);
|
|
93
93
|
return result;
|
|
94
94
|
});
|
|
95
95
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Name } from '../common/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { MethodEntity, NamedFunctionEntity, PackageOrNestedFunctionEntity, ParameterEntity, TypeParameterEntity } from '../entities/index.js';
|
|
3
3
|
import * as types from '../types/index.js';
|
|
4
4
|
import { Analyzer } from './Analyzer.js';
|
|
5
5
|
import { SubstitutedFunction } from './SubstitutedFunction.js';
|
|
@@ -44,7 +44,7 @@ export declare class AccessedFunction_substitutedFunction implements IAccessedFu
|
|
|
44
44
|
getTypeParameters(): readonly TypeParameterEntity[];
|
|
45
45
|
getParameters(): readonly AccessedFunctionParameter[];
|
|
46
46
|
getReturnType(): types.Type;
|
|
47
|
-
getEntity():
|
|
47
|
+
getEntity(): NamedFunctionEntity;
|
|
48
48
|
getName(): Name;
|
|
49
49
|
getSignatureType(analyzer: Analyzer): types.FunctionType;
|
|
50
50
|
getOuterSubstitutions(): types.Substitutions | undefined;
|
|
@@ -58,7 +58,7 @@ interface IAccessedFunction {
|
|
|
58
58
|
getTypeParameters(): readonly TypeParameterEntity[];
|
|
59
59
|
getParameters(): readonly AccessedFunctionParameter[];
|
|
60
60
|
getReturnType(): types.Type;
|
|
61
|
-
getEntity():
|
|
61
|
+
getEntity(): NamedFunctionEntity;
|
|
62
62
|
getName(): Name;
|
|
63
63
|
getSignatureType(analyzer: Analyzer): types.FunctionType;
|
|
64
64
|
getOuterSubstitutions(): types.Substitutions | undefined;
|
|
@@ -15,6 +15,6 @@ export declare class AnalyzedTextTranslationPackage {
|
|
|
15
15
|
getTranslationLocale(): string;
|
|
16
16
|
getEntitiesByTextKey(textKey: TextKey): readonly TextTranslationEntity[] | undefined;
|
|
17
17
|
private createEntitiesByTextKey;
|
|
18
|
-
private
|
|
19
|
-
private
|
|
18
|
+
private textTranslationDeclarations;
|
|
19
|
+
private translationsDeclarations;
|
|
20
20
|
}
|
|
@@ -12,32 +12,34 @@ export declare class AnalyzedTranslationPackage {
|
|
|
12
12
|
private readonly analyzer;
|
|
13
13
|
private readonly package_;
|
|
14
14
|
private readonly targetPackage;
|
|
15
|
-
private readonly
|
|
15
|
+
private readonly entityNameConflictsValidator;
|
|
16
16
|
private readonly localizedPackageByOriginalReferencedPackage;
|
|
17
17
|
private readonly translatedEntityByOriginal;
|
|
18
|
-
private hasCreatedPackageMembers;
|
|
19
|
-
private readonly typesOrExtensionsWithCreatedMembers;
|
|
20
18
|
private readonly packageMemberTranslationTargetsByNode;
|
|
21
19
|
private readonly typeMemberTranslationTargetsByNode;
|
|
20
|
+
private readonly translatedPackageMembers;
|
|
21
|
+
private readonly translatedTypeMembersByTypeOrExtensionEntity;
|
|
22
22
|
constructor(analyzer: Analyzer, package_: TranslationPackage, targetPackage: PackageEntity);
|
|
23
23
|
getTargetPackage(): PackageEntity;
|
|
24
24
|
getDefinition(): TranslationPackage;
|
|
25
25
|
getTranslatedName(): PackageName;
|
|
26
26
|
getTranslationLocale(): PackageLocale;
|
|
27
27
|
getLocalizedPackageByOriginalReferencedPackage(): ReadonlyMap<PackageEntity, PackageEntity>;
|
|
28
|
-
|
|
28
|
+
getTranslatedPackageMembers(): PackageEntityMembers;
|
|
29
|
+
ensureAllLazyDiagnosticsReportedForSourceFile(sourceFile: SourceFile): void;
|
|
30
|
+
accumulateDiagnosticForSourceFile(sourceFile: SourceFile, diagnostics: DiagnosticAcceptor): void;
|
|
29
31
|
getPackageMemberTranslationTargets(node: tree.TranslationDeclaration): TranslationTargets<PackageMemberEntity> | undefined;
|
|
30
32
|
getTypeMemberTranslationTargets(node: tree.TypeMemberTranslation): TranslationTargets<TypeMemberEntity> | undefined;
|
|
31
33
|
getTranslatedPackageMember(entity: PackageMemberEntity): PackageMemberEntity;
|
|
32
34
|
getTranslatedTypeMember(entity: TypeMemberEntity): TypeMemberEntity;
|
|
33
35
|
getTranslatedAnonymousTypeEntity(entity: AnonymousTypeEntity): AnonymousTypeEntity;
|
|
34
|
-
|
|
35
|
-
createTranslatedTypeOrExtensionMembers(translatedTypeEntity: TypeWithMembersOrExtensionEntity, typeTranslationDeclaration: tree.TypeTranslationDeclaration | undefined): TypeEntityMembers;
|
|
36
|
+
getTranslatedTypeOrExtensionMembers(translatedTypeEntity: TypeWithMembersOrExtensionEntity): TypeEntityMembers;
|
|
36
37
|
createTranslatedTypeParameters(original: readonly TypeParameterEntity[], node: tree.TranslationTypeParameterList | undefined, containingEntity: EntityContainingTypeParameter): readonly TypeParameterEntity[];
|
|
37
38
|
createTranslatedParameters(original: readonly ParameterEntity[], node: tree.TranslationParameterList | undefined, containingEntity: EntityContainingParameter): readonly ParameterEntity[];
|
|
38
39
|
static isPackageMemberEntityThatShouldBeTranslatedByUser(entity: PackageMemberEntity): boolean;
|
|
39
40
|
static isTypeMemberEntityThatShouldBeTranslatedByUser(entity: TypeMemberEntity): boolean;
|
|
40
|
-
private
|
|
41
|
+
private createTranslatedPackageMembers;
|
|
42
|
+
private createTranslatedTypeOrExtensionMembers;
|
|
41
43
|
private ensureTypeMembersHaveBeenCreated;
|
|
42
44
|
private reportPackageMemberHasAlreadyBeenTranslatedDiagnostic;
|
|
43
45
|
private reportTypeMemberHasAlreadyBeenTranslatedDiagnostic;
|
|
@@ -59,7 +61,8 @@ export declare class AnalyzedTranslationPackage {
|
|
|
59
61
|
private createNotTranslatedEntitiesDiagnostic;
|
|
60
62
|
private createLocalizedPackageByOriginalReferencedPackage;
|
|
61
63
|
private createTranslatedDefaultConstructorEntity;
|
|
62
|
-
private
|
|
64
|
+
private tryCreateAutomaticTranslationOfDerivedTypeMember;
|
|
65
|
+
private translationsDeclarations;
|
|
63
66
|
}
|
|
64
67
|
export interface TranslationTargets<T extends Entity = Entity> {
|
|
65
68
|
readonly values: readonly T[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ts from 'typescript';
|
|
2
|
-
import {
|
|
2
|
+
import { DisplayableOrPrimitive, Name, PackageLocale, Query, Range, TaskController, TypeWithMembersOrTypeExtensionDeclaration, WithDiagnostics } from '../common/index.js';
|
|
3
3
|
import { Diagnostic, DiagnosticAcceptor, DiagnosticLocation } from '../diagnostic/Diagnostic.js';
|
|
4
4
|
import { DiagnosticCode } from '../diagnostic/DiagnosticCode.js';
|
|
5
5
|
import { DiagnosticFlags, DiagnosticKind } from '../diagnostic/DiagnosticData.js';
|
|
@@ -91,7 +91,6 @@ export declare class Analyzer {
|
|
|
91
91
|
private readonly prefixUnaryExpressionOperatorResolutionResults;
|
|
92
92
|
private readonly binaryExpressionUserDefinableOperatorResolutionResults;
|
|
93
93
|
private readonly assignmentStatementOperatorResolutionResults;
|
|
94
|
-
private readonly parametersOfFunctionBlockLiterals;
|
|
95
94
|
private readonly extendedTypes;
|
|
96
95
|
private readonly analyzedTranslationPackages;
|
|
97
96
|
private readonly analyzedTextTranslationPackages;
|
|
@@ -138,7 +137,7 @@ export declare class Analyzer {
|
|
|
138
137
|
getUnambiguousTargetReferenceType(targetType: types.Type | undefined): types.Type | undefined;
|
|
139
138
|
resolveMemberAccessExpressionFirstStage(node: tree.MemberAccessExpression): memberAccessExpressionResolution.FirstStageResolutionResult;
|
|
140
139
|
resolveMemberAccessExpression(node: tree.MemberAccessExpression, analysisOptions?: ExpressionAnalysisOptions): memberAccessExpressionResolution.ResolutionResult;
|
|
141
|
-
|
|
140
|
+
getPackageImportsOfDirective(packageImportDirectives: Iterable<tree.PackageImportDirective>): Iterable<tree.PackageImport>;
|
|
142
141
|
getSourceFileMembers(node: tree.SourceFile): SourceFileMembers;
|
|
143
142
|
resolveCallExpression(node: tree.CallExpression, analysisOptions?: ExpressionAnalysisOptions): callExpressionMeaning.ResolutionResult;
|
|
144
143
|
getRespectiveParameter(node: tree.Argument): MatchResultParameter | undefined;
|
|
@@ -204,7 +203,7 @@ export declare class Analyzer {
|
|
|
204
203
|
* возвращаемого значения допустимо). В таком случае это генератор, не возвращающий ни одного элемента.
|
|
205
204
|
*/
|
|
206
205
|
isFunctionGenerator(node: FunctionDeclaration): boolean;
|
|
207
|
-
|
|
206
|
+
allAspectsOfType(type: types.Type): Iterable<types.StructuredType>;
|
|
208
207
|
checkTypeIsBasedOnAspect(type: types.Type, aspectEntity: e.StructuredTypeEntity): boolean;
|
|
209
208
|
resolvePrefixUnaryExpressionUserDefinableOperator(node: tree.PrefixUnaryExpression): WithDiagnostics<types.Operator>;
|
|
210
209
|
resolveBinaryExpressionUserDefinableOperator(node: tree.BinaryExpression, operatorKind: BinaryOperatorKind): WithDiagnostics<types.Operator>;
|
|
@@ -260,7 +259,6 @@ export declare class Analyzer {
|
|
|
260
259
|
excludeTypeFromUnion(initialType: types.Type, excludedType: types.Type): types.Type;
|
|
261
260
|
isParameterVariadic(entity: e.VariableEntity): boolean;
|
|
262
261
|
getDefaultTypeParameterConstraint(locale: PackageLocale): types.Type;
|
|
263
|
-
getFunctionBlockLiteralParameters(node: tree.FunctionBlockLiteral): readonly e.ParameterEntity[];
|
|
264
262
|
getExtendedType(node: tree.TypeExtensionDeclaration): WithDiagnostics<e.NamedTypeEntity>;
|
|
265
263
|
getAnalyzedTranslationPackageIfTargetResolved(package_: project.TranslationPackage): AnalyzedTranslationPackage | undefined;
|
|
266
264
|
getAnalyzedTextTranslationPackageIfTargetResolved(package_: project.TextTranslationPackage): AnalyzedTextTranslationPackage | undefined;
|
|
@@ -286,9 +284,9 @@ export declare class Analyzer {
|
|
|
286
284
|
instantiateTypeMemberByIdentitySubstitution(entity: e.TypeMemberEntity): types.TypeMember;
|
|
287
285
|
createPackageMemberHiding(node: tree.PackageMemberDeclaration, modifierFlags: ModifierFlags): e.EntityHidingLevel | undefined;
|
|
288
286
|
createTypeMemberHiding(node: tree.TypeMemberDeclaration, modifierFlags: ModifierFlags): e.EntityHidingLevel | undefined;
|
|
289
|
-
collectDeclarationsUsageOfPackages(targetPlatform: PlatformKind,
|
|
290
|
-
getDeclarationsUsageOfSourceFile(sourceFile: tree.SourceFile,
|
|
291
|
-
getPackageAndStaticVariablesInitializationDiagnostics(pkg: SourcePackage,
|
|
287
|
+
collectDeclarationsUsageOfPackages(targetPlatform: PlatformKind, taskController: TaskController): Promise<Map<tree.SourceFile, DeclarationsUsageMap>>;
|
|
288
|
+
getDeclarationsUsageOfSourceFile(sourceFile: tree.SourceFile, taskController: TaskController): Promise<DeclarationsUsageMap>;
|
|
289
|
+
getPackageAndStaticVariablesInitializationDiagnostics(pkg: SourcePackage, taskController: TaskController): Promise<readonly Diagnostic[]>;
|
|
292
290
|
createDefaultConstructors(typeEntity: e.StructuredTypeEntity, fields: readonly e.FieldEntity[]): readonly e.ConstructorEntity[];
|
|
293
291
|
createBackingPackageVariables(declaredMembers: readonly (e.NamedPackageMemberEntity | e.PackageAliasEntity)[], pkg: e.PackageEntity): e.PackageVariableEntity[];
|
|
294
292
|
createBackingFields(declaredMembers: readonly e.NamedTypeMemberEntity[], type: e.TypeEntity): e.FieldEntity[];
|
|
@@ -308,8 +306,7 @@ export declare class Analyzer {
|
|
|
308
306
|
createAmbiguousNamedScopeDeclarationAccessDiagnostic(declarations: readonly semanticContext.NamedDeclaration[], node: tree.Node): Diagnostic;
|
|
309
307
|
addDiagnosticComputedLazily(diagnostic: Diagnostic): void;
|
|
310
308
|
getAcceptorForDiagnosticsComputedLazily(): DiagnosticAcceptor;
|
|
311
|
-
|
|
312
|
-
getDiagnosticsWithoutLocationComputedLazily(): readonly Diagnostic[];
|
|
309
|
+
accumulateSourceFileDiagnosticsComputedLazily(sourceFile: project.SourceFile, diagnostics: DiagnosticAcceptor): void;
|
|
313
310
|
validateSourcePackageMemberConflicts(pkg: project.ProgramPackage): readonly Diagnostic[];
|
|
314
311
|
getNotExplicitlyImplementedAbstractMembers(typeEntity: e.TypeEntityWithMembers): readonly types.TypeMember[];
|
|
315
312
|
getTypeMemberImplementationCheckResult(typeEntity: e.TypeEntityWithMembers): TypeMemberImplementationCheckResult;
|
|
@@ -388,9 +385,10 @@ declare class Type {
|
|
|
388
385
|
ofExpression(node: tree.Expression, analysisOptions?: ExpressionAnalysisOptions): types.Type;
|
|
389
386
|
ofTypeSpecifier(node: tree.TypeSpecifier): types.Type;
|
|
390
387
|
ofAccessedOperator(operator: types.Operator): types.Type;
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
388
|
+
private ofFunctionBlockLiteral;
|
|
389
|
+
private ofFunctionLiteral;
|
|
390
|
+
private ofRegularOrBlockFunctionLiteral;
|
|
391
|
+
private createFunctionTypeOfFunctionEntity;
|
|
394
392
|
private ofArrayLiteral;
|
|
395
393
|
private ofAssertionExpression;
|
|
396
394
|
private ofAssumptionExpression;
|
|
@@ -431,10 +429,6 @@ declare class Type {
|
|
|
431
429
|
private ofUnionTypeSpecifier;
|
|
432
430
|
private ofIntersectionTypeSpecifier;
|
|
433
431
|
private ofInvalidTypeSpecifier;
|
|
434
|
-
private createFunctionLiteralType;
|
|
435
|
-
private createFunctionBlockLiteralType;
|
|
436
|
-
private inferAndCacheReturnTypeOfRegularOrBlockFunctionLiteral;
|
|
437
|
-
private replaceReturnTypeOfFunctionType;
|
|
438
432
|
private reportReturnTypeCanNotBeInferredDiagnostic;
|
|
439
433
|
private getNarrowedTypeIfNarrowableReference;
|
|
440
434
|
}
|
|
@@ -485,6 +479,8 @@ declare class Entity {
|
|
|
485
479
|
private readonly packageAliasEntities;
|
|
486
480
|
private readonly translationTextTemplateParameterEntities;
|
|
487
481
|
private readonly textTranslationDeclarationEntities;
|
|
482
|
+
private readonly functionLiteralEntities;
|
|
483
|
+
private readonly functionBlockLiteralEntities;
|
|
488
484
|
constructor(analyzer: Analyzer);
|
|
489
485
|
ofPackage(pkg: SourcePackage): e.PackageEntity;
|
|
490
486
|
ofPackageVariableDeclaration(node: tree.PackageVariableDeclaration): e.PackageVariableEntity;
|
|
@@ -531,6 +527,12 @@ declare class Entity {
|
|
|
531
527
|
ofTypeWithMembersOrExtensionDeclaration(node: TypeWithMembersOrTypeExtensionDeclaration): e.TypeWithMembersOrExtensionEntity;
|
|
532
528
|
ofTranslationTextTemplateParameter(node: tree.TranslationTextTemplateParameter): e.ParameterEntity;
|
|
533
529
|
ofTextTranslationDeclaration(node: tree.TextTranslationSource): e.TextTranslationEntity;
|
|
530
|
+
ofFunctionLiteral(node: tree.FunctionLiteral): e.AnonymousFunctionEntity;
|
|
531
|
+
ofFunctionBlockLiteral(node: tree.FunctionBlockLiteral): e.AnonymousFunctionEntity;
|
|
532
|
+
ofRegularOrBlockFunctionLiteral(node: RegularOrBlockFunctionLiteral): e.AnonymousFunctionEntity;
|
|
533
|
+
ofFunctionLiteralInternal(node: tree.FunctionLiteral): e.FunctionLiteralEntity;
|
|
534
|
+
ofFunctionBlockLiteralInternal(node: tree.FunctionBlockLiteral): e.FunctionBlockLiteralEntity;
|
|
535
|
+
ofFunctionLiteralParameterDeclarationInternal(node: tree.ParameterDeclaration, literal: tree.FunctionLiteral): e.FunctionLiteralParameterDeclarationEntity;
|
|
534
536
|
private getContainingPackageLoadedFromDts;
|
|
535
537
|
private createComputedFieldEntities;
|
|
536
538
|
private createDereferenceOperatorEntities;
|
|
@@ -599,8 +601,8 @@ declare class OverriddenMember {
|
|
|
599
601
|
private checkMethodOverridesOrShadowsMethod;
|
|
600
602
|
private checkOperatorOverridesOrShadowsOperator;
|
|
601
603
|
private checkIndexerOverridesOrShadowsIndexer;
|
|
602
|
-
private
|
|
603
|
-
private
|
|
604
|
+
private typeMemberLookups;
|
|
605
|
+
private typesForOverriddenMemberLookup;
|
|
604
606
|
private entityCanOverrideOrShadow;
|
|
605
607
|
}
|
|
606
608
|
export declare enum ShadowReason {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TaskController } from '../common/index.js';
|
|
2
2
|
import { Entity, NamedEntity } from '../entities/index.js';
|
|
3
3
|
import * as tree from '../tree/index.js';
|
|
4
4
|
import { Analyzer } from './Analyzer.js';
|
|
@@ -7,7 +7,7 @@ export declare class DeclarationsUsageCounter {
|
|
|
7
7
|
private readonly sourceFile;
|
|
8
8
|
private readonly usageInfoByEntity;
|
|
9
9
|
constructor(analyzer: Analyzer, sourceFile: tree.SourceFile);
|
|
10
|
-
count(
|
|
10
|
+
count(taskController: TaskController): Promise<DeclarationsUsageMap>;
|
|
11
11
|
private recordUsage;
|
|
12
12
|
}
|
|
13
13
|
export declare class DeclarationsUsageMap {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TaskController } from '../common/index.js';
|
|
2
2
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
|
3
3
|
import * as project from '../project/index.js';
|
|
4
4
|
import { Analyzer } from './index.js';
|
|
5
|
-
export declare class
|
|
6
|
-
static readonly CancellationTokenThrottleTime = 50;
|
|
5
|
+
export declare class SourceFileAnalyzer {
|
|
7
6
|
private readonly analyzer;
|
|
8
7
|
private readonly sourceFile;
|
|
9
8
|
private readonly diagnosticArgumentFactory;
|
|
@@ -19,8 +18,8 @@ export declare class DiagnosticCollector {
|
|
|
19
18
|
private get isInterfacePackageFile();
|
|
20
19
|
private get standardTypes();
|
|
21
20
|
constructor(analyzer: Analyzer, sourceFile: project.SourceFile);
|
|
22
|
-
|
|
23
|
-
private
|
|
21
|
+
analyze(taskController: TaskController): Promise<Diagnostic[]>;
|
|
22
|
+
private analyzeNode;
|
|
24
23
|
private checkTypeParameterList;
|
|
25
24
|
private checkTypeParameterDeclaration;
|
|
26
25
|
private checkFunctionLiteral;
|
|
@@ -10,9 +10,9 @@ export declare class SourcePackageDependencyGraph {
|
|
|
10
10
|
* Перечислить все пакеты и их зависимости, включая транзитивные, начиная от корневых пакетов.
|
|
11
11
|
* @param platformKind Связывать многоплатформенные пакеты с реализацией для заданной платформы.
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
packagesForTargetPlatform(platformKind: PlatformKind): Iterable<SourcePackage>;
|
|
14
14
|
private getNodeForPackage;
|
|
15
|
-
private
|
|
15
|
+
private nodeAndDependenciesRecursively;
|
|
16
16
|
}
|
|
17
17
|
export interface SourcePackageDependencyGraphNode {
|
|
18
18
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Name } from '../common/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { MethodEntity, NamedFunctionEntity, PackageOrNestedFunctionEntity } from '../entities/index.js';
|
|
3
3
|
import * as types from '../types/index.js';
|
|
4
4
|
import { AccessedFunctionParameter } from './AccessedFunction.js';
|
|
5
5
|
import { Analyzer } from './Analyzer.js';
|
|
@@ -29,7 +29,7 @@ export declare class SubstitutedFunction_typeMember implements ISubstitutedFunct
|
|
|
29
29
|
private readonly parameters;
|
|
30
30
|
get debuggerDisplay(): string;
|
|
31
31
|
constructor(method: types.Method, substitutions: types.Substitutions);
|
|
32
|
-
getEntity():
|
|
32
|
+
getEntity(): MethodEntity;
|
|
33
33
|
getName(): Name;
|
|
34
34
|
getSignatureType(analyzer: Analyzer): types.FunctionType;
|
|
35
35
|
getSubstitutions(): types.Substitutions;
|
|
@@ -39,7 +39,7 @@ export declare class SubstitutedFunction_typeMember implements ISubstitutedFunct
|
|
|
39
39
|
isAsync(): boolean;
|
|
40
40
|
}
|
|
41
41
|
interface ISubstitutedFunction {
|
|
42
|
-
getEntity():
|
|
42
|
+
getEntity(): NamedFunctionEntity;
|
|
43
43
|
getName(): Name;
|
|
44
44
|
getSignatureType(analyzer: Analyzer): types.FunctionType;
|
|
45
45
|
getSubstitutions(): types.Substitutions;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
|
|
2
|
+
import { PackageEntity } from '../entities/index.js';
|
|
3
|
+
import { SourceFile } from '../project/SourceFile.js';
|
|
4
|
+
import { Analyzer } from './Analyzer.js';
|
|
5
|
+
/**
|
|
6
|
+
* Переведённые имена проверяются по следующим правилам:
|
|
7
|
+
* - Если объявления имеют одинаковые имена на исходном языке, то они должны иметь одинаковые имена на языке перевода.
|
|
8
|
+
* - Если объявления имеют разные имена на исходном языке, то они должны иметь разные имена на языке перевода.
|
|
9
|
+
* - Для членов типа: имя расширенного члена типа должно быть таким же, как имя базового члена типа.
|
|
10
|
+
*/
|
|
11
|
+
export declare class TranslatedEntityNameConflictsValidator {
|
|
12
|
+
private readonly analyzer;
|
|
13
|
+
private readonly package_;
|
|
14
|
+
private readonly packageMemberDiagnostics;
|
|
15
|
+
private arePackageMembersValidated;
|
|
16
|
+
constructor(analyzer: Analyzer, package_: PackageEntity);
|
|
17
|
+
accumulateDiagnosticForSourceFile(sourceFile: SourceFile, diagnostics: DiagnosticAcceptor): void;
|
|
18
|
+
private ensurePackageMembersAreValidated;
|
|
19
|
+
private validatePackageMembers;
|
|
20
|
+
private validateTypeMembers;
|
|
21
|
+
private checkTranslatedMembersHaveSameName;
|
|
22
|
+
private checkOriginalMembersHaveSameName;
|
|
23
|
+
private getTranslatedNameNode;
|
|
24
|
+
private validateTypeParameterNameConflicts;
|
|
25
|
+
private validateParameterNameConflicts;
|
|
26
|
+
private checkOverridingMemberHasTheSameNameAsBaseMember;
|
|
27
|
+
private getTranslationDefinitionNode;
|
|
28
|
+
}
|
|
@@ -19,8 +19,7 @@ export declare class SourceTranslationDefinition {
|
|
|
19
19
|
}
|
|
20
20
|
export type SourceTranslationDefinitionNode = tree.TranslationDeclaration | tree.TypeMemberTranslation;
|
|
21
21
|
export declare class IntrinsicTranslationDefinition {
|
|
22
|
-
readonly isMissingTranslationReplacement: boolean;
|
|
23
22
|
readonly kind = "intrinsic";
|
|
24
|
-
constructor(
|
|
23
|
+
constructor();
|
|
25
24
|
equals(other: TranslationDefinition): boolean;
|
|
26
25
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './Analyzer.js';
|
|
2
2
|
export * from './ArgumentsToParametersMatcher.js';
|
|
3
3
|
export * from './DeclarationsUsageCounter.js';
|
|
4
|
-
export * from './
|
|
4
|
+
export * from './SourceFileAnalyzer.js';
|
|
5
5
|
export * from './FindModifier.js';
|
|
6
6
|
export * from './SourcePackageDependencyGraph.js';
|
|
7
7
|
export * from './Visitor.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Name } from '../../common/index.js';
|
|
2
|
-
import { EntityHidingLevel,
|
|
2
|
+
import { EntityHidingLevel, MethodEntity, NamedFunctionEntity, NamedTypeEntity, PackageAliasEntity, PackageOrNestedFunctionEntity, VariableEntity } from '../../entities/index.js';
|
|
3
3
|
import * as types from '../../types/index.js';
|
|
4
4
|
import { PackageNameTreeNode } from '../ImportedPackageNameTree.js';
|
|
5
5
|
export type TypeOrContainerWithTypes = NamedDeclaration_type | NamedDeclaration_packageAlias | NamedDeclaration_packageNameSegment;
|
|
@@ -26,13 +26,13 @@ export declare class NamedDeclarationFunction_typeMember implements INamedDeclar
|
|
|
26
26
|
readonly value: types.Method;
|
|
27
27
|
constructor(value: types.Method);
|
|
28
28
|
getName(): Name;
|
|
29
|
-
getEntity():
|
|
29
|
+
getEntity(): MethodEntity;
|
|
30
30
|
getTypeParameterArity(): number;
|
|
31
31
|
isHidden(): EntityHidingLevel | undefined;
|
|
32
32
|
}
|
|
33
33
|
interface INamedDeclarationFunction {
|
|
34
34
|
getName(): Name;
|
|
35
|
-
getEntity():
|
|
35
|
+
getEntity(): NamedFunctionEntity;
|
|
36
36
|
getTypeParameterArity(): number;
|
|
37
37
|
isHidden(): EntityHidingLevel | undefined;
|
|
38
38
|
}
|
|
@@ -38,7 +38,7 @@ export declare abstract class SemanticContextBase {
|
|
|
38
38
|
getOperatorsByKind(kind: OperatorKind, noInstanceMembers?: boolean): readonly types.Operator[];
|
|
39
39
|
getTypeExtensionsByType(type: TypeEntity): readonly TypeExtensionEntity[];
|
|
40
40
|
getPrimaryTextTranslationEntityByTextKey(key: TextKey): TextTranslationEntity | undefined;
|
|
41
|
-
private
|
|
41
|
+
private semanticContexts;
|
|
42
42
|
private getSourceFileContext;
|
|
43
43
|
}
|
|
44
44
|
export type SubprogramInfo = SubprogramInfo.Function | SubprogramInfo.Operator | SubprogramInfo.Constructor | SubprogramInfo.Destructor | SubprogramInfo.Getter | SubprogramInfo.Setter | SubprogramInfo.PackageConstructor | SubprogramInfo.PackageEntryPoint | SubprogramInfo.FunctionLiteral | SubprogramInfo.TextTranslationFunction;
|
|
@@ -136,7 +136,7 @@ export declare namespace SubprogramInfo {
|
|
|
136
136
|
isGenerator(): boolean;
|
|
137
137
|
allowsAsyncCalls(): boolean;
|
|
138
138
|
getNode(): RegularOrBlockFunctionLiteral;
|
|
139
|
-
private
|
|
139
|
+
private getEntity;
|
|
140
140
|
}
|
|
141
141
|
export class TextTranslationFunction implements ISubprogramInfo {
|
|
142
142
|
readonly kind = "text-translation-function";
|
package/build/types/api/Api.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export type { Meaning as AutotypeCallExpressionMeaning } from '../analysis/Autot
|
|
|
6
6
|
export type { Meaning as BaseExpressionMeaning } from '../analysis/BaseExpressionMeaning.js';
|
|
7
7
|
export type { Meaning as CallExpressionMeaning } from '../analysis/CallExpressionMeaning.js';
|
|
8
8
|
export type { Meaning as DereferenceExpressionMeaning } from '../analysis/DereferenceExpressionMeaning.js';
|
|
9
|
-
export * from '../analysis/
|
|
9
|
+
export * from '../analysis/SourceFileAnalyzer.js';
|
|
10
10
|
export * from '../analysis/FindModifier.js';
|
|
11
11
|
export type { Meaning as IdentifierExpressionMeaning, ResolutionResult as IdentifierExpressionResolutionResult } from '../analysis/IdentifierExpressionMeaning.js';
|
|
12
12
|
export * from '../analysis/ImportedPackageNameTree.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CancellationToken } from './CancellationToken.js';
|
|
2
|
+
export declare class TaskController {
|
|
3
|
+
private checkCount;
|
|
4
|
+
private lastTimeMs;
|
|
5
|
+
private timeSliceMs;
|
|
6
|
+
readonly cancellationToken: CancellationToken | undefined;
|
|
7
|
+
constructor(timeSliceMs?: number, cancellationToken?: CancellationToken);
|
|
8
|
+
shouldYieldOnceOutOf100(): boolean;
|
|
9
|
+
shouldYield(onceOutOf?: number): boolean;
|
|
10
|
+
isCancellationRequested(): boolean;
|
|
11
|
+
throwIfCancellationRequested(): void;
|
|
12
|
+
yieldTask(timeMs?: number): Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export declare function yieldTask(timeMs?: number): Promise<void>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as tree from '../tree/index.js';
|
|
2
|
-
import {
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function traverseTree(root: tree.Node, visitNodeCb: (node: tree.Node, controller: TraversalController) => void): void;
|
|
2
|
+
import { TaskController } from './TaskController.js';
|
|
3
|
+
export declare function traverseTree(root: tree.Node, visitTokens: boolean, taskController: TaskController | undefined, nodeVisitor: (node: tree.Node, controller: TraversalController) => Promise<void> | undefined): Promise<void>;
|
|
5
4
|
export declare class TraversalController {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
private shouldStopTraverse_;
|
|
6
|
+
private shouldSkipChildrenTraverse_;
|
|
7
|
+
readonly task?: TaskController;
|
|
8
|
+
constructor(task?: TaskController);
|
|
9
|
+
shouldStopTraverse(): boolean;
|
|
10
|
+
shouldSkipChildrenTraverse(): boolean;
|
|
9
11
|
stopTraverse(): void;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
reset(): void;
|
|
12
|
+
skipChildrenTraverse(): void;
|
|
13
|
+
resetSkipChildrenTraverse(): void;
|
|
13
14
|
}
|
|
@@ -24,10 +24,9 @@ export * from './PerformanceMeasurement.js';
|
|
|
24
24
|
export * from './Query.js';
|
|
25
25
|
export * from './Range.js';
|
|
26
26
|
export * from './Result.js';
|
|
27
|
-
export * from './ThrottledCancellationToken.js';
|
|
28
27
|
export * from './TreeQuery.js';
|
|
29
28
|
export * from './TreeTraversal.js';
|
|
30
29
|
export * from './Uri.js';
|
|
31
30
|
export * from './UserLocale.js';
|
|
32
31
|
export * from './WithDiagnostics.js';
|
|
33
|
-
export * from './
|
|
32
|
+
export * from './TaskController.js';
|
|
@@ -226,7 +226,11 @@ export declare enum DiagnosticCode {
|
|
|
226
226
|
TheNumberOfTranslatedParametersMustBeEqualToTheNumberOfSourceParameters = 388,
|
|
227
227
|
TheNumberOfTranslatedTypeParametersMustBeEqualToTheNumberOfSourceTypeParameters = 389,
|
|
228
228
|
TheNameOfTheTranslatedOperatorMustMeTheSameAsSourceOperatorName = 390,
|
|
229
|
-
|
|
229
|
+
TranslationOfFunctionTypeMustIncludeParameterList = 391,
|
|
230
|
+
OnlyOneTextTranslationPackageShouldBeMarkedAsPrimary = 392,
|
|
231
|
+
Declarations0And1HaveTheSameSourceNamesButDifferentTranslatedNames23 = 393,
|
|
232
|
+
TranslatedDeclarations0And1HaveTheSameTranslatedNamesButDifferentSourceNames23 = 394,
|
|
233
|
+
TranslatedOverridingMember0MustTheSameNameAsBaseMember1 = 395,
|
|
230
234
|
CannotFindTsLibDirectoryBaseSearchPaths0 = 401,
|
|
231
235
|
SourceFile0IsNotPartOfThePackageAndWontBeLoaded = 402,
|
|
232
236
|
ProgramWithoutMainPackageCannotBeCompiled = 403,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Analyzer } from '../analysis/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { TaskController, Uri } from '../common/index.js';
|
|
3
3
|
import { JavaScriptImplementationConfig, PlatformKind } from '../project/index.js';
|
|
4
4
|
import { NamedEntity, PackageEntity, PackageMemberEntity } from './Entities.js';
|
|
5
5
|
import * as ir from './ir/index.js';
|
|
@@ -12,8 +12,8 @@ export declare class Emitter {
|
|
|
12
12
|
private readonly entityMap;
|
|
13
13
|
private readonly ectx;
|
|
14
14
|
constructor(analyzer: Analyzer, options: EmitOptions | undefined);
|
|
15
|
-
emitToFileSystem(outputUri: Uri, outputAcceptor: OutputAcceptor,
|
|
16
|
-
emitToString(
|
|
15
|
+
emitToFileSystem(outputUri: Uri, outputAcceptor: OutputAcceptor, taskController: TaskController): Promise<void>;
|
|
16
|
+
emitToString(taskController: TaskController): Promise<string>;
|
|
17
17
|
private createEmitterPackageFromSource;
|
|
18
18
|
private enumerateEmittingSourcePackages;
|
|
19
19
|
private createPackageWithMainFunction;
|
|
@@ -22,7 +22,7 @@ export declare class EmitterContext {
|
|
|
22
22
|
isTypeEmittedAsClass(entity: TypeOrExtensionEntity): boolean;
|
|
23
23
|
isRefOrPlainObjectTypeEntity(entity: TypeOrExtensionEntity): boolean;
|
|
24
24
|
isAspectTypeEntity(entity: TypeOrExtensionEntity): boolean;
|
|
25
|
-
|
|
25
|
+
allOverriddenMembers<T extends TypeMemberEntity>(entity: T): Iterable<T>;
|
|
26
26
|
}
|
|
27
27
|
export declare class WellKnownDeclarationKeys {
|
|
28
28
|
static readonly jsObjectType = "Platform.JavaScript.Object";
|
|
@@ -18,7 +18,7 @@ export declare class EntityMap {
|
|
|
18
18
|
private readonly linkedPackages;
|
|
19
19
|
constructor(analyzer: Analyzer, targetPlatform: PlatformKind);
|
|
20
20
|
getVariableEntity(entity: analyzerEntities.VariableEntity): emitterEntities.VariableEntity;
|
|
21
|
-
|
|
21
|
+
getNamedFunctionEntity(entity: analyzerEntities.NamedFunctionEntity): emitterEntities.FunctionEntity;
|
|
22
22
|
getOperatorEntity(entity: analyzerEntities.OperatorEntity): emitterEntities.FunctionEntity;
|
|
23
23
|
getConstructorEntity(entity: analyzerEntities.ConstructorEntity): emitterEntities.FunctionEntity;
|
|
24
24
|
getDestructorEntity(entity: analyzerEntities.DestructorEntity): emitterEntities.FunctionEntity;
|
|
@@ -90,13 +90,15 @@ export declare namespace TypeMemberEntity {
|
|
|
90
90
|
}
|
|
91
91
|
export type NamedTypeMemberEntity = FieldEntity | MethodEntity;
|
|
92
92
|
export declare function isNamedTypeMemberEntity(entity: Entity): entity is NamedTypeMemberEntity;
|
|
93
|
-
export type NamedEntity = VariableEntity | PackageVariantTypeEntity |
|
|
93
|
+
export type NamedEntity = VariableEntity | PackageVariantTypeEntity | NamedFunctionEntity | TypeParameterEntity | PackageFunctionTypeEntity | PackageStructuredTypeEntity | PackageAliasEntity | AliasTypeEntity;
|
|
94
94
|
export type PackageOrNestedFunctionEntity = PackageFunctionEntity | NestedFunctionEntity;
|
|
95
95
|
export type AccessorEntity = GetterEntity | SetterEntity;
|
|
96
96
|
export type EntityWithTypeParameters = EntityContainingTypeParameter;
|
|
97
97
|
export declare function isEntityWithTypeParameters(entity: Entity): entity is EntityWithTypeParameters;
|
|
98
98
|
export type EntityWithParameters = Exclude<EntityContainingParameter, PackageEntity>;
|
|
99
99
|
export declare function isEntityWithParameters(entity: Entity): entity is EntityWithParameters;
|
|
100
|
+
export type NamedFunctionEntity = PackageFunctionEntity | MethodEntity | NestedFunctionEntity;
|
|
101
|
+
export declare function isNamedFunctionEntity(entity: Entity): entity is NamedFunctionEntity;
|
|
100
102
|
export declare class EntityContext {
|
|
101
103
|
readonly containingPackage: PackageEntity;
|
|
102
104
|
readonly hidingMatcher: IEntityHidingMatcher;
|
|
@@ -5,8 +5,10 @@ export declare class EntityNaming_named {
|
|
|
5
5
|
readonly kind = "named";
|
|
6
6
|
constructor(value: Name);
|
|
7
7
|
toString(): string;
|
|
8
|
+
considerEqual(other: EntityNaming, considerBackQuotes: boolean): boolean;
|
|
8
9
|
}
|
|
9
10
|
export declare class EntityNaming_anonymous {
|
|
10
11
|
readonly kind = "anonymous";
|
|
11
12
|
toString(): string;
|
|
13
|
+
considerEqual(other: EntityNaming, _considerBackQuotes: boolean): boolean;
|
|
12
14
|
}
|