@artel/artc 0.6.25280 → 0.6.25282
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 +16 -10
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +315 -219
- package/build/{chunk-YIFO3FBO.js → chunk-3DN3M64Y.js} +3 -3
- package/build/{chunk-W3UL6UED.js → chunk-DURHSZYF.js} +5 -4
- package/build/{chunk-LLI2DYRX.js → chunk-VVFLEWSA.js} +3236 -3331
- package/build/types/analysis/AccessedFunction.d.ts +4 -0
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +3 -3
- package/build/types/analysis/Analyzer.d.ts +35 -48
- package/build/types/analysis/AutotypeCallExpressionMeaning.d.ts +5 -5
- package/build/types/analysis/BaseExpressionMeaning.d.ts +8 -18
- package/build/types/analysis/CallExpressionMeaning.d.ts +4 -9
- package/build/types/analysis/DereferenceExpressionMeaning.d.ts +3 -4
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +8 -16
- package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +4 -8
- package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +8 -16
- package/build/types/analysis/NamedTypeResolver.d.ts +4 -4
- package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +4 -4
- package/build/types/analysis/NodeTypeUtils.d.ts +1 -1
- package/build/types/analysis/ObjectExpressionMeaning.d.ts +4 -9
- package/build/types/analysis/{PackageMemberNameConflictsValidator.d.ts → PackageMemberConflictsValidator.d.ts} +8 -4
- package/build/types/analysis/ResolvedTextTranslationPackage.d.ts +9 -0
- package/build/types/analysis/SourceFileAnalyzer.d.ts +1 -0
- package/build/types/analysis/SourcePackageDependencyGraph.d.ts +4 -0
- package/build/types/analysis/SubstitutedFunction.d.ts +3 -0
- package/build/types/analysis/TagMeaning.d.ts +4 -4
- package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +4 -3
- package/build/types/analysis/UserDefinableUnaryOperatorResolver.d.ts +4 -3
- package/build/types/analysis/Utils.d.ts +1 -0
- package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +1 -1
- package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +8 -4
- package/build/types/api/Api.d.ts +4 -5
- package/build/types/common/ArrayUtils.d.ts +3 -1
- package/build/types/common/Displayable.d.ts +4 -4
- package/build/types/common/FormatString.d.ts +1 -1
- package/build/types/common/index.d.ts +3 -0
- package/build/types/diagnostic/DiagnosticCode.d.ts +238 -238
- package/build/types/diagnostic/DiagnosticData.d.ts +2 -2
- package/build/types/emitter/IrBuilder.d.ts +3 -1
- package/build/types/emitter/IrFactory.d.ts +2 -2
- package/build/types/emitter/Transformer.d.ts +3 -3
- package/build/types/emitter/ir/Nodes.d.ts +6 -6
- package/build/types/emitter/ir/types.d.ts +2 -2
- package/build/types/entities/Entity.d.ts +1 -1
- package/build/types/entities/EntityLocalizationContext.d.ts +2 -1
- package/build/types/entities/PackageEntityMembers.d.ts +22 -0
- package/build/types/entities/index.d.ts +1 -1
- package/build/types/entities/interfaces/PackageEntity.d.ts +1 -2
- package/build/types/entities/interfaces/TextTranslationEntity.d.ts +2 -1
- package/build/types/entities/interfaces/VariableEntity.d.ts +1 -1
- package/build/types/entities/source/SourcePackageEntity.d.ts +1 -2
- package/build/types/entities/source/SourceTextTranslationEntity.d.ts +2 -1
- package/build/types/entities/source/SourceTypeExtensionEntity.d.ts +4 -0
- package/build/types/entities/source/SourceVariableEntity.d.ts +2 -2
- package/build/types/entities/translated/TranslatedPackageEntity.d.ts +2 -3
- package/build/types/project/PackageContent.d.ts +1 -1
- package/build/types/project/SourcePackage.d.ts +3 -1
- package/build/types/project/configuration/ConfigurationConverter.d.ts +1 -1
- package/build/types/project/configuration/types/PackageConfigurationEn.d.ts +4 -4
- package/build/types/project/configuration/types/PackageConfigurationRu.d.ts +4 -4
- package/build/types/services/AddBlockToScriptService.d.ts +17 -0
- package/build/types/services/CustomRequests.d.ts +11 -2
- package/build/types/services/DisplayService.d.ts +1 -2
- package/build/types/services/EvaluatableExpressionService.d.ts +1 -1
- package/build/types/services/LanguageServer.d.ts +3 -1
- package/build/types/services/SourceFileItemsService.d.ts +1 -1
- package/build/types/tree/NodeKind.d.ts +1 -1
- package/build/types/tree/Nodes.d.ts +6 -6
- package/build/types/tree/SyntaxFactory.d.ts +1 -1
- package/build/types/tree/SyntaxToCode.d.ts +1 -1
- package/build/types/tree/Token.d.ts +4 -3
- package/build/types/tree/TokenKind.d.ts +58 -60
- package/build/types/types/AliasType.d.ts +1 -1
- package/build/types/types/FunctionType.d.ts +2 -2
- package/build/types/types/IntersectionType.d.ts +1 -1
- package/build/types/types/ParameterType.d.ts +1 -1
- package/build/types/types/Substitutions.d.ts +1 -1
- package/build/types/types/Type.d.ts +1 -4
- package/build/types/types/TypeMembers.d.ts +8 -8
- package/build/types/types/UnionType.d.ts +1 -1
- package/build/types/types/VariantType.d.ts +1 -1
- package/package.json +1 -1
- package/build/types/analysis/AnalyzedTextTranslationPackage.d.ts +0 -20
- package/build/types/analysis/SourceFileMembers.d.ts +0 -22
- package/build/types/entities/PackageMembers.d.ts +0 -15
|
@@ -20,6 +20,7 @@ export declare class AccessedFunction_entity implements IAccessedFunction {
|
|
|
20
20
|
getSignatureType(analyzer: Analyzer): types.FunctionType;
|
|
21
21
|
applySubstitutions(substitutions: types.Substitutions): AccessedFunction;
|
|
22
22
|
getOuterSubstitutions(): types.Substitutions | undefined;
|
|
23
|
+
equals(other: AccessedFunction, considerLocale?: boolean): boolean;
|
|
23
24
|
}
|
|
24
25
|
export declare class AccessedFunction_typeMember implements IAccessedFunction {
|
|
25
26
|
readonly value: types.Method;
|
|
@@ -35,6 +36,7 @@ export declare class AccessedFunction_typeMember implements IAccessedFunction {
|
|
|
35
36
|
getSignatureType(_analyzer: Analyzer): types.FunctionType;
|
|
36
37
|
applySubstitutions(substitutions: types.Substitutions): AccessedFunction;
|
|
37
38
|
getOuterSubstitutions(): types.Substitutions | undefined;
|
|
39
|
+
equals(other: AccessedFunction, considerLocale?: boolean): boolean;
|
|
38
40
|
}
|
|
39
41
|
export declare class AccessedFunction_substitutedFunction implements IAccessedFunction {
|
|
40
42
|
readonly value: SubstitutedFunction;
|
|
@@ -48,6 +50,7 @@ export declare class AccessedFunction_substitutedFunction implements IAccessedFu
|
|
|
48
50
|
getName(): Name;
|
|
49
51
|
getSignatureType(analyzer: Analyzer): types.FunctionType;
|
|
50
52
|
getOuterSubstitutions(): types.Substitutions | undefined;
|
|
53
|
+
equals(other: AccessedFunction, considerLocale?: boolean): boolean;
|
|
51
54
|
}
|
|
52
55
|
export declare class AccessedFunctionParameter {
|
|
53
56
|
readonly entity: ParameterEntity;
|
|
@@ -62,5 +65,6 @@ interface IAccessedFunction {
|
|
|
62
65
|
getName(): Name;
|
|
63
66
|
getSignatureType(analyzer: Analyzer): types.FunctionType;
|
|
64
67
|
getOuterSubstitutions(): types.Substitutions | undefined;
|
|
68
|
+
equals(other: AccessedFunction, considerLocale: boolean): boolean;
|
|
65
69
|
}
|
|
66
70
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PackageLocale } from '../common/index.js';
|
|
2
2
|
import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
|
|
3
|
-
import { EntityLocalizationContext } from '../entities/EntityLocalizationContext.js';
|
|
3
|
+
import { EntityLocalizationContext, LocalizablePackageMemberEntity } from '../entities/EntityLocalizationContext.js';
|
|
4
4
|
import { AnonymousTypeEntity, Entity, EntityContainingParameter, EntityContainingTypeParameter, PackageEntity, PackageEntityMembers, PackageMemberEntity, ParameterEntity, TypeEntityMembers, TypeMemberEntity, TypeParameterEntity, TypeWithMembersOrExtensionEntity } from '../entities/index.js';
|
|
5
5
|
import { PackageName, SourceFile, TranslationPackage } from '../project/index.js';
|
|
6
6
|
import * as tree from '../tree/index.js';
|
|
@@ -28,9 +28,9 @@ export declare class AnalyzedTranslationPackage {
|
|
|
28
28
|
getTranslatedPackageMembers(): PackageEntityMembers;
|
|
29
29
|
ensureAllLazyDiagnosticsReportedForSourceFile(sourceFile: SourceFile): void;
|
|
30
30
|
accumulateDiagnosticForSourceFile(sourceFile: SourceFile, diagnostics: DiagnosticAcceptor): void;
|
|
31
|
-
getPackageMemberTranslationTargets(node: tree.TranslationDeclaration): TranslationTargets<
|
|
31
|
+
getPackageMemberTranslationTargets(node: tree.TranslationDeclaration): TranslationTargets<LocalizablePackageMemberEntity> | undefined;
|
|
32
32
|
getTypeMemberTranslationTargets(node: tree.TypeMemberTranslation): TranslationTargets<TypeMemberEntity> | undefined;
|
|
33
|
-
getTranslatedPackageMember(entity:
|
|
33
|
+
getTranslatedPackageMember(entity: LocalizablePackageMemberEntity): LocalizablePackageMemberEntity;
|
|
34
34
|
getTranslatedTypeMember(entity: TypeMemberEntity): TypeMemberEntity;
|
|
35
35
|
getTranslatedAnonymousTypeEntity(entity: AnonymousTypeEntity): AnonymousTypeEntity;
|
|
36
36
|
getTranslatedTypeOrExtensionMembers(translatedTypeEntity: TypeWithMembersOrExtensionEntity): TypeEntityMembers;
|
|
@@ -3,6 +3,7 @@ import { DisplayableOrPrimitive, Name, PackageLocale, Query, Range, TaskControll
|
|
|
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';
|
|
6
|
+
import { WithDiagnostics } from '../diagnostic/WithDiagnostics.js';
|
|
6
7
|
import { BinaryOperatorKind } from '../entities/OperatorKind.js';
|
|
7
8
|
import * as e from '../entities/index.js';
|
|
8
9
|
import { ReservedIdentifierKind } from '../parser/ReservedIdentifierDictionary.js';
|
|
@@ -13,7 +14,6 @@ import { TsInteropContext, TsProgramState } from '../ts-interop/TsInteropContext
|
|
|
13
14
|
import * as types from '../types/index.js';
|
|
14
15
|
import { TypeFactory } from '../types/index.js';
|
|
15
16
|
import { AccessedFunction } from './AccessedFunction.js';
|
|
16
|
-
import { AnalyzedTextTranslationPackage } from './AnalyzedTextTranslationPackage.js';
|
|
17
17
|
import { AnalyzedTranslationPackage } from './AnalyzedTranslationPackage.js';
|
|
18
18
|
import { ArgumentToParameterMatchResult, MatchResultParameter } from './ArgumentToParameterMatchResult.js';
|
|
19
19
|
import * as autotypeCallExpressionMeaning from './AutotypeCallExpressionMeaning.js';
|
|
@@ -31,15 +31,14 @@ import { NamedTypeSpecifierResolutionResult } from './NamedTypeSpecifierResolver
|
|
|
31
31
|
import { DereferencedVariableAccessorDeclaration, FieldAccessorDeclaration, FunctionDeclaration, FunctionTypeDeclaration, GetterDeclaration, IndexedElementAccessorDeclaration, PackageVariableAccessorDeclaration, RegularOrBlockFunctionLiteral, SetterDeclaration, StructuredTypeDeclaration, TypeDeclaration, TypeWithMembersDeclaration, VariantTypeDeclaration } from './NodeTypeUtils.js';
|
|
32
32
|
import * as objectExpressionMeaning from './ObjectExpressionMeaning.js';
|
|
33
33
|
import { OwnAndBaseConstructorCallsCheckResult } from './OwnAndBaseConstructorCallsChecker.js';
|
|
34
|
-
import {
|
|
34
|
+
import { ResolvedTextTranslationPackage } from './ResolvedTextTranslationPackage.js';
|
|
35
35
|
import * as tags from './Tag.js';
|
|
36
36
|
import * as tagMeaning from './TagMeaning.js';
|
|
37
|
+
import { TypeWithMembersOrTypeExtensionDeclaration } from './TreeQuery.js';
|
|
37
38
|
import { TypeMemberImplementationCheckResult } from './TypeMemberImplementationChecker.js';
|
|
38
39
|
import * as controlFlow from './control-flow/index.js';
|
|
39
40
|
import { WellKnownDeclarations } from './index.js';
|
|
40
41
|
import * as semanticContext from './semantic-context/index.js';
|
|
41
|
-
import { TypeWithMembersOrTypeExtensionDeclaration } from './TreeQuery.js';
|
|
42
|
-
import { WithDiagnostics } from '../diagnostic/WithDiagnostics.js';
|
|
43
42
|
export declare class Analyzer {
|
|
44
43
|
readonly compilation: project.Compilation;
|
|
45
44
|
/**
|
|
@@ -78,7 +77,6 @@ export declare class Analyzer {
|
|
|
78
77
|
private readonly tsInterop_;
|
|
79
78
|
private readonly memberAccessExpressionResolutionResults;
|
|
80
79
|
private readonly memberAccessExpressionResolutionResultsFirstStage;
|
|
81
|
-
private readonly sourceFileMembers;
|
|
82
80
|
private readonly callExpressionResolutionResults;
|
|
83
81
|
private readonly indexedAccessExpressionResolutionResults;
|
|
84
82
|
private readonly dereferenceExpressionMeanings;
|
|
@@ -93,20 +91,19 @@ export declare class Analyzer {
|
|
|
93
91
|
private readonly prefixUnaryExpressionOperatorResolutionResults;
|
|
94
92
|
private readonly binaryExpressionUserDefinableOperatorResolutionResults;
|
|
95
93
|
private readonly assignmentStatementOperatorResolutionResults;
|
|
96
|
-
private readonly extendedTypes;
|
|
97
94
|
private readonly analyzedTranslationPackages;
|
|
98
|
-
private readonly
|
|
95
|
+
private readonly resolvedTextTranslationPackages;
|
|
99
96
|
private textTranslationPackagesByTargetPackage;
|
|
100
97
|
private primaryTextTranslationPackageByTargetPackage;
|
|
101
|
-
private
|
|
102
|
-
private primaryTextTranslationEntityByLocalizableTextTemplate;
|
|
98
|
+
private resolvedLocalizableTexts;
|
|
103
99
|
private readonly linkedMultiPlatformPackagesByPlatform;
|
|
104
100
|
private readonly isFunctionGeneratorCheckResults;
|
|
105
101
|
private readonly namedDeclarationsUsageCountResults;
|
|
106
102
|
private readonly packageAndStaticVariablesInitializationDiagnostics;
|
|
107
103
|
private readonly controlFlowGraphs;
|
|
108
|
-
private
|
|
109
|
-
private readonly
|
|
104
|
+
private sideDiagnosticAcceptor;
|
|
105
|
+
private readonly sideDiagnosticsByFile;
|
|
106
|
+
private readonly sideDiagnosticsWithoutFile;
|
|
110
107
|
private readonly sourcePackageMemberConflictsDiagnostics;
|
|
111
108
|
private readonly notExplicitlyImplementedAbstractTypeMembers;
|
|
112
109
|
private readonly typeMemberImplementationCheckResults;
|
|
@@ -137,21 +134,19 @@ export declare class Analyzer {
|
|
|
137
134
|
getUnambiguousTargetFunctionType(targetType: types.Type | undefined): types.FunctionType | undefined;
|
|
138
135
|
getUnambiguousTargetArrayType(targetType: types.Type | undefined): types.Type | undefined;
|
|
139
136
|
getUnambiguousTargetReferenceType(targetType: types.Type | undefined): types.Type | undefined;
|
|
140
|
-
resolveMemberAccessExpressionFirstStage(node: tree.MemberAccessExpression): memberAccessExpressionResolution.
|
|
141
|
-
resolveMemberAccessExpression(node: tree.MemberAccessExpression, analysisOptions?: ExpressionAnalysisOptions): memberAccessExpressionResolution.
|
|
142
|
-
|
|
143
|
-
getSourceFileMembers(node: tree.SourceFile): SourceFileMembers;
|
|
144
|
-
resolveCallExpression(node: tree.CallExpression, analysisOptions?: ExpressionAnalysisOptions): callExpressionMeaning.ResolutionResult;
|
|
137
|
+
resolveMemberAccessExpressionFirstStage(node: tree.MemberAccessExpression): memberAccessExpressionResolution.MeaningStage1;
|
|
138
|
+
resolveMemberAccessExpression(node: tree.MemberAccessExpression, analysisOptions?: ExpressionAnalysisOptions): memberAccessExpressionResolution.Meaning;
|
|
139
|
+
resolveCallExpression(node: tree.CallExpression, analysisOptions?: ExpressionAnalysisOptions): callExpressionMeaning.Meaning;
|
|
145
140
|
getRespectiveParameter(node: tree.Argument): MatchResultParameter | undefined;
|
|
146
|
-
resolveIndexedAccessExpression(node: tree.IndexedAccessExpression): indexedAccessExpressionMeaning.
|
|
141
|
+
resolveIndexedAccessExpression(node: tree.IndexedAccessExpression): indexedAccessExpressionMeaning.Meaning;
|
|
147
142
|
getDereferenceExpressionMeaning(node: tree.DereferenceExpression): dereferenceExpressionMeaning.Meaning;
|
|
148
143
|
resolveAutotypeCallExpression(node: tree.AutotypeCallExpression, analysisOptions?: ExpressionAnalysisOptions): autotypeCallExpressionMeaning.ResolutionResult;
|
|
149
|
-
resolveIdentifierExpressionFirstStage(node: tree.IdentifierExpression): identifierExpressionResolution.
|
|
150
|
-
resolveIdentifierExpression(node: tree.IdentifierExpression, analysisOptions?: ExpressionAnalysisOptions): identifierExpressionResolution.
|
|
144
|
+
resolveIdentifierExpressionFirstStage(node: tree.IdentifierExpression): identifierExpressionResolution.MeaningStage1;
|
|
145
|
+
resolveIdentifierExpression(node: tree.IdentifierExpression, analysisOptions?: ExpressionAnalysisOptions): identifierExpressionResolution.Meaning;
|
|
151
146
|
resolveTag(node: tree.Tag): tagMeaning.ResolutionResult;
|
|
152
|
-
resolveObjectExpression(node: tree.ObjectExpression): objectExpressionMeaning.
|
|
153
|
-
resolveBaseExpressionFirstStage(node: tree.BaseExpression): baseExpressionMeaning.
|
|
154
|
-
resolveBaseExpression(node: tree.BaseExpression): baseExpressionMeaning.
|
|
147
|
+
resolveObjectExpression(node: tree.ObjectExpression): objectExpressionMeaning.Meaning;
|
|
148
|
+
resolveBaseExpressionFirstStage(node: tree.BaseExpression): baseExpressionMeaning.MeaningStage1;
|
|
149
|
+
resolveBaseExpression(node: tree.BaseExpression): baseExpressionMeaning.Meaning;
|
|
155
150
|
/**
|
|
156
151
|
* Проверяет, является ли выражение цепочкой доступов через `?`, заканчивающейся выражением, тип которого допускает
|
|
157
152
|
* `пусто`.
|
|
@@ -207,9 +202,9 @@ export declare class Analyzer {
|
|
|
207
202
|
isFunctionGenerator(node: FunctionDeclaration): boolean;
|
|
208
203
|
allAspectsOfType(type: types.Type): Iterable<types.StructuredType>;
|
|
209
204
|
checkTypeIsBasedOnAspect(type: types.Type, aspectEntity: e.StructuredTypeEntity): boolean;
|
|
210
|
-
resolvePrefixUnaryExpressionUserDefinableOperator(node: tree.PrefixUnaryExpression):
|
|
211
|
-
resolveBinaryExpressionUserDefinableOperator(node: tree.BinaryExpression, operatorKind: BinaryOperatorKind):
|
|
212
|
-
resolveCompoundAssignmentStatementOperator(node: tree.AssignmentStatement, operatorKind: BinaryOperatorKind):
|
|
205
|
+
resolvePrefixUnaryExpressionUserDefinableOperator(node: tree.PrefixUnaryExpression): types.Operator | undefined;
|
|
206
|
+
resolveBinaryExpressionUserDefinableOperator(node: tree.BinaryExpression, operatorKind: BinaryOperatorKind): types.Operator | undefined;
|
|
207
|
+
resolveCompoundAssignmentStatementOperator(node: tree.AssignmentStatement, operatorKind: BinaryOperatorKind): types.Operator | undefined;
|
|
213
208
|
classifyBinaryExpressionOperator(operator: tree.BinaryExpressionOperator): BinaryExpressionOperatorClassificationResult;
|
|
214
209
|
getBinaryOperatorKindIfCompoundAssignmentOperator(operator: tree.AssignmentStatementOperator): BinaryOperatorKind | undefined;
|
|
215
210
|
getOriginalPackageEntities(): readonly e.PackageEntity[];
|
|
@@ -261,20 +256,18 @@ export declare class Analyzer {
|
|
|
261
256
|
excludeTypeFromUnion(initialType: types.Type, excludedType: types.Type): types.Type;
|
|
262
257
|
isParameterVariadic(entity: e.VariableEntity): boolean;
|
|
263
258
|
getDefaultTypeParameterConstraint(locale: PackageLocale): types.Type;
|
|
264
|
-
getExtendedType(node: tree.TypeExtensionDeclaration): WithDiagnostics<e.NamedTypeEntity>;
|
|
265
259
|
getAnalyzedTranslationPackageIfTargetResolved(package_: project.TranslationPackage): AnalyzedTranslationPackage | undefined;
|
|
266
|
-
|
|
260
|
+
resolveTextTranslationPackage(package_: project.TextTranslationPackage): ResolvedTextTranslationPackage | undefined;
|
|
267
261
|
findAnalyzedTranslationPackageForLocale(entity: e.PackageEntity, locale: PackageLocale): AnalyzedTranslationPackage | undefined;
|
|
268
262
|
getLocalizedPackageWithLocale(originalPackageEntity: e.PackageEntity, locale: PackageLocale): e.PackageEntity | undefined;
|
|
269
263
|
enumerateAnalyzedTranslationPackages(): Query<AnalyzedTranslationPackage>;
|
|
270
|
-
|
|
264
|
+
enumerateResolvedTextTranslationPackages(): Query<ResolvedTextTranslationPackage>;
|
|
271
265
|
getLinkedMultiPlatformPackagesByPlatform(entity: e.PackageEntity): ReadonlyMap<PlatformKind, LinkedMultiPlatformPackage> | undefined;
|
|
272
266
|
getLinkedMultiPlatformPackage(entity: e.PackageEntity, platform: PlatformKind): LinkedMultiPlatformPackage | undefined;
|
|
273
|
-
getTextTranslationPackagesMap(): ReadonlyMap<e.PackageEntity,
|
|
274
|
-
getTextTranslationPackagesOfTargetPackage(targetPackage: e.PackageEntity):
|
|
275
|
-
getPrimaryTextTranslationPackageOfTargetPackage(targetPackage: e.PackageEntity):
|
|
276
|
-
|
|
277
|
-
getPrimaryTextTranslationEntityByLocalizableTextTemplate(node: tree.LocalizableTextTemplateLiteral): e.TextTranslationEntity | undefined;
|
|
267
|
+
getTextTranslationPackagesMap(): ReadonlyMap<e.PackageEntity, ResolvedTextTranslationPackage[]>;
|
|
268
|
+
getTextTranslationPackagesOfTargetPackage(targetPackage: e.PackageEntity): ResolvedTextTranslationPackage[] | undefined;
|
|
269
|
+
getPrimaryTextTranslationPackageOfTargetPackage(targetPackage: e.PackageEntity): ResolvedTextTranslationPackage | undefined;
|
|
270
|
+
resolveLocalizableTextOrTextTemplate(node: tree.LocalizableTextLiteral | tree.LocalizableTextTemplateLiteral): e.TextTranslationEntity | undefined;
|
|
278
271
|
instantiateType(entity: e.TypeEntity, typeArguments: readonly types.Type[] | undefined): types.Type;
|
|
279
272
|
instantiateTypeWithSubstitutions(entity: e.TypeEntity, substitutions: types.Substitutions): types.Type;
|
|
280
273
|
instantiateTypeByIdentitySubstitution(entity: e.TypeEntity): types.Type;
|
|
@@ -290,7 +283,7 @@ export declare class Analyzer {
|
|
|
290
283
|
getDeclarationsUsageOfSourceFile(sourceFile: tree.SourceFile, taskController: TaskController): Promise<DeclarationsUsageMap>;
|
|
291
284
|
getPackageAndStaticVariablesInitializationDiagnostics(pkg: SourcePackage, taskController: TaskController): Promise<readonly Diagnostic[]>;
|
|
292
285
|
createDefaultConstructors(typeEntity: e.StructuredTypeEntity, fields: readonly e.FieldEntity[]): readonly e.ConstructorEntity[];
|
|
293
|
-
createBackingPackageVariables(
|
|
286
|
+
createBackingPackageVariables(declaredPackageMembers: readonly e.NamedPackageMemberEntity[], pkg: e.PackageEntity): e.PackageVariableEntity[];
|
|
294
287
|
createBackingFields(declaredMembers: readonly e.NamedTypeMemberEntity[], type: e.TypeEntity): e.FieldEntity[];
|
|
295
288
|
createNodeDiagnostic(code: DiagnosticCode, node: tree.Node, formatArguments?: readonly DisplayableOrPrimitive[], kind?: DiagnosticKind, flags?: DiagnosticFlags): Diagnostic;
|
|
296
289
|
createSourceFileRangeDiagnostic(code: DiagnosticCode, range: Range, nodeOrSourceFile: tree.Node | project.SourceFile, formatArguments?: readonly DisplayableOrPrimitive[], kind?: DiagnosticKind, flags?: DiagnosticFlags): Diagnostic;
|
|
@@ -306,10 +299,10 @@ export declare class Analyzer {
|
|
|
306
299
|
createAmbiguousFunctionAccessDiagnostic(functions: readonly AccessedFunction[], node: tree.Node): Diagnostic;
|
|
307
300
|
createAmbiguousTypeMemberAccessDiagnostic(members: readonly types.TypeMember[], node: tree.Node): Diagnostic;
|
|
308
301
|
createAmbiguousNamedScopeDeclarationAccessDiagnostic(declarations: readonly semanticContext.NamedDeclaration[], node: tree.Node): Diagnostic;
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
validateSourcePackageMemberConflicts(pkg: project.
|
|
302
|
+
addSideDiagnostic(diagnostic: Diagnostic): void;
|
|
303
|
+
getSideDiagnosticAcceptor(): DiagnosticAcceptor;
|
|
304
|
+
accumulateSideDiagnosticForSourceFile(sourceFile: project.SourceFile, diagnostics: DiagnosticAcceptor): void;
|
|
305
|
+
validateSourcePackageMemberConflicts(pkg: project.ProgramOrTextTranslationPackage): readonly Diagnostic[];
|
|
313
306
|
getNotExplicitlyImplementedAbstractMembers(typeEntity: e.TypeEntityWithMembers): readonly types.TypeMember[];
|
|
314
307
|
getTypeMemberImplementationCheckResult(typeEntity: e.TypeEntityWithMembers): TypeMemberImplementationCheckResult;
|
|
315
308
|
createEntityContextForTypeDeclaration(node: TypeDeclaration): e.EntityContext;
|
|
@@ -479,7 +472,6 @@ declare class Entity {
|
|
|
479
472
|
private readonly setterEntities;
|
|
480
473
|
private readonly typeExtensionEntities;
|
|
481
474
|
private readonly packageAliasEntities;
|
|
482
|
-
private readonly translationTextTemplateParameterEntities;
|
|
483
475
|
private readonly textTranslationDeclarationEntities;
|
|
484
476
|
private readonly functionLiteralEntities;
|
|
485
477
|
private readonly functionBlockLiteralEntities;
|
|
@@ -522,7 +514,7 @@ declare class Entity {
|
|
|
522
514
|
ofSetterDeclaration(node: SetterDeclaration): e.SetterEntity;
|
|
523
515
|
ofConstructorDeclaration(node: tree.ConstructorDeclaration): e.ConstructorEntity;
|
|
524
516
|
ofDestructorDeclaration(node: tree.DestructorDeclaration): e.DestructorEntity;
|
|
525
|
-
|
|
517
|
+
ofVariantValueDeclaration(node: tree.VariantValueDeclaration): e.FieldEntity;
|
|
526
518
|
ofTypeExtensionDeclaration(node: tree.TypeExtensionDeclaration): e.TypeExtensionEntity;
|
|
527
519
|
ofPackageImport(node: tree.PackageImport): e.PackageAliasEntity;
|
|
528
520
|
ofTypeWithMembersDeclaration(node: TypeWithMembersDeclaration): e.TypeEntityWithMembers;
|
|
@@ -745,27 +737,22 @@ export declare enum TypeAssignabilityFlags {
|
|
|
745
737
|
declare class PackageImports {
|
|
746
738
|
private readonly analyzer;
|
|
747
739
|
private readonly packagesAvailableForImport;
|
|
748
|
-
private readonly
|
|
740
|
+
private readonly resolvedPackageImports;
|
|
749
741
|
private readonly importedPackages;
|
|
750
742
|
private readonly automaticallyImportedPackages;
|
|
751
743
|
private readonly importedPackageNameTrees;
|
|
752
744
|
constructor(analyzer: Analyzer);
|
|
753
|
-
|
|
745
|
+
resolvePackageImports(sourceFile: project.SourceFile): ReadonlyMap<tree.PackageImport, ResolvedPackageImport>;
|
|
754
746
|
getPackagesAvailableForImport(pkg: project.SourcePackage): readonly e.PackageEntity[];
|
|
755
747
|
getUniqueImportedPackages(sourceFile: project.SourceFile): readonly PackageImportInfo[];
|
|
756
748
|
getImportedPackageNameTree(node: tree.SourceFile): ImportedPackageNameTree;
|
|
757
749
|
private getAutomaticallyImportedPackages;
|
|
758
750
|
}
|
|
759
|
-
export declare class
|
|
751
|
+
export declare class ResolvedPackageImport {
|
|
760
752
|
readonly entity: e.PackageEntity | undefined;
|
|
761
753
|
readonly isAliasedImport: e.PackageAliasEntity | undefined;
|
|
762
754
|
constructor(entity: e.PackageEntity | undefined, isAliasedImport: e.PackageAliasEntity | undefined);
|
|
763
755
|
}
|
|
764
|
-
export declare class AnalyzedPackageImports {
|
|
765
|
-
readonly packageImportInfos: Map<tree.PackageImport, AnalyzedPackageImport>;
|
|
766
|
-
readonly diagnostics: readonly Diagnostic[];
|
|
767
|
-
constructor(packageImportInfos: Map<tree.PackageImport, AnalyzedPackageImport>, diagnostics: readonly Diagnostic[]);
|
|
768
|
-
}
|
|
769
756
|
export declare class PackageImportInfo {
|
|
770
757
|
readonly entity: e.PackageEntity;
|
|
771
758
|
readonly aliasEntity: e.PackageAliasEntity | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
|
|
2
2
|
import { AutotypeCallExpression } from '../tree/index.js';
|
|
3
3
|
import * as types from '../types/index.js';
|
|
4
4
|
import { Analyzer, ExpressionAnalysisOptions } from './index.js';
|
|
@@ -6,16 +6,16 @@ export declare class Resolver {
|
|
|
6
6
|
private readonly analyzer;
|
|
7
7
|
private readonly node;
|
|
8
8
|
private readonly analysisOptions;
|
|
9
|
-
|
|
9
|
+
private readonly diagnostics;
|
|
10
|
+
constructor(analyzer: Analyzer, node: AutotypeCallExpression, analysisOptions: ExpressionAnalysisOptions | undefined, diagnostics: DiagnosticAcceptor | undefined);
|
|
10
11
|
resolve(): ResolutionResult;
|
|
11
12
|
private isAutotypeExpressionInValidPosition;
|
|
12
13
|
}
|
|
13
14
|
export declare class ResolutionResult {
|
|
14
15
|
readonly meaning: Meaning;
|
|
15
|
-
readonly diagnostics?: readonly Diagnostic[] | undefined;
|
|
16
16
|
readonly dependsOnTargetType: boolean;
|
|
17
|
-
constructor(meaning: Meaning,
|
|
18
|
-
static unresolved(
|
|
17
|
+
constructor(meaning: Meaning, dependsOnTargetType?: boolean);
|
|
18
|
+
static unresolved(dependsOnTargetType?: boolean): ResolutionResult;
|
|
19
19
|
}
|
|
20
20
|
export type Meaning = Meaning_constructorCall | Meaning_unresolved;
|
|
21
21
|
declare class Meaning_constructorCall {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
|
|
2
2
|
import * as tree from '../tree/index.js';
|
|
3
3
|
import * as types from '../types/index.js';
|
|
4
4
|
import { AccessedFunction } from './AccessedFunction.js';
|
|
@@ -6,8 +6,9 @@ import { Analyzer } from './Analyzer.js';
|
|
|
6
6
|
export declare class FirstStageResolver {
|
|
7
7
|
private readonly analyzer;
|
|
8
8
|
private readonly node;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
private readonly diagnostics;
|
|
10
|
+
constructor(analyzer: Analyzer, node: tree.BaseExpression, diagnostics: DiagnosticAcceptor | undefined);
|
|
11
|
+
resolve(): MeaningStage1;
|
|
11
12
|
private resolveBaseConstructorOrMethodAccess;
|
|
12
13
|
private resolveBaseConstructorAccess;
|
|
13
14
|
private resolveBaseMethodAccess;
|
|
@@ -29,18 +30,13 @@ export declare class FirstStageResolver {
|
|
|
29
30
|
export declare class SecondStageResolver {
|
|
30
31
|
private readonly analyzer;
|
|
31
32
|
private readonly node;
|
|
32
|
-
private readonly
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
private readonly firstStageMeaning;
|
|
34
|
+
private readonly diagnostics;
|
|
35
|
+
constructor(analyzer: Analyzer, node: tree.BaseExpression, firstStageMeaning: MeaningStage1, diagnostics: DiagnosticAcceptor | undefined);
|
|
36
|
+
resolve(): Meaning;
|
|
35
37
|
private resolveOverriddenMethodAccess;
|
|
36
38
|
private resolveOverriddenOperatorAccess;
|
|
37
39
|
}
|
|
38
|
-
export declare class ResolutionResult {
|
|
39
|
-
readonly meaning: Meaning;
|
|
40
|
-
readonly diagnostics?: readonly Diagnostic[] | undefined;
|
|
41
|
-
constructor(meaning: Meaning, diagnostics?: readonly Diagnostic[] | undefined);
|
|
42
|
-
static unresolved(diagnostics?: readonly Diagnostic[]): ResolutionResult;
|
|
43
|
-
}
|
|
44
40
|
export type Meaning = Meaning_baseObjectAccess | Meaning_baseConstructorAccess | Meaning_overriddenMethodAccess | Meaning_overriddenOperatorAccess | Meaning_unresolved;
|
|
45
41
|
declare class Meaning_baseObjectAccess {
|
|
46
42
|
readonly type: types.Type;
|
|
@@ -84,12 +80,6 @@ declare class Meaning_overriddenOperatorAccess {
|
|
|
84
80
|
declare class Meaning_unresolved {
|
|
85
81
|
readonly kind = "unresolved";
|
|
86
82
|
}
|
|
87
|
-
export declare class FirstStageResolutionsResult {
|
|
88
|
-
readonly meaning: MeaningStage1;
|
|
89
|
-
readonly diagnostics?: readonly Diagnostic[] | undefined;
|
|
90
|
-
constructor(meaning: MeaningStage1, diagnostics?: readonly Diagnostic[] | undefined);
|
|
91
|
-
static unresolved(diagnostics?: readonly Diagnostic[]): FirstStageResolutionsResult;
|
|
92
|
-
}
|
|
93
83
|
export type MeaningStage1 = Meaning_baseObjectAccess | Meaning_baseConstructorAccess | MeaningStage1_overriddenMethodAccess | MeaningStage1_overriddenOperatorAccess | Meaning_unresolved;
|
|
94
84
|
declare class MeaningStage1_overriddenMethodAccess {
|
|
95
85
|
readonly method: types.Method;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
|
|
2
2
|
import { NamedTypeEntity } from '../entities/index.js';
|
|
3
3
|
import * as tree from '../tree/index.js';
|
|
4
4
|
import * as types from '../types/index.js';
|
|
@@ -8,8 +8,9 @@ export declare class Resolver {
|
|
|
8
8
|
private readonly analyzer;
|
|
9
9
|
private readonly node;
|
|
10
10
|
private readonly analysisOptions;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
private readonly diagnostics;
|
|
12
|
+
constructor(analyzer: Analyzer, node: tree.CallExpression, analysisOptions: ExpressionAnalysisOptions | undefined, diagnostics: DiagnosticAcceptor | undefined);
|
|
13
|
+
resolve(): Meaning;
|
|
13
14
|
private checkExpressionDenotesType;
|
|
14
15
|
private checkExpressionDenotesFunction;
|
|
15
16
|
private checkExpressionDenotesOperator;
|
|
@@ -18,12 +19,6 @@ export declare class Resolver {
|
|
|
18
19
|
private resolveConstructorCallExpression;
|
|
19
20
|
private resolveObjectFunctionCallExpression;
|
|
20
21
|
}
|
|
21
|
-
export declare class ResolutionResult {
|
|
22
|
-
readonly meaning: Meaning;
|
|
23
|
-
readonly diagnostics?: readonly Diagnostic[] | undefined;
|
|
24
|
-
constructor(meaning: Meaning, diagnostics?: readonly Diagnostic[] | undefined);
|
|
25
|
-
static unresolved(diagnostics: readonly Diagnostic[] | undefined): ResolutionResult;
|
|
26
|
-
}
|
|
27
22
|
export type Meaning = Meaning_functionCall | Meaning_operatorCall | Meaning_objectFunctionCall | Meaning_constructorCall | Meaning_unresolved;
|
|
28
23
|
export declare class Meaning_functionCall {
|
|
29
24
|
readonly candidates: readonly NotSubstitutedAccessedFunction[];
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { AccessKind } from '../common/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
|
|
3
3
|
import { DereferenceExpression } from '../tree/index.js';
|
|
4
4
|
import * as types from '../types/index.js';
|
|
5
5
|
import { Analyzer } from './index.js';
|
|
6
6
|
export declare class Resolver {
|
|
7
7
|
private readonly analyzer;
|
|
8
8
|
private readonly node;
|
|
9
|
+
private readonly diagnostics;
|
|
9
10
|
private readonly semanticContext_;
|
|
10
11
|
private get semanticContext();
|
|
11
|
-
constructor(analyzer: Analyzer, node: DereferenceExpression);
|
|
12
|
+
constructor(analyzer: Analyzer, node: DereferenceExpression, diagnostics: DiagnosticAcceptor | undefined);
|
|
12
13
|
resolve(): Meaning;
|
|
13
14
|
private convertSyntacticAccessKind;
|
|
14
15
|
}
|
|
@@ -20,8 +21,6 @@ declare class Meaning_resolved {
|
|
|
20
21
|
constructor(operator: types.DereferenceOperator, accessKind: AccessKind);
|
|
21
22
|
}
|
|
22
23
|
declare class Meaning_unresolved {
|
|
23
|
-
readonly diagnostic: Diagnostic | undefined;
|
|
24
24
|
readonly kind = "unresolved";
|
|
25
|
-
constructor(diagnostic: Diagnostic | undefined);
|
|
26
25
|
}
|
|
27
26
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AccessKind, Name } from '../common/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
|
|
3
3
|
import { NamedTypeEntity, PackageAliasEntity, VariableEntity } from '../entities/index.js';
|
|
4
4
|
import * as tree from '../tree/index.js';
|
|
5
5
|
import * as types from '../types/index.js';
|
|
@@ -12,9 +12,10 @@ export declare class FirstStageResolver {
|
|
|
12
12
|
private readonly semanticContext_;
|
|
13
13
|
private readonly analyzer;
|
|
14
14
|
private readonly node;
|
|
15
|
+
private readonly diagnostics;
|
|
15
16
|
private get semanticContext();
|
|
16
|
-
constructor(analyzer: Analyzer, node: tree.IdentifierExpression);
|
|
17
|
-
resolve():
|
|
17
|
+
constructor(analyzer: Analyzer, node: tree.IdentifierExpression, diagnostics: DiagnosticAcceptor | undefined);
|
|
18
|
+
resolve(): MeaningStage1;
|
|
18
19
|
private tryResolveOperatorAccessMeaning;
|
|
19
20
|
private resolveTypeAccess;
|
|
20
21
|
private createNotSubstitutedAccessedFunction;
|
|
@@ -23,20 +24,16 @@ export declare class FirstStageResolver {
|
|
|
23
24
|
export declare class SecondStageResolver {
|
|
24
25
|
private readonly analyzer;
|
|
25
26
|
private readonly node;
|
|
26
|
-
private readonly
|
|
27
|
+
private readonly firstStageMeaning;
|
|
27
28
|
private readonly analysisOptions;
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
private readonly diagnostics;
|
|
30
|
+
constructor(analyzer: Analyzer, node: tree.IdentifierExpression, firstStageMeaning: MeaningStage1, analysisOptions: ExpressionAnalysisOptions | undefined, diagnostics: DiagnosticAcceptor | undefined);
|
|
31
|
+
resolve(): Meaning;
|
|
30
32
|
private resolveTypeAccessAtCalleePosition;
|
|
31
33
|
private resolveFunctionAccess;
|
|
32
34
|
private resolveOperatorAccess;
|
|
33
35
|
private resolveNotCalledFunctionsAccess;
|
|
34
36
|
}
|
|
35
|
-
export declare class ResolutionResult {
|
|
36
|
-
readonly meaning: Meaning;
|
|
37
|
-
readonly diagnostics: readonly Diagnostic[] | undefined;
|
|
38
|
-
constructor(meaning: Meaning, diagnostics?: Diagnostic | readonly Diagnostic[]);
|
|
39
|
-
}
|
|
40
37
|
export type Meaning = Meaning_variableAccess | Meaning_functionAccess | Meaning_operatorAccess | Meaning_packageNameSegmentAccess | Meaning_packageAliasAccess | Meaning_typeAccess | Meaning_constructorAccess | Meaning_mixedAmbiguousAccess | Meaning_unresolved;
|
|
41
38
|
declare class Meaning_variableAccess {
|
|
42
39
|
readonly variable: AccessedVariable;
|
|
@@ -92,11 +89,6 @@ declare class Meaning_mixedAmbiguousAccess {
|
|
|
92
89
|
declare class Meaning_unresolved {
|
|
93
90
|
readonly kind = "unresolved";
|
|
94
91
|
}
|
|
95
|
-
export declare class FirstStageResolutionResult {
|
|
96
|
-
readonly meaning: MeaningStage1;
|
|
97
|
-
readonly diagnostics: readonly Diagnostic[] | undefined;
|
|
98
|
-
constructor(meaning: MeaningStage1, diagnostics?: Diagnostic | readonly Diagnostic[]);
|
|
99
|
-
}
|
|
100
92
|
export type MeaningStage1 = Meaning_variableAccess | MeaningStage1_functionAccess | MeaningStage1_operatorAccess | Meaning_packageNameSegmentAccess | Meaning_packageAliasAccess | MeaningStage1_typeAccessAtCalleePosition | Meaning_typeAccess | Meaning_mixedAmbiguousAccess | Meaning_unresolved;
|
|
101
93
|
declare class MeaningStage1_typeAccessAtCalleePosition {
|
|
102
94
|
readonly types: readonly NamedTypeEntity[];
|
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
import { AccessKind } from '../common/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
|
|
3
3
|
import { IndexedAccessExpression } from '../tree/index.js';
|
|
4
4
|
import * as types from '../types/index.js';
|
|
5
5
|
import { Analyzer } from './index.js';
|
|
6
6
|
export declare class Resolver {
|
|
7
7
|
private readonly analyzer;
|
|
8
8
|
private readonly node;
|
|
9
|
+
private readonly diagnostics;
|
|
9
10
|
private readonly semanticContext_;
|
|
10
11
|
private get semanticContext();
|
|
11
|
-
constructor(analyzer: Analyzer, node: IndexedAccessExpression);
|
|
12
|
-
resolve():
|
|
12
|
+
constructor(analyzer: Analyzer, node: IndexedAccessExpression, diagnostics: DiagnosticAcceptor | undefined);
|
|
13
|
+
resolve(): Meaning;
|
|
13
14
|
private getArgumentsRangeWithBrackets;
|
|
14
15
|
private convertSyntacticAccessKind;
|
|
15
16
|
}
|
|
16
|
-
export declare class ResolutionResult {
|
|
17
|
-
readonly meaning: Meaning;
|
|
18
|
-
readonly diagnostics?: readonly Diagnostic[] | undefined;
|
|
19
|
-
constructor(meaning: Meaning, diagnostics?: readonly Diagnostic[] | undefined);
|
|
20
|
-
}
|
|
21
17
|
export type Meaning = Meaning_resolved | Meaning_unresolved;
|
|
22
18
|
declare class Meaning_resolved {
|
|
23
19
|
readonly candidates: readonly types.Indexer[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AccessKind } from '../common/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
|
|
3
3
|
import { Entity, PackageTypeEntity, PackageVariableEntity } from '../entities/index.js';
|
|
4
4
|
import * as tree from '../tree/index.js';
|
|
5
5
|
import * as types from '../types/index.js';
|
|
@@ -11,11 +11,12 @@ export declare class FirstStageResolver {
|
|
|
11
11
|
private readonly semanticContext_;
|
|
12
12
|
private readonly analyzer;
|
|
13
13
|
private readonly node;
|
|
14
|
+
private readonly diagnostics;
|
|
14
15
|
private get memberName();
|
|
15
16
|
private get semanticContext();
|
|
16
17
|
private get receiver();
|
|
17
|
-
constructor(analyzer: Analyzer, node: tree.MemberAccessExpression);
|
|
18
|
-
resolve():
|
|
18
|
+
constructor(analyzer: Analyzer, node: tree.MemberAccessExpression, diagnostics: DiagnosticAcceptor | undefined);
|
|
19
|
+
resolve(): MeaningStage1;
|
|
19
20
|
private resolvePackageAliasMemberAccessMeaning;
|
|
20
21
|
private resolvePackageMemberAccessMeaning;
|
|
21
22
|
private resolveTypeAccess;
|
|
@@ -28,10 +29,11 @@ export declare class FirstStageResolver {
|
|
|
28
29
|
export declare class SecondStageResolver {
|
|
29
30
|
private readonly analyzer;
|
|
30
31
|
private readonly node;
|
|
31
|
-
private readonly
|
|
32
|
+
private readonly firstStageMeaning;
|
|
32
33
|
private readonly analysisOptions;
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
private readonly diagnostics;
|
|
35
|
+
constructor(analyzer: Analyzer, node: tree.MemberAccessExpression, firstStageMeaning: MeaningStage1, analysisOptions: ExpressionAnalysisOptions | undefined, diagnostics: DiagnosticAcceptor | undefined);
|
|
36
|
+
resolve(): Meaning;
|
|
35
37
|
private resolveTypeAccessAtCalleePosition;
|
|
36
38
|
private resolvePackageFunctionAccess;
|
|
37
39
|
private resolveStaticMethodAccess;
|
|
@@ -39,11 +41,6 @@ export declare class SecondStageResolver {
|
|
|
39
41
|
private resolveNotCalledFunctionsAccess;
|
|
40
42
|
private resolveOperatorAccess;
|
|
41
43
|
}
|
|
42
|
-
export declare class ResolutionResult {
|
|
43
|
-
readonly meaning: Meaning;
|
|
44
|
-
readonly diagnostics: readonly Diagnostic[] | undefined;
|
|
45
|
-
constructor(meaning: Meaning, diagnostics?: Diagnostic | readonly Diagnostic[]);
|
|
46
|
-
}
|
|
47
44
|
export type Meaning = Meaning_packageVariableAccess | Meaning_packageFunctionAccess | Meaning_packageTypeAccess | Meaning_constructorAccess | Meaning_packageNameSegmentAccess | Meaning_staticFieldAccess | Meaning_staticMethodAccess | Meaning_instanceFieldAccess | Meaning_instanceMethodAccess | Meaning_operatorAccess | Meaning_mixedAmbiguousAccess | Meaning_unresolved;
|
|
48
45
|
declare class Meaning_packageVariableAccess {
|
|
49
46
|
readonly variable: PackageVariableEntity;
|
|
@@ -126,11 +123,6 @@ declare class Meaning_mixedAmbiguousAccess {
|
|
|
126
123
|
declare class Meaning_unresolved {
|
|
127
124
|
readonly kind = "unresolved";
|
|
128
125
|
}
|
|
129
|
-
export declare class FirstStageResolutionResult {
|
|
130
|
-
readonly meaning: MeaningStage1;
|
|
131
|
-
readonly diagnostics: readonly Diagnostic[] | undefined;
|
|
132
|
-
constructor(meaning: MeaningStage1, diagnostics?: Diagnostic | readonly Diagnostic[]);
|
|
133
|
-
}
|
|
134
126
|
export type MeaningStage1 = Meaning_packageVariableAccess | MeaningStage1_packageFunctionAccess | Meaning_packageTypeAccess | MeaningStage1_typeAccessAtCalleePosition | Meaning_packageNameSegmentAccess | Meaning_staticFieldAccess | MeaningStage1_staticMethodAccess | Meaning_instanceFieldAccess | MeaningStage1_instanceMethodAccess | MeaningStage1_operatorAccess | Meaning_mixedAmbiguousAccess | Meaning_unresolved;
|
|
135
127
|
declare class MeaningStage1_typeAccessAtCalleePosition {
|
|
136
128
|
readonly types: readonly PackageTypeEntity[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
|
|
2
2
|
import { NamedTypeEntity, PackageAliasEntity } from '../entities/index.js';
|
|
3
3
|
import { QualifiedName } from '../tree/index.js';
|
|
4
4
|
import { Analyzer } from './Analyzer.js';
|
|
@@ -7,9 +7,10 @@ import { EntityOrPackageNameTreeNode } from './Utils.js';
|
|
|
7
7
|
export declare class NamedTypeResolver {
|
|
8
8
|
private readonly analyzer;
|
|
9
9
|
private readonly node;
|
|
10
|
+
private readonly diagnostics;
|
|
10
11
|
private readonly semanticContext_;
|
|
11
12
|
private get semanticContext();
|
|
12
|
-
constructor(analyzer: Analyzer, node: QualifiedName);
|
|
13
|
+
constructor(analyzer: Analyzer, node: QualifiedName, diagnostics: DiagnosticAcceptor | undefined);
|
|
13
14
|
resolve(): NamedTypeResolutionResult;
|
|
14
15
|
private lookupTypeOrContainerWithTypes;
|
|
15
16
|
private findTypesOrContainersWithTypesInResolvedQualifier;
|
|
@@ -21,9 +22,8 @@ export declare class NamedTypeResolver {
|
|
|
21
22
|
export declare class NamedTypeResolutionResult {
|
|
22
23
|
readonly types: readonly NamedTypeEntity[];
|
|
23
24
|
readonly resolvedQualifiers: readonly ResolvedQualifier[];
|
|
24
|
-
readonly diagnostics: readonly Diagnostic[];
|
|
25
25
|
readonly ambiguousDeclarations: readonly EntityOrPackageNameTreeNode[] | undefined;
|
|
26
|
-
constructor(types: readonly NamedTypeEntity[], resolvedQualifiers: readonly ResolvedQualifier[],
|
|
26
|
+
constructor(types: readonly NamedTypeEntity[], resolvedQualifiers: readonly ResolvedQualifier[], ambiguousDeclarations: readonly EntityOrPackageNameTreeNode[] | undefined);
|
|
27
27
|
}
|
|
28
28
|
export type ResolvedQualifier = ResolvedQualifier_packageNameSegment | ResolvedQualifier_packageAlias | ResolvedQualifier_type;
|
|
29
29
|
export declare class ResolvedQualifier_packageNameSegment {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
|
|
2
2
|
import { NamedTypeSpecifier } from '../tree/index.js';
|
|
3
3
|
import * as types from '../types/index.js';
|
|
4
4
|
import { Analyzer } from './Analyzer.js';
|
|
@@ -7,13 +7,13 @@ import { EntityOrPackageNameTreeNode } from './Utils.js';
|
|
|
7
7
|
export declare class NamedTypeSpecifierResolver {
|
|
8
8
|
private readonly analyzer;
|
|
9
9
|
private readonly node;
|
|
10
|
-
|
|
10
|
+
private readonly diagnostics;
|
|
11
|
+
constructor(analyzer: Analyzer, node: NamedTypeSpecifier, diagnostics: DiagnosticAcceptor | undefined);
|
|
11
12
|
resolve(): NamedTypeSpecifierResolutionResult;
|
|
12
13
|
}
|
|
13
14
|
export declare class NamedTypeSpecifierResolutionResult {
|
|
14
15
|
readonly type: types.Type | undefined;
|
|
15
16
|
readonly resolvedQualifiers: readonly ResolvedQualifier[];
|
|
16
|
-
readonly diagnostics: readonly Diagnostic[];
|
|
17
17
|
readonly ambiguousDeclarations: readonly EntityOrPackageNameTreeNode[] | undefined;
|
|
18
|
-
constructor(type: types.Type | undefined, resolvedQualifiers: readonly ResolvedQualifier[],
|
|
18
|
+
constructor(type: types.Type | undefined, resolvedQualifiers: readonly ResolvedQualifier[], ambiguousDeclarations: readonly EntityOrPackageNameTreeNode[] | undefined);
|
|
19
19
|
}
|
|
@@ -24,7 +24,7 @@ export type FunctionDeclaration = tree.PackageFunctionDeclaration | tree.NestedF
|
|
|
24
24
|
export type TypeDeclaration = StructuredTypeDeclaration | VariantTypeDeclaration | FunctionTypeDeclaration | tree.PackageAliasTypeDeclaration | tree.TypeParameterDeclaration;
|
|
25
25
|
export type NamedTypeDeclaration = tree.PackageStructuredTypeDeclaration | tree.PackageVariantTypeDeclaration | tree.PackageFunctionTypeDeclaration | tree.PackageAliasTypeDeclaration | tree.TypeParameterDeclaration;
|
|
26
26
|
export type TypeWithMembersDeclaration = StructuredTypeDeclaration | VariantTypeDeclaration | tree.PackageAliasTypeDeclaration;
|
|
27
|
-
export type VariableDeclaration = tree.ForStatementVariableDeclaration | tree.PackageVariableDeclaration | tree.LocalVariableDeclaration | tree.ParameterDeclaration | tree.FieldDeclaration | tree.
|
|
27
|
+
export type VariableDeclaration = tree.ForStatementVariableDeclaration | tree.PackageVariableDeclaration | tree.LocalVariableDeclaration | tree.ParameterDeclaration | tree.FieldDeclaration | tree.VariantValueDeclaration;
|
|
28
28
|
export type GetterDeclaration = tree.PackageVariableGetterDeclaration | tree.FieldGetterDeclaration | tree.IndexedElementGetterDeclaration | tree.DereferencedVariableGetterDeclaration;
|
|
29
29
|
export type SetterDeclaration = tree.PackageVariableSetterDeclaration | tree.FieldSetterDeclaration | tree.IndexedElementSetterDeclaration | tree.DereferencedVariableSetterDeclaration;
|
|
30
30
|
export type PackageVariableAccessorDeclaration = tree.PackageVariableGetterDeclaration | tree.PackageVariableSetterDeclaration;
|