@artel/artc 0.6.25244 → 0.6.25245
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 +30 -22
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +500 -916
- package/build/{chunk-C7RKXERX.js → chunk-FVBS6MPY.js} +1 -1
- package/build/{chunk-BAAUJYMH.js → chunk-T7WG4Z7I.js} +21018 -19022
- package/build/{chunk-V7EU2U6Y.js → chunk-TVZEHLXD.js} +2 -2
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +49 -80
- package/build/types/analysis/Analyzer.d.ts +59 -73
- package/build/types/analysis/ArgumentToParameterMatchResult.d.ts +8 -10
- package/build/types/analysis/AutotypeCallExpressionMeaning.d.ts +3 -4
- package/build/types/analysis/BaseExpressionMeaning.d.ts +3 -4
- package/build/types/analysis/BaseMemberConflictsValidator.d.ts +6 -6
- package/build/types/analysis/CallExpressionMeaning.d.ts +7 -9
- package/build/types/analysis/ConstructorOverloadResolver.d.ts +4 -7
- package/build/types/analysis/DeclarationsUsageCounter.d.ts +1 -2
- package/build/types/analysis/DereferenceExpressionMeaning.d.ts +2 -3
- package/build/types/analysis/DiagnosticCollector.d.ts +1 -0
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +16 -17
- package/build/types/analysis/ImportedPackageNameTree.d.ts +1 -7
- package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +4 -5
- package/build/types/analysis/Localization.d.ts +19 -25
- package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +29 -31
- package/build/types/analysis/NamedTypeResolver.d.ts +6 -8
- package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +3 -5
- package/build/types/analysis/ObjectExpressionMeaning.d.ts +3 -4
- package/build/types/analysis/PackageMemberLookup.d.ts +4 -9
- package/build/types/analysis/PackageMemberNameConflictsValidator.d.ts +2 -2
- package/build/types/analysis/SourceFileMembers.d.ts +3 -3
- package/build/types/analysis/TagMeaning.d.ts +18 -20
- package/build/types/analysis/Tags.d.ts +1 -1
- package/build/types/analysis/TypeMemberConflictsValidator.d.ts +2 -2
- package/build/types/analysis/TypeMemberLookup.d.ts +23 -31
- package/build/types/analysis/TypeNarrower.d.ts +1 -0
- package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +1 -2
- package/build/types/analysis/UserDefinableUnaryOperatorResolver.d.ts +1 -2
- package/build/types/analysis/WellKnownDeclarations.d.ts +100 -31
- package/build/types/analysis/semantic-context/FieldWithInitializerSemanticContext.d.ts +5 -6
- package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +11 -14
- package/build/types/analysis/semantic-context/SemanticContextValidatingNameConflicts.d.ts +5 -6
- package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +5 -8
- package/build/types/analysis/semantic-context/SubprogramSemanticContext.d.ts +5 -6
- package/build/types/analysis/semantic-context/TypeSemanticContext.d.ts +11 -12
- package/build/types/api/Api.d.ts +0 -3
- package/build/types/common/Name.d.ts +9 -14
- package/build/types/common/TreeQuery.d.ts +2 -0
- package/build/types/common/index.d.ts +0 -1
- package/build/types/diagnostic/DiagnosticCode.d.ts +1 -1
- package/build/types/emitter/EntityMap.d.ts +1 -0
- package/build/types/entities/AliasTypeEntity.d.ts +9 -41
- package/build/types/entities/AliasedType.d.ts +62 -0
- package/build/types/entities/ConstructorEntity.d.ts +10 -2
- package/build/types/entities/DereferenceOperatorEntity.d.ts +5 -0
- package/build/types/entities/DestructorEntity.d.ts +6 -2
- package/build/types/entities/EntityLocalizationContext.d.ts +53 -0
- package/build/types/entities/FunctionEntity.d.ts +20 -0
- package/build/types/entities/FunctionTypeEntity.d.ts +15 -4
- package/build/types/entities/GetterEntity.d.ts +15 -2
- package/build/types/entities/IndexerEntity.d.ts +5 -0
- package/build/types/entities/OperatorEntity.d.ts +9 -3
- package/build/types/entities/PackageAliasEntity.d.ts +5 -0
- package/build/types/entities/PackageEntity.d.ts +8 -3
- package/build/types/entities/PackageMembers.d.ts +3 -2
- package/build/types/entities/SetterEntity.d.ts +15 -2
- package/build/types/entities/StructuredTypeEntity.d.ts +64 -15
- package/build/types/entities/TypeEntityMembers.d.ts +2 -5
- package/build/types/entities/TypeExtensionEntity.d.ts +9 -5
- package/build/types/entities/TypeMemberContainer.d.ts +2 -2
- package/build/types/entities/TypeParameterEntity.d.ts +26 -8
- package/build/types/entities/VariableEntity.d.ts +41 -1
- package/build/types/entities/VariantTypeEntity.d.ts +13 -4
- package/build/types/entities/index.d.ts +5 -4
- package/build/types/entities/translated/TranslatedAliasTypeEntity.d.ts +54 -0
- package/build/types/entities/translated/TranslatedConstructorEntity.d.ts +25 -0
- package/build/types/entities/translated/TranslatedDereferenceOperatorEntity.d.ts +34 -0
- package/build/types/entities/translated/TranslatedDestructorEntity.d.ts +24 -0
- package/build/types/entities/translated/TranslatedFunctionEntity.d.ts +75 -0
- package/build/types/entities/translated/TranslatedFunctionTypeEntity.d.ts +83 -0
- package/build/types/entities/translated/TranslatedGetterEntity.d.ts +25 -0
- package/build/types/entities/translated/TranslatedIndexerEntity.d.ts +37 -0
- package/build/types/entities/translated/TranslatedOperatorEntity.d.ts +35 -0
- package/build/types/entities/translated/TranslatedPackageEntity.d.ts +28 -0
- package/build/types/entities/translated/TranslatedSetterEntity.d.ts +22 -0
- package/build/types/entities/translated/TranslatedStructuredTypeEntity.d.ts +107 -0
- package/build/types/entities/translated/TranslatedTypeExtensionEntity.d.ts +28 -0
- package/build/types/entities/translated/TranslatedTypeParameterEntity.d.ts +46 -0
- package/build/types/entities/translated/TranslatedVariableEntity.d.ts +97 -0
- package/build/types/entities/translated/TranslatedVariantTypeEntity.d.ts +76 -0
- package/build/types/project/SourcePackage.d.ts +1 -0
- package/build/types/services/DefinitionService.d.ts +0 -1
- package/build/types/services/DisplayService.d.ts +39 -134
- package/build/types/services/NodeSemanticInfo.d.ts +7 -7
- package/build/types/services/ReferencesService.d.ts +5 -3
- package/build/types/services/signature-help/SignatureWithValueParameters.d.ts +7 -10
- package/build/types/services/source-generation/EntityToSyntax.d.ts +1 -3
- package/build/types/services/source-generation/SourceGenerationService.d.ts +1 -2
- package/build/types/tree/green/Token.d.ts +6 -7
- package/build/types/ts-interop/Entities.d.ts +64 -13
- package/build/types/ts-interop/TsInteropContext.d.ts +17 -5
- package/build/types/ts-interop/TsPackageContents.d.ts +2 -2
- package/build/types/ts-interop/TsPackageMembersCreator.d.ts +3 -3
- package/build/types/ts-interop/TsTypeMembersCreator.d.ts +4 -4
- package/build/types/types/StandardTypes.d.ts +3 -2
- package/build/types/types/Substitutions.d.ts +3 -0
- package/build/types/types/Type.d.ts +3 -0
- package/package.json +1 -1
- package/build/types/analysis/EntityLocalizationHelper.d.ts +0 -17
- package/build/types/analysis/FoundDeclaration.d.ts +0 -19
- package/build/types/analysis/LocalizationContext.d.ts +0 -15
- package/build/types/common/SearchName.d.ts +0 -14
- package/build/types/types/Internal.d.ts +0 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
import {
|
2
2
|
Compiler
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-FVBS6MPY.js";
|
4
4
|
import {
|
5
5
|
ArtelVersion,
|
6
6
|
Cached,
|
@@ -14,7 +14,7 @@ import {
|
|
14
14
|
__async,
|
15
15
|
performanceMeasurementStageNames,
|
16
16
|
performanceMeasurementStages
|
17
|
-
} from "./chunk-
|
17
|
+
} from "./chunk-T7WG4Z7I.js";
|
18
18
|
|
19
19
|
// source/executor/FileSystemUri.ts
|
20
20
|
import { platform } from "os";
|
@@ -1,18 +1,19 @@
|
|
1
1
|
import { Name, PackageLocale } from '../common/index.js';
|
2
2
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
3
|
+
import { EntityLocalizationContext } from '../entities/EntityLocalizationContext.js';
|
3
4
|
import { PackageEntity } from '../entities/PackageEntity.js';
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import { AliasTypeEntity, ConstructorEntity, DestructorEntity, IndexerEntity, FunctionEntity, FunctionTypeEntity, NamedPackageMemberEntity, OperatorEntity, PackageFunctionEntity, PackageFunctionTypeEntity, PackageTypeEntity, StructuredTypeEntity, MethodEntity, TypeParameterEntity, VariantTypeEntity } from '../entities/index.js';
|
5
|
+
import { FieldEntity, PackageVariableEntity, ParameterVariableEntity } from '../entities/VariableEntity.js';
|
6
|
+
import { AliasTypeEntity, ConstructorEntity, DestructorEntity, FunctionEntity, FunctionTypeEntity, IndexerEntity, MethodEntity, NamedEntity, NamedPackageMemberEntity, NamedTypeMemberEntity, OperatorEntity, PackageFunctionEntity, PackageFunctionTypeEntity, PackageTypeEntity, StructuredTypeEntity, TypeParameterEntity, VariantTypeEntity } from '../entities/index.js';
|
7
7
|
import { PackageName, TranslationPackage } from '../project/index.js';
|
8
8
|
import * as tree from '../tree/index.js';
|
9
9
|
import { Analyzer } from './Analyzer.js';
|
10
|
-
import {
|
11
|
-
import { NamedEntity } from './LocalizationContext.js';
|
10
|
+
import { Translation } from './Localization.js';
|
12
11
|
export declare class AnalyzedTranslationPackage {
|
13
12
|
private readonly _analyzer;
|
14
13
|
private readonly _package;
|
15
|
-
private readonly
|
14
|
+
private readonly _targetTarget;
|
15
|
+
readonly entityLocalizationContext: EntityLocalizationContext;
|
16
|
+
private readonly _localizedPackageByOriginalReferencedPackage;
|
16
17
|
private readonly _members;
|
17
18
|
private readonly _translatedTypeEntityMembers;
|
18
19
|
private readonly _functionSignatureTranslations;
|
@@ -21,11 +22,13 @@ export declare class AnalyzedTranslationPackage {
|
|
21
22
|
private readonly _constructorSignatureTranslations;
|
22
23
|
private readonly _indexerSignatureTranslations;
|
23
24
|
private readonly _translatedTypeHeaders;
|
24
|
-
constructor(_analyzer: Analyzer, _package: TranslationPackage,
|
25
|
-
|
25
|
+
constructor(_analyzer: Analyzer, _package: TranslationPackage, _targetTarget: PackageEntity);
|
26
|
+
getTargetPackage(): PackageEntity;
|
27
|
+
getPackageInTranslatedLanguage(): PackageEntity;
|
26
28
|
getDefinition(): TranslationPackage;
|
27
29
|
getTranslatedName(): PackageName;
|
28
30
|
getTranslationLocale(): PackageLocale;
|
31
|
+
getLocalizedPackageByOriginalReferencedPackage(): ReadonlyMap<PackageEntity, PackageEntity>;
|
29
32
|
getMembers(): TranslatedPackageMembers;
|
30
33
|
getTypeEntityMembers(typeEntity: PackageTypeEntity): TranslatedTypeEntityMembers | undefined;
|
31
34
|
getPackageVariableTranslationTarget(node: tree.PackageVariableTranslation): GetSingleTranslationTargetResult<PackageVariableEntity>;
|
@@ -39,16 +42,17 @@ export declare class AnalyzedTranslationPackage {
|
|
39
42
|
getMethodTranslationTargets(node: tree.MethodTranslation): GetMultipleTranslationTargetsResult<MethodEntity>;
|
40
43
|
getConstructorTranslationTargets(node: tree.ConstructorTranslation): GetMultipleTranslationTargetsResult<ConstructorEntity>;
|
41
44
|
getIndexerTranslationTargets(node: tree.IndexerTranslation): GetMultipleTranslationTargetsResult<IndexerEntity>;
|
42
|
-
getFunctionSignature(entity: FunctionEntity):
|
43
|
-
getOperatorSignature(entity: OperatorEntity):
|
44
|
-
getPackageFunctionSignature(entity: PackageFunctionEntity):
|
45
|
-
getMethodSignature(entity: MethodEntity):
|
46
|
-
getFunctionTypeSignature(entity: FunctionTypeEntity):
|
47
|
-
getConstructorSignature(entity: ConstructorEntity):
|
48
|
-
getDestructorSignature(entity: DestructorEntity):
|
49
|
-
getIndexerSignature(entity: IndexerEntity):
|
50
|
-
getTypeHeader(entity: TypeEntityWithHeaderLocalization):
|
51
|
-
getEntityName(entity: NamedEntity):
|
45
|
+
getFunctionSignature(entity: FunctionEntity): TranslatedSubprogramSignature | undefined;
|
46
|
+
getOperatorSignature(entity: OperatorEntity): TranslatedSubprogramSignature | undefined;
|
47
|
+
getPackageFunctionSignature(entity: PackageFunctionEntity): TranslatedSubprogramSignature | undefined;
|
48
|
+
getMethodSignature(entity: MethodEntity): TranslatedSubprogramSignature | undefined;
|
49
|
+
getFunctionTypeSignature(entity: FunctionTypeEntity): TranslatedSubprogramSignature | undefined;
|
50
|
+
getConstructorSignature(entity: ConstructorEntity): TranslatedSubprogramSignature | undefined;
|
51
|
+
getDestructorSignature(entity: DestructorEntity): TranslatedSubprogramSignature | undefined;
|
52
|
+
getIndexerSignature(entity: IndexerEntity): TranslatedSubprogramSignature | undefined;
|
53
|
+
getTypeHeader(entity: TypeEntityWithHeaderLocalization): TranslatedTypeHeader | undefined;
|
54
|
+
getEntityName(entity: NamedEntity): TranslatedName | undefined;
|
55
|
+
private createLocalizedPackageByOriginalReferencedPackage;
|
52
56
|
private createPackageMembers;
|
53
57
|
private createTypeEntityMembers;
|
54
58
|
private createTranslatedSubprogramSignatureFromPackageFunctionTranslation;
|
@@ -64,94 +68,54 @@ export declare class AnalyzedTranslationPackage {
|
|
64
68
|
}
|
65
69
|
export declare class TranslatedPackageMembers {
|
66
70
|
private readonly _namedMembers;
|
67
|
-
private readonly _membersByNameKey;
|
68
71
|
private readonly _nameByEntity;
|
69
|
-
private get membersByNameKey();
|
70
72
|
private get nameByEntity();
|
71
73
|
constructor(_namedMembers: readonly TranslatedNamedPackageMember[]);
|
72
74
|
getNamedMembers(): readonly TranslatedNamedPackageMember[];
|
73
|
-
|
74
|
-
getMemberName(entity: NamedPackageMemberEntity): Name | undefined;
|
75
|
+
getMemberName(entity: NamedPackageMemberEntity): TranslatedName | undefined;
|
75
76
|
}
|
76
77
|
export declare class TranslatedNamedPackageMember {
|
77
78
|
readonly value: NamedPackageMemberEntity;
|
78
|
-
readonly name:
|
79
|
-
constructor(value: NamedPackageMemberEntity, name:
|
79
|
+
readonly name: TranslatedName;
|
80
|
+
constructor(value: NamedPackageMemberEntity, name: TranslatedName);
|
80
81
|
}
|
81
82
|
export declare class TranslatedTypeEntityMembers {
|
82
83
|
private readonly _namedMembers;
|
83
84
|
readonly translationPackage: AnalyzedTranslationPackage;
|
84
|
-
private readonly _membersByNameKey;
|
85
85
|
private readonly _nameByEntity;
|
86
|
-
private get membersByNameKey();
|
87
86
|
private get nameByEntity();
|
88
87
|
constructor(_namedMembers: readonly TranslatedNamedTypeEntityMember[], translationPackage: AnalyzedTranslationPackage);
|
89
88
|
getNamedMembers(): readonly TranslatedNamedTypeEntityMember[];
|
90
|
-
|
91
|
-
getMemberName(entity: NamedTypeMemberEntity): Name | undefined;
|
89
|
+
getMemberName(entity: NamedTypeMemberEntity): TranslatedName | undefined;
|
92
90
|
}
|
93
91
|
export declare class TranslatedNamedTypeEntityMember {
|
94
92
|
readonly value: NamedTypeMemberEntity;
|
95
|
-
readonly name:
|
96
|
-
constructor(value: NamedTypeMemberEntity, name:
|
93
|
+
readonly name: TranslatedName;
|
94
|
+
constructor(value: NamedTypeMemberEntity, name: TranslatedName);
|
97
95
|
}
|
98
|
-
export
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
constructor(typeParameters: readonly Name[], valueParameters: readonly Name[], locale: PackageLocale);
|
106
|
-
getTypeParameterNames(): readonly LocalizedName[];
|
107
|
-
getValueParameterNames(): readonly LocalizedName[];
|
108
|
-
}
|
109
|
-
export class Translated implements ILocalizedSubprogramSignature {
|
110
|
-
readonly typeParameters: readonly TranslatedTypeParameter[];
|
111
|
-
readonly valueParameters: readonly TranslatedValueParameter[];
|
112
|
-
readonly kind = "translated";
|
113
|
-
constructor(typeParameters: readonly TranslatedTypeParameter[], valueParameters: readonly TranslatedValueParameter[]);
|
114
|
-
getTypeParameterNames(): readonly LocalizedName[];
|
115
|
-
getValueParameterNames(): readonly LocalizedName[];
|
116
|
-
getTypeParameterName(entity: TypeParameterEntity): Name | undefined;
|
117
|
-
getValueParameterName(entity: ParameterVariableEntity): Name | undefined;
|
118
|
-
}
|
119
|
-
interface ILocalizedSubprogramSignature {
|
120
|
-
getTypeParameterNames(): readonly LocalizedName[];
|
121
|
-
getValueParameterNames(): readonly LocalizedName[];
|
122
|
-
}
|
123
|
-
export {};
|
96
|
+
export declare class TranslatedSubprogramSignature {
|
97
|
+
readonly translation: Translation;
|
98
|
+
readonly typeParameters: readonly TranslatedTypeParameter[];
|
99
|
+
readonly valueParameters: readonly TranslatedValueParameter[];
|
100
|
+
constructor(translation: Translation, typeParameters: readonly TranslatedTypeParameter[], valueParameters: readonly TranslatedValueParameter[]);
|
101
|
+
getTypeParameterName(entity: TypeParameterEntity): TranslatedName | undefined;
|
102
|
+
getValueParameterName(entity: ParameterVariableEntity): TranslatedName | undefined;
|
124
103
|
}
|
125
104
|
export declare class TranslatedTypeParameter {
|
126
105
|
readonly value: TypeParameterEntity;
|
127
|
-
readonly name:
|
128
|
-
constructor(value: TypeParameterEntity, name:
|
106
|
+
readonly name: TranslatedName;
|
107
|
+
constructor(value: TypeParameterEntity, name: TranslatedName);
|
129
108
|
}
|
130
109
|
export declare class TranslatedValueParameter {
|
131
110
|
readonly value: ParameterVariableEntity;
|
132
|
-
readonly name:
|
133
|
-
constructor(value: ParameterVariableEntity, name:
|
111
|
+
readonly name: TranslatedName;
|
112
|
+
constructor(value: ParameterVariableEntity, name: TranslatedName);
|
134
113
|
}
|
135
|
-
export
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
readonly kind = "original";
|
141
|
-
constructor(typeParameters: readonly Name[], locale: PackageLocale);
|
142
|
-
getTypeParameterNames(): readonly LocalizedName[];
|
143
|
-
}
|
144
|
-
export class Translated implements ILocalizedTypeHeader {
|
145
|
-
readonly typeParameters: readonly TranslatedTypeParameter[];
|
146
|
-
readonly kind = "translated";
|
147
|
-
constructor(typeParameters: readonly TranslatedTypeParameter[]);
|
148
|
-
getTypeParameterNames(): readonly LocalizedName[];
|
149
|
-
getTypeParameterName(entity: TypeParameterEntity): Name | undefined;
|
150
|
-
}
|
151
|
-
interface ILocalizedTypeHeader {
|
152
|
-
getTypeParameterNames(): readonly LocalizedName[];
|
153
|
-
}
|
154
|
-
export {};
|
114
|
+
export declare class TranslatedTypeHeader {
|
115
|
+
readonly translation: Translation;
|
116
|
+
readonly typeParameters: readonly TranslatedTypeParameter[];
|
117
|
+
constructor(translation: Translation, typeParameters: readonly TranslatedTypeParameter[]);
|
118
|
+
getTypeParameterName(entity: TypeParameterEntity): TranslatedName | undefined;
|
155
119
|
}
|
156
120
|
export type TypeEntityWithHeaderLocalization = StructuredTypeEntity | VariantTypeEntity | AliasTypeEntity;
|
157
121
|
export declare class GetSingleTranslationTargetResult<T> {
|
@@ -174,3 +138,8 @@ export declare class GetMultipleTranslationTargetsResult<T> {
|
|
174
138
|
static invalid<T>(diagnostics: readonly Diagnostic[]): GetMultipleTranslationTargetsResult<T>;
|
175
139
|
static invalid<T>(diagnostics: readonly Diagnostic[], targets: readonly T[], isAmbiguous: boolean): GetMultipleTranslationTargetsResult<T>;
|
176
140
|
}
|
141
|
+
export declare class TranslatedName {
|
142
|
+
readonly value: Name;
|
143
|
+
readonly translation: Translation;
|
144
|
+
constructor(value: Name, translation: Translation);
|
145
|
+
}
|
@@ -1,11 +1,10 @@
|
|
1
1
|
import ts from 'typescript';
|
2
|
-
import { CancellationToken, Lazy, Name, PackageLocale, Range,
|
2
|
+
import { CancellationToken, Lazy, Name, PackageLocale, Range, 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';
|
6
6
|
import { BinaryOperatorKind } from '../entities/OperatorKind.js';
|
7
|
-
import {
|
8
|
-
import { NamedTypeMemberEntity } from '../entities/TypeEntityMembers.js';
|
7
|
+
import { PackageEntityMembers } from '../entities/PackageMembers.js';
|
9
8
|
import * as e from '../entities/index.js';
|
10
9
|
import { ReservedIdentifierKind } from '../parser/ReservedIdentifierDictionary.js';
|
11
10
|
import * as project from '../project/index.js';
|
@@ -23,13 +22,10 @@ import * as callExpressionMeaning from './CallExpressionMeaning.js';
|
|
23
22
|
import * as constructorOverloadResolver from './ConstructorOverloadResolver.js';
|
24
23
|
import { DeclarationsUsageCountResult } from './DeclarationsUsageCounter.js';
|
25
24
|
import * as dereferenceExpressionMeaning from './DereferenceExpressionMeaning.js';
|
26
|
-
import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
|
27
25
|
import * as functionOverloadResolver from './FunctionOverloadResolver.js';
|
28
26
|
import * as identifierExpressionResolution from './IdentifierExpressionMeaning.js';
|
29
27
|
import { ImportedPackageNameTree, PackageNameTreeNode } from './ImportedPackageNameTree.js';
|
30
28
|
import * as indexedAccessExpressionMeaning from './IndexedAccessExpressionMeaning.js';
|
31
|
-
import { WithLocalization } from './Localization.js';
|
32
|
-
import { LocalizationContext } from './LocalizationContext.js';
|
33
29
|
import * as memberAccessExpressionResolution from './MemberAccessExpressionMeaning.js';
|
34
30
|
import { ModifierFlags } from './ModifierFlags.js';
|
35
31
|
import { NamedTypeSpecifierResolutionResult } from './NamedTypeSpecifierResolver.js';
|
@@ -52,8 +48,16 @@ export declare class Analyzer {
|
|
52
48
|
* Пакет с именем 'Артель', содержащий стандартные типы.
|
53
49
|
*/
|
54
50
|
readonly systemPackage: e.PackageEntity;
|
55
|
-
|
56
|
-
|
51
|
+
/**
|
52
|
+
* Стандартные объявления на языке оригинала. Для получения стандартных объявлений на желаемом языке используйте
|
53
|
+
* {@link getLocalizedWellKnownDeclarations}.
|
54
|
+
*/
|
55
|
+
readonly originalWellKnownDeclarations: WellKnownDeclarations;
|
56
|
+
/**
|
57
|
+
* Стандартные типы на языке оригинала. Для получения стандартных типов на желаемом языке используйте
|
58
|
+
* {@link getLocalizedStandardTypes}.
|
59
|
+
*/
|
60
|
+
readonly originalStandardTypes: types.StandardTypes;
|
57
61
|
readonly typeFactory: TypeFactory;
|
58
62
|
readonly type: Type;
|
59
63
|
readonly returnType: ReturnType;
|
@@ -101,6 +105,10 @@ export declare class Analyzer {
|
|
101
105
|
private readonly _sourcePackageMemberConflictsDiagnostics;
|
102
106
|
private readonly _notExplicitlyImplementedAbstractTypeMembers;
|
103
107
|
private readonly _typeMemberImplementationCheckResults;
|
108
|
+
private _originalPackageEntitiesByNameKey;
|
109
|
+
private _packageEntitiesByNameKey;
|
110
|
+
private readonly _localizedWellKnownDeclarations;
|
111
|
+
private readonly _localizedStandardTypes;
|
104
112
|
get tsInterop(): TsInteropContext;
|
105
113
|
constructor(compilation: project.Compilation, tsInteropInputs: TsInteropInputs);
|
106
114
|
getProjectSourceFile(node: tree.SourceFile): project.SourceFile;
|
@@ -172,11 +180,9 @@ export declare class Analyzer {
|
|
172
180
|
checkIdentifierNameIsReserved(name: string, locale: PackageLocale): ReservedIdentifierKind | undefined;
|
173
181
|
getReservedIdentifierName(reservedIdentifierKind: ReservedIdentifierKind, locale: PackageLocale): string;
|
174
182
|
createNameFromIdentifier(node: tree.Identifier): Name;
|
175
|
-
createSearchNameFromIdentifier(identifier: tree.Identifier): SearchName;
|
176
|
-
createLocalizationContext(sourceFile: project.SourceFile): LocalizationContext;
|
177
183
|
getImplicitBaseTypeForStructuredType(entity: e.StructuredTypeEntity): types.StructuredType | undefined;
|
178
|
-
getImplicitBaseTypeForVariantType(): types.StructuredType;
|
179
|
-
getImplicitBaseTypeForFunctionType(): types.StructuredType;
|
184
|
+
getImplicitBaseTypeForVariantType(locale: PackageLocale): types.StructuredType;
|
185
|
+
getImplicitBaseTypeForFunctionType(locale: PackageLocale): types.StructuredType;
|
180
186
|
resolveNamedTypeSpecifier(node: tree.NamedTypeSpecifier): NamedTypeSpecifierResolutionResult;
|
181
187
|
checkExpressionDenotesType(expression: tree.Expression): {
|
182
188
|
type: types.Type | undefined;
|
@@ -192,13 +198,16 @@ export declare class Analyzer {
|
|
192
198
|
checkFunctionBlockWithYieldStatement(node: tree.FunctionBlock): boolean;
|
193
199
|
enumerateAspects(type: types.Type): Iterable<types.StructuredType>;
|
194
200
|
checkTypeIsBasedOnAspect(type: types.Type, aspectEntity: e.StructuredTypeEntity): boolean;
|
195
|
-
resolvePrefixUnaryExpressionUserDefinableOperator(node: tree.PrefixUnaryExpression): WithDiagnostics<
|
196
|
-
resolveBinaryExpressionUserDefinableOperator(node: tree.BinaryExpression, operatorKind: BinaryOperatorKind): WithDiagnostics<
|
197
|
-
resolveCompoundAssignmentStatementOperator(node: tree.AssignmentStatement, operatorKind: BinaryOperatorKind): WithDiagnostics<
|
201
|
+
resolvePrefixUnaryExpressionUserDefinableOperator(node: tree.PrefixUnaryExpression): WithDiagnostics<types.Operator>;
|
202
|
+
resolveBinaryExpressionUserDefinableOperator(node: tree.BinaryExpression, operatorKind: BinaryOperatorKind): WithDiagnostics<types.Operator>;
|
203
|
+
resolveCompoundAssignmentStatementOperator(node: tree.AssignmentStatement, operatorKind: BinaryOperatorKind): WithDiagnostics<types.Operator>;
|
198
204
|
classifyBinaryExpressionOperator(operator: tree.BinaryExpressionOperator): BinaryExpressionOperatorClassificationResult;
|
199
205
|
getBinaryOperatorKindIfCompoundAssignmentOperator(operator: tree.AssignmentStatementOperator): BinaryOperatorKind | undefined;
|
206
|
+
getOriginalPackageEntities(): readonly e.PackageEntity[];
|
200
207
|
getPackageEntities(): readonly e.PackageEntity[];
|
201
|
-
|
208
|
+
getOriginalPackageEntityByName(name: PackageName): e.PackageEntity | undefined;
|
209
|
+
getPackageEntityByName(name: PackageName): e.PackageEntity | undefined;
|
210
|
+
getAnalyzedTranslationPackages(): readonly AnalyzedTranslationPackage[];
|
202
211
|
createFunctionTypeInvokeMethod(entity: e.FunctionTypeEntity): e.MethodEntity;
|
203
212
|
/**
|
204
213
|
* Преобразует тип таким образом, чтобы он не мог содержать значение `пусто`.
|
@@ -222,13 +231,16 @@ export declare class Analyzer {
|
|
222
231
|
canTypeParameterBeNone(type: types.ParameterType): boolean;
|
223
232
|
/**
|
224
233
|
* Делает тип `Пусто` совместимым с данным типом.
|
234
|
+
*
|
235
|
+
* @param locale Язык для типа Пусто.
|
236
|
+
*
|
225
237
|
* @example
|
226
238
|
* - Число -> Число | Пусто
|
227
239
|
* - Число | Пусто -> Число | Пусто
|
228
240
|
* - Т: Объект? -> (Т: Объект?) | Пусто (см. метод isNoneAssignableToType)
|
229
241
|
* - Т: Объект -> (Т: Объект) | Пусто
|
230
242
|
*/
|
231
|
-
includeNoneToType(type: types.Type): types.Type;
|
243
|
+
includeNoneToType(type: types.Type, locale: PackageLocale): types.Type;
|
232
244
|
/**
|
233
245
|
* Отвечает на вопрос "Совместим ли тип `Пусто` с данным типом?" (Можно ли присвоить `пусто` в переменную с данным типом?).
|
234
246
|
* @example Для следующих типов метод вернёт:
|
@@ -239,16 +251,17 @@ export declare class Analyzer {
|
|
239
251
|
isNoneAssignableToType(type: types.Type): boolean;
|
240
252
|
excludeTypeFromUnion(initialType: types.Type, excludedType: types.Type): types.Type;
|
241
253
|
isValueParameterVariadic(entity: e.VariableEntity): boolean;
|
242
|
-
getDefaultTypeParameterConstraint(): types.Type;
|
254
|
+
getDefaultTypeParameterConstraint(locale: PackageLocale): types.Type;
|
243
255
|
getOriginalSignatureTypeOfFunctionEntity(entity: e.FunctionEntity): types.FunctionType;
|
244
256
|
getFunctionBlockLiteralValueParameters(node: tree.FunctionBlockLiteral): readonly e.ParameterVariableEntity[];
|
245
257
|
getExtendedType(node: tree.TypeExtensionDeclaration): WithDiagnostics<e.NamedTypeEntity>;
|
246
258
|
getAnalyzedTranslationPackageIfTargetResolved(package_: project.TranslationPackage): AnalyzedTranslationPackage | undefined;
|
247
|
-
|
259
|
+
findAnalyzedTranslationPackageForLocale(entity: e.PackageEntity, locale: PackageLocale): AnalyzedTranslationPackage | undefined;
|
260
|
+
getLocalizedPackageWithLocale(originalPackageEntity: e.PackageEntity, locale: PackageLocale): e.PackageEntity | undefined;
|
248
261
|
enumerateAnalyzedTranslationPackages(): Iterable<AnalyzedTranslationPackage>;
|
249
262
|
getLinkedMultiPlatformPackagesByPlatform(entity: e.PackageEntity): ReadonlyMap<PlatformKind, LinkedMultiPlatformPackage> | undefined;
|
250
263
|
getLinkedMultiPlatformPackage(entity: e.PackageEntity, platform: PlatformKind): LinkedMultiPlatformPackage | undefined;
|
251
|
-
createPackageMembers(pkg: SourcePackage):
|
264
|
+
createPackageMembers(pkg: SourcePackage): PackageEntityMembers;
|
252
265
|
instantiateType(entity: e.TypeEntity, typeArguments?: readonly types.Type[]): types.Type;
|
253
266
|
instantiateType(entity: e.TypeEntity, substitutions?: types.Substitutions): types.Type;
|
254
267
|
instantiateTypeByIdentitySubstitution(entity: e.TypeEntity): types.Type;
|
@@ -262,7 +275,7 @@ export declare class Analyzer {
|
|
262
275
|
createTypeMemberHiding(node: tree.TypeMemberDeclaration, modifierFlags: ModifierFlags): e.EntityHidingLevel | undefined;
|
263
276
|
getDeclarationsUsageCount(sourceFile: tree.SourceFile, cancellationToken: CancellationToken | undefined): Promise<DeclarationsUsageCountResult>;
|
264
277
|
createBackingPackageVariables(declaredMembers: readonly (e.NamedPackageMemberEntity | e.PackageAliasEntity)[], pkg: e.PackageEntity): e.PackageVariableEntity[];
|
265
|
-
createBackingFields(declaredMembers: readonly NamedTypeMemberEntity[], type: e.TypeEntity): e.FieldEntity[];
|
278
|
+
createBackingFields(declaredMembers: readonly e.NamedTypeMemberEntity[], type: e.TypeEntity): e.FieldEntity[];
|
266
279
|
createNodeDiagnostic(code: DiagnosticCode, node: tree.Node, formatArguments?: readonly string[], kind?: DiagnosticKind, flags?: DiagnosticFlags): Diagnostic;
|
267
280
|
createSourceFileRangeDiagnostic(code: DiagnosticCode, range: Range, nodeOrSourceFile: tree.Node | project.SourceFile, formatArguments?: readonly string[], kind?: DiagnosticKind, flags?: DiagnosticFlags): Diagnostic;
|
268
281
|
createDiagnostic(code: DiagnosticCode, location: DiagnosticLocation | undefined, formatArguments?: readonly string[], kind?: DiagnosticKind, flags?: DiagnosticFlags): Diagnostic;
|
@@ -273,14 +286,14 @@ export declare class Analyzer {
|
|
273
286
|
basicMethodOfOriginalType: e.MethodEntity;
|
274
287
|
} | undefined;
|
275
288
|
getControlFlowGraph(sourceFile: project.SourceFile): controlFlow.GraphBuildResult;
|
276
|
-
createAmbiguousEntityAccessDiagnostic(entities: readonly
|
277
|
-
createAmbiguousEntityAccessLazyDiagnostic(entities: readonly
|
278
|
-
createAmbiguousFunctionAccessDiagnostic(functions: readonly
|
279
|
-
createAmbiguousFunctionAccessLazyDiagnostic(functions: readonly
|
280
|
-
createAmbiguousTypeMemberAccessDiagnostic(members: readonly
|
281
|
-
createAmbiguousTypeMemberAccessLazyDiagnostic(members: readonly
|
282
|
-
createAmbiguousNamedScopeDeclarationAccessDiagnostic(declarations: readonly
|
283
|
-
createAmbiguousNamedScopeDeclarationAccessLazyDiagnostic(declarations: readonly
|
289
|
+
createAmbiguousEntityAccessDiagnostic(entities: readonly e.Entity[], node: tree.Node): Diagnostic;
|
290
|
+
createAmbiguousEntityAccessLazyDiagnostic(entities: readonly e.Entity[], node: tree.Node): Lazy<Diagnostic>;
|
291
|
+
createAmbiguousFunctionAccessDiagnostic(functions: readonly AccessedFunction[], node: tree.Node): Diagnostic;
|
292
|
+
createAmbiguousFunctionAccessLazyDiagnostic(functions: readonly AccessedFunction[], node: tree.Node): Lazy<Diagnostic>;
|
293
|
+
createAmbiguousTypeMemberAccessDiagnostic(members: readonly types.TypeMember[], node: tree.Node): Diagnostic;
|
294
|
+
createAmbiguousTypeMemberAccessLazyDiagnostic(members: readonly types.TypeMember[], node: tree.Node): Lazy<Diagnostic>;
|
295
|
+
createAmbiguousNamedScopeDeclarationAccessDiagnostic(declarations: readonly semanticContext.NamedDeclaration[], node: tree.Node): Diagnostic;
|
296
|
+
createAmbiguousNamedScopeDeclarationAccessLazyDiagnostic(declarations: readonly semanticContext.NamedDeclaration[], node: tree.Node): Lazy<Diagnostic>;
|
284
297
|
addDiagnosticComputedLazily(diagnostic: Diagnostic): void;
|
285
298
|
getAcceptorForDiagnosticsComputedLazily(): DiagnosticAcceptor;
|
286
299
|
getSourceFileDiagnosticsComputedLazily(sourceFile: project.SourceFile): readonly Diagnostic[];
|
@@ -290,6 +303,9 @@ export declare class Analyzer {
|
|
290
303
|
getTypeMemberImplementationCheckResult(typeEntity: e.TypeEntityWithMembers): TypeMemberImplementationCheckResult;
|
291
304
|
createEntityContextForTypeDeclaration(node: TypeDeclaration): e.EntityContext;
|
292
305
|
isFunctionBlockWithImplicitlyReturnedExpression(node: tree.FunctionBlock): boolean;
|
306
|
+
getLocalizedWellKnownDeclarations(locale: PackageLocale): WellKnownDeclarations;
|
307
|
+
getLocalizedStandardTypes(locale: PackageLocale): types.StandardTypes;
|
308
|
+
determineUnderlyingTypeOfSourceVariantType(memberList: tree.TypeMemberDeclarationList): types.Type;
|
293
309
|
private createTsInterop;
|
294
310
|
}
|
295
311
|
export declare class TsInteropInputs {
|
@@ -324,8 +340,8 @@ declare class Type {
|
|
324
340
|
constructor(_analyzer: Analyzer);
|
325
341
|
ofExpression(node: tree.Expression, targetTypeHint?: TargetTypeHint): types.Type;
|
326
342
|
ofTypeSpecifier(node: tree.TypeSpecifier): types.Type;
|
327
|
-
ofAccessedFunction(accessedFunction:
|
328
|
-
ofAccessedOperator(operator:
|
343
|
+
ofAccessedFunction(accessedFunction: AccessedFunction): types.Type;
|
344
|
+
ofAccessedOperator(operator: types.Operator): types.Type;
|
329
345
|
ofFunctionBlockLiteral(node: tree.FunctionBlockLiteral, targetTypeHint?: TargetTypeHint): types.FunctionType;
|
330
346
|
ofFunctionLiteral(node: tree.FunctionLiteral, targetTypeHint?: TargetTypeHint): types.FunctionType;
|
331
347
|
private ofArrayLiteral;
|
@@ -646,16 +662,15 @@ declare class PackageImports {
|
|
646
662
|
private readonly _importedPackageNameTrees;
|
647
663
|
constructor(_analyzer: Analyzer);
|
648
664
|
analyzeExplicitPackageImports(sourceFile: project.SourceFile): AnalyzedPackageImports;
|
649
|
-
getPackagesAvailableForImport(pkg: project.SourcePackage): readonly
|
665
|
+
getPackagesAvailableForImport(pkg: project.SourcePackage): readonly e.PackageEntity[];
|
650
666
|
getUniqueImportedPackages(sourceFile: project.SourceFile): readonly PackageImportInfo[];
|
651
667
|
getImportedPackageNameTree(node: tree.SourceFile): ImportedPackageNameTree;
|
652
668
|
private getAutomaticallyImportedPackages;
|
653
669
|
}
|
654
670
|
export declare class AnalyzedPackageImport {
|
655
671
|
readonly entity: e.PackageEntity | undefined;
|
656
|
-
readonly translationPackage: AnalyzedTranslationPackage | undefined;
|
657
672
|
readonly isAliasedImport: e.PackageAliasEntity | undefined;
|
658
|
-
constructor(entity: e.PackageEntity | undefined,
|
673
|
+
constructor(entity: e.PackageEntity | undefined, isAliasedImport: e.PackageAliasEntity | undefined);
|
659
674
|
}
|
660
675
|
export declare class AnalyzedPackageImports {
|
661
676
|
readonly packageImportInfos: Map<tree.PackageImport, AnalyzedPackageImport>;
|
@@ -664,9 +679,8 @@ export declare class AnalyzedPackageImports {
|
|
664
679
|
}
|
665
680
|
export declare class PackageImportInfo {
|
666
681
|
readonly entity: e.PackageEntity;
|
667
|
-
readonly translationPackage: AnalyzedTranslationPackage | undefined;
|
668
682
|
readonly isAliasedImport: e.PackageAliasEntity | undefined;
|
669
|
-
constructor(entity: e.PackageEntity,
|
683
|
+
constructor(entity: e.PackageEntity, isAliasedImport: e.PackageAliasEntity | undefined);
|
670
684
|
}
|
671
685
|
declare class TypeUtils {
|
672
686
|
private readonly _analyzer;
|
@@ -732,44 +746,16 @@ declare class ConflictsCheck {
|
|
732
746
|
export type EntityWithoutTypeParametersInSignature = e.ConstructorEntity | e.DestructorEntity | e.OperatorEntity | e.IndexerEntity;
|
733
747
|
export type TypeMemberWithoutTypeParametersInSignature = types.Constructor | types.Destructor | types.Operator | types.Indexer;
|
734
748
|
export declare class ExpressionDenotesFunctionCheckResult {
|
735
|
-
readonly candidates: readonly
|
736
|
-
readonly suitableFunctions: readonly
|
737
|
-
get singleSuitableFunction():
|
738
|
-
constructor(candidates: readonly
|
749
|
+
readonly candidates: readonly AccessedFunction[];
|
750
|
+
readonly suitableFunctions: readonly AccessedFunction[];
|
751
|
+
get singleSuitableFunction(): AccessedFunction | undefined;
|
752
|
+
constructor(candidates: readonly AccessedFunction[], suitableFunctions: readonly AccessedFunction[]);
|
739
753
|
}
|
740
754
|
export declare class ExpressionDenotesOperatorCheckResult {
|
741
|
-
readonly candidates: readonly
|
742
|
-
readonly suitableOperators: readonly
|
743
|
-
get singleSuitableOperator():
|
744
|
-
constructor(candidates: readonly
|
745
|
-
}
|
746
|
-
type AvailablePackage = AvailablePackage.Original | AvailablePackage.Translated;
|
747
|
-
declare namespace AvailablePackage {
|
748
|
-
export class Original implements IAvailablePackage {
|
749
|
-
readonly value: e.PackageEntity;
|
750
|
-
readonly kind = "original";
|
751
|
-
constructor(value: e.PackageEntity);
|
752
|
-
getImportName(): PackageName;
|
753
|
-
getLocale(): PackageLocale;
|
754
|
-
getEntity(): e.PackageEntity;
|
755
|
-
getTranslationPackage(): AnalyzedTranslationPackage | undefined;
|
756
|
-
}
|
757
|
-
export class Translated implements IAvailablePackage {
|
758
|
-
readonly value: AnalyzedTranslationPackage;
|
759
|
-
readonly kind = "translated";
|
760
|
-
constructor(value: AnalyzedTranslationPackage);
|
761
|
-
getImportName(): PackageName;
|
762
|
-
getLocale(): PackageLocale;
|
763
|
-
getEntity(): e.PackageEntity;
|
764
|
-
getTranslationPackage(): AnalyzedTranslationPackage | undefined;
|
765
|
-
}
|
766
|
-
interface IAvailablePackage {
|
767
|
-
getImportName(): PackageName;
|
768
|
-
getLocale(): PackageLocale;
|
769
|
-
getEntity(): e.PackageEntity;
|
770
|
-
getTranslationPackage(): AnalyzedTranslationPackage | undefined;
|
771
|
-
}
|
772
|
-
export {};
|
755
|
+
readonly candidates: readonly types.Operator[];
|
756
|
+
readonly suitableOperators: readonly types.Operator[];
|
757
|
+
get singleSuitableOperator(): types.Operator | undefined;
|
758
|
+
constructor(candidates: readonly types.Operator[], suitableOperators: readonly types.Operator[]);
|
773
759
|
}
|
774
760
|
export declare class DeclaredTypeMemberEntities {
|
775
761
|
readonly variables: readonly e.FieldEntity[];
|
@@ -779,7 +765,7 @@ export declare class DeclaredTypeMemberEntities {
|
|
779
765
|
readonly destructors: readonly e.DestructorEntity[];
|
780
766
|
readonly indexers: readonly e.SourceIndexerEntity[];
|
781
767
|
readonly dereferenceOperators: readonly e.DereferenceOperatorEntity[];
|
782
|
-
get namedMembers(): NamedTypeMemberEntity[];
|
768
|
+
get namedMembers(): e.NamedTypeMemberEntity[];
|
783
769
|
constructor(variables: readonly e.FieldEntity[], methods: readonly e.MethodEntity[], operators: readonly e.OperatorEntity[], constructors: readonly e.ConstructorEntity[], destructors: readonly e.DestructorEntity[], indexers: readonly e.SourceIndexerEntity[], dereferenceOperators: readonly e.DereferenceOperatorEntity[]);
|
784
770
|
}
|
785
771
|
export {};
|
@@ -1,29 +1,27 @@
|
|
1
1
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
2
2
|
import { ParameterVariableEntity } from '../entities/index.js';
|
3
|
-
import
|
3
|
+
import * as tree from '../tree/index.js';
|
4
4
|
import * as types from '../types/index.js';
|
5
|
-
import { LocalizedName } from './Localization.js';
|
6
5
|
import { Analyzer } from './index.js';
|
7
6
|
export declare class ArgumentToParameterMatchResult {
|
8
7
|
private readonly _analyzer;
|
9
8
|
private readonly _matchResults;
|
10
9
|
constructor(_analyzer: Analyzer);
|
11
|
-
ofCallExpression(node: CallExpression): MatchResult | undefined;
|
12
|
-
ofAutotypeCallExpression(node: AutotypeCallExpression): MatchResult | undefined;
|
13
|
-
ofTag(node: Tag): MatchResult | undefined;
|
14
|
-
ofIndexedAccessExpression(node: IndexedAccessExpression): MatchResult | undefined;
|
10
|
+
ofCallExpression(node: tree.CallExpression): MatchResult | undefined;
|
11
|
+
ofAutotypeCallExpression(node: tree.AutotypeCallExpression): MatchResult | undefined;
|
12
|
+
ofTag(node: tree.Tag): MatchResult | undefined;
|
13
|
+
ofIndexedAccessExpression(node: tree.IndexedAccessExpression): MatchResult | undefined;
|
15
14
|
private convertMatchResult;
|
16
15
|
private convertParameter;
|
17
16
|
}
|
18
17
|
export declare class MatchResult {
|
19
|
-
readonly parameterByArgument: ReadonlyMap<Argument, MatchResultValueParameter>;
|
18
|
+
readonly parameterByArgument: ReadonlyMap<tree.Argument, MatchResultValueParameter>;
|
20
19
|
readonly unmatchedParameters: readonly MatchResultValueParameter[];
|
21
20
|
readonly diagnostics: readonly Diagnostic[];
|
22
|
-
constructor(parameterByArgument: ReadonlyMap<Argument, MatchResultValueParameter>, unmatchedParameters: readonly MatchResultValueParameter[], diagnostics: readonly Diagnostic[]);
|
21
|
+
constructor(parameterByArgument: ReadonlyMap<tree.Argument, MatchResultValueParameter>, unmatchedParameters: readonly MatchResultValueParameter[], diagnostics: readonly Diagnostic[]);
|
23
22
|
}
|
24
23
|
export declare class MatchResultValueParameter {
|
25
24
|
readonly entity: ParameterVariableEntity;
|
26
25
|
readonly type: types.Type;
|
27
|
-
|
28
|
-
constructor(entity: ParameterVariableEntity, type: types.Type, name: LocalizedName);
|
26
|
+
constructor(entity: ParameterVariableEntity, type: types.Type);
|
29
27
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
2
2
|
import { AutotypeCallExpression } from '../tree/index.js';
|
3
3
|
import * as types from '../types/index.js';
|
4
|
-
import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
|
5
4
|
import { Analyzer, TargetTypeHint } from './index.js';
|
6
5
|
export declare class Resolver {
|
7
6
|
private readonly _analyzer;
|
@@ -20,8 +19,8 @@ declare class Meaning_constructorCall {
|
|
20
19
|
* с ним совместим.
|
21
20
|
*/
|
22
21
|
readonly type: types.Type;
|
23
|
-
readonly candidates: readonly
|
24
|
-
readonly suitableConstructors: readonly
|
22
|
+
readonly candidates: readonly types.Constructor[];
|
23
|
+
readonly suitableConstructors: readonly types.Constructor[];
|
25
24
|
readonly kind = "constructor-call";
|
26
25
|
constructor(
|
27
26
|
/**
|
@@ -31,7 +30,7 @@ declare class Meaning_constructorCall {
|
|
31
30
|
* создаваемый найденным конструктором, будет отличаться от результирующего типа, хранимого в этом поле, но будет
|
32
31
|
* с ним совместим.
|
33
32
|
*/
|
34
|
-
type: types.Type, candidates: readonly
|
33
|
+
type: types.Type, candidates: readonly types.Constructor[], suitableConstructors: readonly types.Constructor[]);
|
35
34
|
}
|
36
35
|
declare class Meaning_unresolved {
|
37
36
|
readonly diagnostics: readonly Diagnostic[];
|
@@ -2,7 +2,6 @@ import { Diagnostic } 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 { Analyzer } from './Analyzer.js';
|
5
|
-
import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
|
6
5
|
/**
|
7
6
|
* "основа" не является самостоятельным выражением и может использоваться только в следующих конструкциях:
|
8
7
|
* 1. `основа()` - в конструкторе для вызова базового конструктора или в методе для вызова базового метода.
|
@@ -41,8 +40,8 @@ declare class Meaning_baseConstructorAccess {
|
|
41
40
|
* с ним совместим.
|
42
41
|
*/
|
43
42
|
readonly type: types.Type;
|
44
|
-
readonly candidates: readonly
|
45
|
-
readonly suitableConstructors: readonly
|
43
|
+
readonly candidates: readonly types.Constructor[];
|
44
|
+
readonly suitableConstructors: readonly types.Constructor[];
|
46
45
|
readonly kind = "base-constructor-access";
|
47
46
|
constructor(
|
48
47
|
/**
|
@@ -52,7 +51,7 @@ declare class Meaning_baseConstructorAccess {
|
|
52
51
|
* создаваемый найденным конструктором, будет отличаться от результирующего типа, хранимого в этом поле, но будет
|
53
52
|
* с ним совместим.
|
54
53
|
*/
|
55
|
-
type: types.Type, candidates: readonly
|
54
|
+
type: types.Type, candidates: readonly types.Constructor[], suitableConstructors: readonly types.Constructor[]);
|
56
55
|
}
|
57
56
|
declare class Meaning_overriddenMethodAccess {
|
58
57
|
readonly method: types.Method;
|
@@ -3,26 +3,26 @@ import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
|
|
3
3
|
import { IEntityHidingMatcher, TypeEntityWithMembers } from '../entities/index.js';
|
4
4
|
import { Node } from '../tree/index.js';
|
5
5
|
import { Analyzer } from './Analyzer.js';
|
6
|
-
import { LocalizationContext } from './LocalizationContext.js';
|
7
6
|
export declare class BaseMemberConflictsValidator {
|
8
7
|
private readonly _analyzer;
|
9
8
|
private readonly _typeEntity;
|
10
9
|
private readonly _hidingMatcher;
|
11
|
-
private readonly _localizationContext;
|
12
10
|
private readonly _dialect;
|
13
11
|
private readonly _diagnostics;
|
14
12
|
private readonly _nodeForDiagnostic;
|
15
13
|
private _displayService;
|
16
14
|
private get displayService();
|
17
|
-
constructor(_analyzer: Analyzer, _typeEntity: TypeEntityWithMembers, _hidingMatcher: IEntityHidingMatcher,
|
15
|
+
constructor(_analyzer: Analyzer, _typeEntity: TypeEntityWithMembers, _hidingMatcher: IEntityHidingMatcher, _dialect: PackageDialect | undefined, _diagnostics: DiagnosticAcceptor, _nodeForDiagnostic: Node);
|
18
16
|
validate(): void;
|
19
17
|
private getAllNotShadowedNotOverriddenMembers;
|
20
|
-
private
|
21
|
-
private validateNamedMemberConflictsUsingOriginalNames;
|
18
|
+
private validateMemberConflicts;
|
22
19
|
private doTypeMembersConflict;
|
20
|
+
private doNamedTypeMemberConflictInOriginalLanguage;
|
21
|
+
private doNamedTypeMembersConflict;
|
23
22
|
private reportMembersConflictDiagnostic;
|
24
23
|
private reportMembersOriginalNameConflictConflictDiagnostic;
|
25
24
|
private addOverriddenMembersRecursively;
|
26
25
|
private typeMemberMatchesHiding;
|
27
|
-
private
|
26
|
+
private getOriginalTypeMemberNameConsideringOverriddenMembers;
|
27
|
+
private getLeastOverriddenNamedMember;
|
28
28
|
}
|