@artel/artc 0.6.25244 → 0.6.25246
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 +36 -22
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +651 -1065
- package/build/{chunk-V7EU2U6Y.js → chunk-BGCXIMTW.js} +2 -2
- package/build/{chunk-C7RKXERX.js → chunk-CNAUD5P6.js} +1 -1
- package/build/{chunk-BAAUJYMH.js → chunk-RIWU6SF4.js} +24430 -21532
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +49 -81
- package/build/types/analysis/Analyzer.d.ts +82 -91
- 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 +12 -8
- package/build/types/analysis/BaseMemberConflictsValidator.d.ts +8 -10
- package/build/types/analysis/CallExpressionMeaning.d.ts +8 -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/DiagnosticArgumentFactory.d.ts +18 -0
- package/build/types/analysis/DiagnosticCollector.d.ts +3 -3
- package/build/types/analysis/DisplayableEntity.d.ts +46 -0
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +19 -20
- package/build/types/analysis/ImportedPackageNameTree.d.ts +1 -7
- package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +7 -8
- package/build/types/analysis/InstanceFieldsInitializationValidator.d.ts +18 -0
- package/build/types/analysis/Localization.d.ts +19 -25
- package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +32 -34
- package/build/types/analysis/NamedTypeResolver.d.ts +7 -10
- package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +4 -7
- package/build/types/analysis/NodeTypeUtils.d.ts +1 -0
- package/build/types/analysis/ObjectExpressionMeaning.d.ts +12 -8
- package/build/types/analysis/OwnAndBaseConstructorCallsChecker.d.ts +23 -0
- package/build/types/analysis/PackageAndStaticVariablesInitializationValidator.d.ts +17 -0
- 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 +19 -22
- 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/control-flow/NarrowableReference.d.ts +5 -6
- package/build/types/analysis/semantic-context/FieldWithInitializerSemanticContext.d.ts +5 -6
- package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +13 -14
- package/build/types/analysis/semantic-context/SemanticContextValidatingNameConflicts.d.ts +5 -6
- package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +8 -9
- 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/Displayable.d.ts +13 -0
- package/build/types/common/FormatString.d.ts +2 -1
- package/build/types/common/HelperPhrases.d.ts +2 -1
- package/build/types/common/Name.d.ts +9 -14
- package/build/types/common/TreeQuery.d.ts +6 -4
- package/build/types/common/WithDiagnostics.d.ts +3 -4
- package/build/types/common/index.d.ts +1 -1
- package/build/types/diagnostic/DiagnosticCode.d.ts +131 -125
- package/build/types/diagnostic/DiagnosticData.d.ts +7 -3
- package/build/types/emitter/EntityMap.d.ts +1 -0
- package/build/types/emitter/Transformer.d.ts +4 -2
- package/build/types/emitter/ir/EmitOptions.d.ts +14 -0
- package/build/types/emitter/ir/Nodes.d.ts +41 -25
- package/build/types/emitter/ir/types.d.ts +1 -1
- package/build/types/entities/AliasTypeEntity.d.ts +9 -41
- package/build/types/entities/AliasedType.d.ts +62 -0
- package/build/types/entities/BaseEntityHidingMatcher.d.ts +1 -1
- 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/EntityHiding.d.ts +1 -1
- 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/FileSystemTree.d.ts +2 -2
- 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 +3 -4
- package/build/types/services/workspace/ClientTrackedSourceFiles.d.ts +5 -5
- package/build/types/services/workspace/CompilationController.d.ts +3 -3
- package/build/types/services/workspace/FileSystemTreeProviderBasedOnWatchedFileSystem.d.ts +4 -4
- package/build/types/services/workspace/ManuallyUpdatedFileSystemTreeProvider.d.ts +4 -4
- package/build/types/services/workspace/Workspace.d.ts +3 -3
- package/build/types/services/workspace/WorkspaceFiles.d.ts +7 -7
- 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 +2 -2
- 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,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;
|
@@ -60,98 +64,57 @@ export declare class AnalyzedTranslationPackage {
|
|
60
64
|
private createTranslatedTypeSignature;
|
61
65
|
private enumerateTranslationsDeclarations;
|
62
66
|
private findTypeTranslation;
|
63
|
-
private createAmbiguousAccessDiagnostic;
|
64
67
|
}
|
65
68
|
export declare class TranslatedPackageMembers {
|
66
69
|
private readonly _namedMembers;
|
67
|
-
private readonly _membersByNameKey;
|
68
70
|
private readonly _nameByEntity;
|
69
|
-
private get membersByNameKey();
|
70
71
|
private get nameByEntity();
|
71
72
|
constructor(_namedMembers: readonly TranslatedNamedPackageMember[]);
|
72
73
|
getNamedMembers(): readonly TranslatedNamedPackageMember[];
|
73
|
-
|
74
|
-
getMemberName(entity: NamedPackageMemberEntity): Name | undefined;
|
74
|
+
getMemberName(entity: NamedPackageMemberEntity): TranslatedName | undefined;
|
75
75
|
}
|
76
76
|
export declare class TranslatedNamedPackageMember {
|
77
77
|
readonly value: NamedPackageMemberEntity;
|
78
|
-
readonly name:
|
79
|
-
constructor(value: NamedPackageMemberEntity, name:
|
78
|
+
readonly name: TranslatedName;
|
79
|
+
constructor(value: NamedPackageMemberEntity, name: TranslatedName);
|
80
80
|
}
|
81
81
|
export declare class TranslatedTypeEntityMembers {
|
82
82
|
private readonly _namedMembers;
|
83
83
|
readonly translationPackage: AnalyzedTranslationPackage;
|
84
|
-
private readonly _membersByNameKey;
|
85
84
|
private readonly _nameByEntity;
|
86
|
-
private get membersByNameKey();
|
87
85
|
private get nameByEntity();
|
88
86
|
constructor(_namedMembers: readonly TranslatedNamedTypeEntityMember[], translationPackage: AnalyzedTranslationPackage);
|
89
87
|
getNamedMembers(): readonly TranslatedNamedTypeEntityMember[];
|
90
|
-
|
91
|
-
getMemberName(entity: NamedTypeMemberEntity): Name | undefined;
|
88
|
+
getMemberName(entity: NamedTypeMemberEntity): TranslatedName | undefined;
|
92
89
|
}
|
93
90
|
export declare class TranslatedNamedTypeEntityMember {
|
94
91
|
readonly value: NamedTypeMemberEntity;
|
95
|
-
readonly name:
|
96
|
-
constructor(value: NamedTypeMemberEntity, name:
|
92
|
+
readonly name: TranslatedName;
|
93
|
+
constructor(value: NamedTypeMemberEntity, name: TranslatedName);
|
97
94
|
}
|
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 {};
|
95
|
+
export declare class TranslatedSubprogramSignature {
|
96
|
+
readonly translation: Translation;
|
97
|
+
readonly typeParameters: readonly TranslatedTypeParameter[];
|
98
|
+
readonly valueParameters: readonly TranslatedValueParameter[];
|
99
|
+
constructor(translation: Translation, typeParameters: readonly TranslatedTypeParameter[], valueParameters: readonly TranslatedValueParameter[]);
|
100
|
+
getTypeParameterName(entity: TypeParameterEntity): TranslatedName | undefined;
|
101
|
+
getValueParameterName(entity: ParameterVariableEntity): TranslatedName | undefined;
|
124
102
|
}
|
125
103
|
export declare class TranslatedTypeParameter {
|
126
104
|
readonly value: TypeParameterEntity;
|
127
|
-
readonly name:
|
128
|
-
constructor(value: TypeParameterEntity, name:
|
105
|
+
readonly name: TranslatedName;
|
106
|
+
constructor(value: TypeParameterEntity, name: TranslatedName);
|
129
107
|
}
|
130
108
|
export declare class TranslatedValueParameter {
|
131
109
|
readonly value: ParameterVariableEntity;
|
132
|
-
readonly name:
|
133
|
-
constructor(value: ParameterVariableEntity, name:
|
110
|
+
readonly name: TranslatedName;
|
111
|
+
constructor(value: ParameterVariableEntity, name: TranslatedName);
|
134
112
|
}
|
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 {};
|
113
|
+
export declare class TranslatedTypeHeader {
|
114
|
+
readonly translation: Translation;
|
115
|
+
readonly typeParameters: readonly TranslatedTypeParameter[];
|
116
|
+
constructor(translation: Translation, typeParameters: readonly TranslatedTypeParameter[]);
|
117
|
+
getTypeParameterName(entity: TypeParameterEntity): TranslatedName | undefined;
|
155
118
|
}
|
156
119
|
export type TypeEntityWithHeaderLocalization = StructuredTypeEntity | VariantTypeEntity | AliasTypeEntity;
|
157
120
|
export declare class GetSingleTranslationTargetResult<T> {
|
@@ -174,3 +137,8 @@ export declare class GetMultipleTranslationTargetsResult<T> {
|
|
174
137
|
static invalid<T>(diagnostics: readonly Diagnostic[]): GetMultipleTranslationTargetsResult<T>;
|
175
138
|
static invalid<T>(diagnostics: readonly Diagnostic[], targets: readonly T[], isAmbiguous: boolean): GetMultipleTranslationTargetsResult<T>;
|
176
139
|
}
|
140
|
+
export declare class TranslatedName {
|
141
|
+
readonly value: Name;
|
142
|
+
readonly translation: Translation;
|
143
|
+
constructor(value: Name, translation: Translation);
|
144
|
+
}
|
@@ -1,11 +1,10 @@
|
|
1
1
|
import ts from 'typescript';
|
2
|
-
import { CancellationToken,
|
2
|
+
import { CancellationToken, DisplayableOrPrimitive, 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,18 +22,17 @@ 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 {
|
25
|
+
import { DiagnosticArgumentFactory } from './DiagnosticArgumentFactory.js';
|
27
26
|
import * as functionOverloadResolver from './FunctionOverloadResolver.js';
|
28
27
|
import * as identifierExpressionResolution from './IdentifierExpressionMeaning.js';
|
29
28
|
import { ImportedPackageNameTree, PackageNameTreeNode } from './ImportedPackageNameTree.js';
|
30
29
|
import * as indexedAccessExpressionMeaning from './IndexedAccessExpressionMeaning.js';
|
31
|
-
import { WithLocalization } from './Localization.js';
|
32
|
-
import { LocalizationContext } from './LocalizationContext.js';
|
33
30
|
import * as memberAccessExpressionResolution from './MemberAccessExpressionMeaning.js';
|
34
31
|
import { ModifierFlags } from './ModifierFlags.js';
|
35
32
|
import { NamedTypeSpecifierResolutionResult } from './NamedTypeSpecifierResolver.js';
|
36
|
-
import { DereferencedVariableAccessorDeclaration, FieldAccessorDeclaration, FunctionTypeDeclaration, GetterDeclaration, IndexedElementAccessorDeclaration, PackageVariableAccessorDeclaration, SetterDeclaration, StructuredTypeDeclaration, TypeDeclaration, VariantTypeDeclaration } from './NodeTypeUtils.js';
|
33
|
+
import { DereferencedVariableAccessorDeclaration, FieldAccessorDeclaration, FunctionTypeDeclaration, GetterDeclaration, IndexedElementAccessorDeclaration, PackageVariableAccessorDeclaration, SetterDeclaration, StructuredTypeDeclaration, TypeDeclaration, TypeWithMembersDeclaration, VariantTypeDeclaration } from './NodeTypeUtils.js';
|
37
34
|
import * as objectExpressionMeaning from './ObjectExpressionMeaning.js';
|
35
|
+
import { OwnAndBaseConstructorCallsCheckResult } from './OwnAndBaseConstructorCallsChecker.js';
|
38
36
|
import { SourceFileMembers as ActualSourceFileMembers } from './SourceFileMembers.js';
|
39
37
|
import * as tagMeaning from './TagMeaning.js';
|
40
38
|
import * as tags from './Tags.js';
|
@@ -52,8 +50,16 @@ export declare class Analyzer {
|
|
52
50
|
* Пакет с именем 'Артель', содержащий стандартные типы.
|
53
51
|
*/
|
54
52
|
readonly systemPackage: e.PackageEntity;
|
55
|
-
|
56
|
-
|
53
|
+
/**
|
54
|
+
* Стандартные объявления на языке оригинала. Для получения стандартных объявлений на желаемом языке используйте
|
55
|
+
* {@link getLocalizedWellKnownDeclarations}.
|
56
|
+
*/
|
57
|
+
readonly originalWellKnownDeclarations: WellKnownDeclarations;
|
58
|
+
/**
|
59
|
+
* Стандартные типы на языке оригинала. Для получения стандартных типов на желаемом языке используйте
|
60
|
+
* {@link getLocalizedStandardTypes}.
|
61
|
+
*/
|
62
|
+
readonly originalStandardTypes: types.StandardTypes;
|
57
63
|
readonly typeFactory: TypeFactory;
|
58
64
|
readonly type: Type;
|
59
65
|
readonly returnType: ReturnType;
|
@@ -62,7 +68,6 @@ export declare class Analyzer {
|
|
62
68
|
readonly valueLocalVariableEntity: ValueLocalVariableEntity;
|
63
69
|
readonly semanticContext: semanticContext.SemanticContextBuilder;
|
64
70
|
readonly argumentToParameterMatchResult: ArgumentToParameterMatchResult;
|
65
|
-
readonly defaultConstructors: DefaultConstructors;
|
66
71
|
readonly overriddenMember: OverriddenMember;
|
67
72
|
readonly tags: Tags;
|
68
73
|
readonly linkedEntity: LinkedEntity;
|
@@ -82,8 +87,8 @@ export declare class Analyzer {
|
|
82
87
|
private readonly _autotypeCallExpressionMeanings;
|
83
88
|
private readonly _identifierExpressionResolutionResults;
|
84
89
|
private readonly _tagResolutionResults;
|
85
|
-
private readonly
|
86
|
-
private readonly
|
90
|
+
private readonly _objectExpressionResolutionResults;
|
91
|
+
private readonly _baseExpressionResolutionResults;
|
87
92
|
private readonly _namedTypeSpecifierResolutionResults;
|
88
93
|
private readonly _prefixUnaryExpressionOperatorResolutionResults;
|
89
94
|
private readonly _binaryExpressionUserDefinableOperatorResolutionResults;
|
@@ -95,15 +100,23 @@ export declare class Analyzer {
|
|
95
100
|
private readonly _linkedMultiPlatformPackagesByPlatform;
|
96
101
|
private readonly _functionBlockWithYieldStatementCheckResults;
|
97
102
|
private readonly _namedDeclarationsUsageCountResults;
|
103
|
+
private readonly _packageAndStaticVariablesInitializationDiagnostics;
|
98
104
|
private readonly _controlFlowGraphs;
|
99
105
|
private readonly _diagnosticsComputedLazily;
|
100
106
|
private readonly _diagnosticsComputedLazilyAcceptor;
|
101
107
|
private readonly _sourcePackageMemberConflictsDiagnostics;
|
102
108
|
private readonly _notExplicitlyImplementedAbstractTypeMembers;
|
103
109
|
private readonly _typeMemberImplementationCheckResults;
|
110
|
+
private _originalPackageEntitiesByNameKey;
|
111
|
+
private _packageEntitiesByNameKey;
|
112
|
+
private readonly _localizedWellKnownDeclarations;
|
113
|
+
private readonly _localizedStandardTypes;
|
114
|
+
private readonly _ownAndBaseConstructorCallsCheckResults;
|
115
|
+
private readonly _expressionCanBeUsedInForLoopCheckResults;
|
104
116
|
get tsInterop(): TsInteropContext;
|
105
117
|
constructor(compilation: project.Compilation, tsInteropInputs: TsInteropInputs);
|
106
118
|
getProjectSourceFile(node: tree.SourceFile): project.SourceFile;
|
119
|
+
checkExpressionCanBeUsedInForLoop(node: tree.Expression): WithDiagnostics<ExpressionCanBeUsedInForLoopCheckResult>;
|
107
120
|
ifTypeEnumerableThenItemType(type: types.Type): types.Type | undefined;
|
108
121
|
ifTypeEnumeratorThenItemType(type: types.Type): types.Type | undefined;
|
109
122
|
isTypeArrayOrReadonlyArray(type: types.Type): {
|
@@ -136,8 +149,8 @@ export declare class Analyzer {
|
|
136
149
|
getAutotypeCallExpressionMeaning(node: tree.AutotypeCallExpression, targetTypeHint?: TargetTypeHint): autotypeCallExpressionMeaning.Meaning;
|
137
150
|
resolveIdentifierExpression(node: tree.IdentifierExpression, targetTypeHint?: TargetTypeHint): identifierExpressionResolution.ResolutionResult;
|
138
151
|
resolveTag(node: tree.Tag): tagMeaning.ResolutionResult;
|
139
|
-
|
140
|
-
|
152
|
+
resolveObjectExpression(node: tree.ObjectExpression): objectExpressionMeaning.ResolutionResult;
|
153
|
+
resolveBaseExpression(node: tree.BaseExpression): baseExpressionMeaning.ResolutionsResult;
|
141
154
|
/**
|
142
155
|
* Проверяет, является ли выражение цепочкой доступов через `?`, заканчивающейся выражением, тип которого допускает
|
143
156
|
* `пусто`.
|
@@ -172,11 +185,9 @@ export declare class Analyzer {
|
|
172
185
|
checkIdentifierNameIsReserved(name: string, locale: PackageLocale): ReservedIdentifierKind | undefined;
|
173
186
|
getReservedIdentifierName(reservedIdentifierKind: ReservedIdentifierKind, locale: PackageLocale): string;
|
174
187
|
createNameFromIdentifier(node: tree.Identifier): Name;
|
175
|
-
createSearchNameFromIdentifier(identifier: tree.Identifier): SearchName;
|
176
|
-
createLocalizationContext(sourceFile: project.SourceFile): LocalizationContext;
|
177
188
|
getImplicitBaseTypeForStructuredType(entity: e.StructuredTypeEntity): types.StructuredType | undefined;
|
178
|
-
getImplicitBaseTypeForVariantType(): types.StructuredType;
|
179
|
-
getImplicitBaseTypeForFunctionType(): types.StructuredType;
|
189
|
+
getImplicitBaseTypeForVariantType(locale: PackageLocale): types.StructuredType;
|
190
|
+
getImplicitBaseTypeForFunctionType(locale: PackageLocale): types.StructuredType;
|
180
191
|
resolveNamedTypeSpecifier(node: tree.NamedTypeSpecifier): NamedTypeSpecifierResolutionResult;
|
181
192
|
checkExpressionDenotesType(expression: tree.Expression): {
|
182
193
|
type: types.Type | undefined;
|
@@ -192,13 +203,16 @@ export declare class Analyzer {
|
|
192
203
|
checkFunctionBlockWithYieldStatement(node: tree.FunctionBlock): boolean;
|
193
204
|
enumerateAspects(type: types.Type): Iterable<types.StructuredType>;
|
194
205
|
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<
|
206
|
+
resolvePrefixUnaryExpressionUserDefinableOperator(node: tree.PrefixUnaryExpression): WithDiagnostics<types.Operator>;
|
207
|
+
resolveBinaryExpressionUserDefinableOperator(node: tree.BinaryExpression, operatorKind: BinaryOperatorKind): WithDiagnostics<types.Operator>;
|
208
|
+
resolveCompoundAssignmentStatementOperator(node: tree.AssignmentStatement, operatorKind: BinaryOperatorKind): WithDiagnostics<types.Operator>;
|
198
209
|
classifyBinaryExpressionOperator(operator: tree.BinaryExpressionOperator): BinaryExpressionOperatorClassificationResult;
|
199
210
|
getBinaryOperatorKindIfCompoundAssignmentOperator(operator: tree.AssignmentStatementOperator): BinaryOperatorKind | undefined;
|
211
|
+
getOriginalPackageEntities(): readonly e.PackageEntity[];
|
200
212
|
getPackageEntities(): readonly e.PackageEntity[];
|
201
|
-
|
213
|
+
getOriginalPackageEntityByName(name: PackageName): e.PackageEntity | undefined;
|
214
|
+
getPackageEntityByName(name: PackageName): e.PackageEntity | undefined;
|
215
|
+
getAnalyzedTranslationPackages(): readonly AnalyzedTranslationPackage[];
|
202
216
|
createFunctionTypeInvokeMethod(entity: e.FunctionTypeEntity): e.MethodEntity;
|
203
217
|
/**
|
204
218
|
* Преобразует тип таким образом, чтобы он не мог содержать значение `пусто`.
|
@@ -222,13 +236,16 @@ export declare class Analyzer {
|
|
222
236
|
canTypeParameterBeNone(type: types.ParameterType): boolean;
|
223
237
|
/**
|
224
238
|
* Делает тип `Пусто` совместимым с данным типом.
|
239
|
+
*
|
240
|
+
* @param locale Язык для типа Пусто.
|
241
|
+
*
|
225
242
|
* @example
|
226
243
|
* - Число -> Число | Пусто
|
227
244
|
* - Число | Пусто -> Число | Пусто
|
228
245
|
* - Т: Объект? -> (Т: Объект?) | Пусто (см. метод isNoneAssignableToType)
|
229
246
|
* - Т: Объект -> (Т: Объект) | Пусто
|
230
247
|
*/
|
231
|
-
includeNoneToType(type: types.Type): types.Type;
|
248
|
+
includeNoneToType(type: types.Type, locale: PackageLocale): types.Type;
|
232
249
|
/**
|
233
250
|
* Отвечает на вопрос "Совместим ли тип `Пусто` с данным типом?" (Можно ли присвоить `пусто` в переменную с данным типом?).
|
234
251
|
* @example Для следующих типов метод вернёт:
|
@@ -239,16 +256,17 @@ export declare class Analyzer {
|
|
239
256
|
isNoneAssignableToType(type: types.Type): boolean;
|
240
257
|
excludeTypeFromUnion(initialType: types.Type, excludedType: types.Type): types.Type;
|
241
258
|
isValueParameterVariadic(entity: e.VariableEntity): boolean;
|
242
|
-
getDefaultTypeParameterConstraint(): types.Type;
|
243
|
-
|
259
|
+
getDefaultTypeParameterConstraint(locale: PackageLocale): types.Type;
|
260
|
+
getSignatureTypeOfFunctionEntity(entity: e.FunctionEntity): types.FunctionType;
|
244
261
|
getFunctionBlockLiteralValueParameters(node: tree.FunctionBlockLiteral): readonly e.ParameterVariableEntity[];
|
245
262
|
getExtendedType(node: tree.TypeExtensionDeclaration): WithDiagnostics<e.NamedTypeEntity>;
|
246
263
|
getAnalyzedTranslationPackageIfTargetResolved(package_: project.TranslationPackage): AnalyzedTranslationPackage | undefined;
|
247
|
-
|
264
|
+
findAnalyzedTranslationPackageForLocale(entity: e.PackageEntity, locale: PackageLocale): AnalyzedTranslationPackage | undefined;
|
265
|
+
getLocalizedPackageWithLocale(originalPackageEntity: e.PackageEntity, locale: PackageLocale): e.PackageEntity | undefined;
|
248
266
|
enumerateAnalyzedTranslationPackages(): Iterable<AnalyzedTranslationPackage>;
|
249
267
|
getLinkedMultiPlatformPackagesByPlatform(entity: e.PackageEntity): ReadonlyMap<PlatformKind, LinkedMultiPlatformPackage> | undefined;
|
250
268
|
getLinkedMultiPlatformPackage(entity: e.PackageEntity, platform: PlatformKind): LinkedMultiPlatformPackage | undefined;
|
251
|
-
createPackageMembers(pkg: SourcePackage):
|
269
|
+
createPackageMembers(pkg: SourcePackage): PackageEntityMembers;
|
252
270
|
instantiateType(entity: e.TypeEntity, typeArguments?: readonly types.Type[]): types.Type;
|
253
271
|
instantiateType(entity: e.TypeEntity, substitutions?: types.Substitutions): types.Type;
|
254
272
|
instantiateTypeByIdentitySubstitution(entity: e.TypeEntity): types.Type;
|
@@ -261,11 +279,13 @@ export declare class Analyzer {
|
|
261
279
|
createPackageMemberHiding(node: tree.PackageMemberDeclaration, modifierFlags: ModifierFlags): e.EntityHidingLevel | undefined;
|
262
280
|
createTypeMemberHiding(node: tree.TypeMemberDeclaration, modifierFlags: ModifierFlags): e.EntityHidingLevel | undefined;
|
263
281
|
getDeclarationsUsageCount(sourceFile: tree.SourceFile, cancellationToken: CancellationToken | undefined): Promise<DeclarationsUsageCountResult>;
|
282
|
+
getPackageAndStaticVariablesInitializationDiagnostics(pkg: SourcePackage, cancellationToken: CancellationToken | undefined): Promise<readonly Diagnostic[]>;
|
283
|
+
createDefaultConstructors(typeEntity: e.StructuredTypeEntity, fields: readonly e.FieldEntity[]): readonly e.ConstructorEntity[];
|
264
284
|
createBackingPackageVariables(declaredMembers: readonly (e.NamedPackageMemberEntity | e.PackageAliasEntity)[], pkg: e.PackageEntity): e.PackageVariableEntity[];
|
265
|
-
createBackingFields(declaredMembers: readonly NamedTypeMemberEntity[], type: e.TypeEntity): e.FieldEntity[];
|
266
|
-
createNodeDiagnostic(code: DiagnosticCode, node: tree.Node, formatArguments?: readonly
|
267
|
-
createSourceFileRangeDiagnostic(code: DiagnosticCode, range: Range, nodeOrSourceFile: tree.Node | project.SourceFile, formatArguments?: readonly
|
268
|
-
createDiagnostic(code: DiagnosticCode, location: DiagnosticLocation | undefined, formatArguments?: readonly
|
285
|
+
createBackingFields(declaredMembers: readonly e.NamedTypeMemberEntity[], type: e.TypeEntity): e.FieldEntity[];
|
286
|
+
createNodeDiagnostic(code: DiagnosticCode, node: tree.Node, formatArguments?: readonly DisplayableOrPrimitive[], kind?: DiagnosticKind, flags?: DiagnosticFlags): Diagnostic;
|
287
|
+
createSourceFileRangeDiagnostic(code: DiagnosticCode, range: Range, nodeOrSourceFile: tree.Node | project.SourceFile, formatArguments?: readonly DisplayableOrPrimitive[], kind?: DiagnosticKind, flags?: DiagnosticFlags): Diagnostic;
|
288
|
+
createDiagnostic(code: DiagnosticCode, location: DiagnosticLocation | undefined, formatArguments?: readonly DisplayableOrPrimitive[], kind?: DiagnosticKind, flags?: DiagnosticFlags): Diagnostic;
|
269
289
|
createNodeDiagnosticLocation(node: tree.Node): DiagnosticLocation;
|
270
290
|
getDeclaredTypeMemberEntities(node: tree.TypeMemberDeclarationBlock): DeclaredTypeMemberEntities;
|
271
291
|
getBasicMethodOfOriginalTypeForBasicMethodOfAliasType(entity: e.MethodEntity): e.MethodEntity | undefined;
|
@@ -273,14 +293,10 @@ export declare class Analyzer {
|
|
273
293
|
basicMethodOfOriginalType: e.MethodEntity;
|
274
294
|
} | undefined;
|
275
295
|
getControlFlowGraph(sourceFile: project.SourceFile): controlFlow.GraphBuildResult;
|
276
|
-
createAmbiguousEntityAccessDiagnostic(entities: readonly
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
createAmbiguousTypeMemberAccessDiagnostic(members: readonly WithLocalization<types.TypeMember>[], lctx: LocalizationContext, node: tree.Node): Diagnostic;
|
281
|
-
createAmbiguousTypeMemberAccessLazyDiagnostic(members: readonly WithLocalization<types.TypeMember>[], lctx: LocalizationContext, node: tree.Node): Lazy<Diagnostic>;
|
282
|
-
createAmbiguousNamedScopeDeclarationAccessDiagnostic(declarations: readonly WithLocalization<semanticContext.NamedDeclaration>[], lctx: LocalizationContext, node: tree.Node): Diagnostic;
|
283
|
-
createAmbiguousNamedScopeDeclarationAccessLazyDiagnostic(declarations: readonly WithLocalization<semanticContext.NamedDeclaration>[], lctx: LocalizationContext, node: tree.Node): Lazy<Diagnostic>;
|
296
|
+
createAmbiguousEntityAccessDiagnostic(entities: readonly e.Entity[], node: tree.Node): Diagnostic;
|
297
|
+
createAmbiguousFunctionAccessDiagnostic(functions: readonly AccessedFunction[], node: tree.Node): Diagnostic;
|
298
|
+
createAmbiguousTypeMemberAccessDiagnostic(members: readonly types.TypeMember[], node: tree.Node): Diagnostic;
|
299
|
+
createAmbiguousNamedScopeDeclarationAccessDiagnostic(declarations: readonly semanticContext.NamedDeclaration[], node: tree.Node): Diagnostic;
|
284
300
|
addDiagnosticComputedLazily(diagnostic: Diagnostic): void;
|
285
301
|
getAcceptorForDiagnosticsComputedLazily(): DiagnosticAcceptor;
|
286
302
|
getSourceFileDiagnosticsComputedLazily(sourceFile: project.SourceFile): readonly Diagnostic[];
|
@@ -290,6 +306,13 @@ export declare class Analyzer {
|
|
290
306
|
getTypeMemberImplementationCheckResult(typeEntity: e.TypeEntityWithMembers): TypeMemberImplementationCheckResult;
|
291
307
|
createEntityContextForTypeDeclaration(node: TypeDeclaration): e.EntityContext;
|
292
308
|
isFunctionBlockWithImplicitlyReturnedExpression(node: tree.FunctionBlock): boolean;
|
309
|
+
getLocalizedWellKnownDeclarations(locale: PackageLocale): WellKnownDeclarations;
|
310
|
+
getLocalizedStandardTypes(locale: PackageLocale): types.StandardTypes;
|
311
|
+
determineUnderlyingTypeOfSourceVariantType(memberList: tree.TypeMemberDeclarationList): types.Type;
|
312
|
+
getOwnAndBaseConstructorCallsCheckResult(node: TypeWithMembersDeclaration): OwnAndBaseConstructorCallsCheckResult;
|
313
|
+
isConstructorCallingOwnConstructor(node: tree.ConstructorDeclaration): boolean;
|
314
|
+
createDiagnosticArgumentFactoryWithinPackage(entity: e.PackageEntity): DiagnosticArgumentFactory;
|
315
|
+
createDiagnosticArgumentFactoryWithinEntityContext(context: e.EntityContext): DiagnosticArgumentFactory;
|
293
316
|
private createTsInterop;
|
294
317
|
}
|
295
318
|
export declare class TsInteropInputs {
|
@@ -315,6 +338,11 @@ export declare const enum SyntacticAccessKind {
|
|
315
338
|
GetSet = 2,
|
316
339
|
ReferencedValue = 3
|
317
340
|
}
|
341
|
+
export declare class ExpressionCanBeUsedInForLoopCheckResult {
|
342
|
+
readonly elementType: types.Type;
|
343
|
+
readonly ifTypeDoesNotImplementEnumerableThenEnumeratorMethod: types.Method | undefined;
|
344
|
+
constructor(elementType: types.Type, ifTypeDoesNotImplementEnumerableThenEnumeratorMethod: types.Method | undefined);
|
345
|
+
}
|
318
346
|
declare class Type {
|
319
347
|
private readonly _analyzer;
|
320
348
|
private readonly _unionTypeSpecifierTypes;
|
@@ -324,8 +352,8 @@ declare class Type {
|
|
324
352
|
constructor(_analyzer: Analyzer);
|
325
353
|
ofExpression(node: tree.Expression, targetTypeHint?: TargetTypeHint): types.Type;
|
326
354
|
ofTypeSpecifier(node: tree.TypeSpecifier): types.Type;
|
327
|
-
ofAccessedFunction(accessedFunction:
|
328
|
-
ofAccessedOperator(operator:
|
355
|
+
ofAccessedFunction(accessedFunction: AccessedFunction): types.Type;
|
356
|
+
ofAccessedOperator(operator: types.Operator): types.Type;
|
329
357
|
ofFunctionBlockLiteral(node: tree.FunctionBlockLiteral, targetTypeHint?: TargetTypeHint): types.FunctionType;
|
330
358
|
ofFunctionLiteral(node: tree.FunctionLiteral, targetTypeHint?: TargetTypeHint): types.FunctionType;
|
331
359
|
private ofArrayLiteral;
|
@@ -449,6 +477,7 @@ declare class Entity {
|
|
449
477
|
ofVariantDeclaration(node: tree.VariantDeclaration): e.FieldEntity;
|
450
478
|
ofTypeExtensionDeclaration(node: tree.TypeExtensionDeclaration): e.TypeExtensionEntity;
|
451
479
|
ofPackageImport(node: tree.PackageImport): e.PackageAliasEntity;
|
480
|
+
ofTypeWithMembersDeclaration(node: TypeWithMembersDeclaration): e.TypeEntityWithMembers;
|
452
481
|
private getContainingPackageLoadedFromDts;
|
453
482
|
private createComputedFieldEntities;
|
454
483
|
private createDereferenceOperatorEntities;
|
@@ -483,14 +512,6 @@ declare class ValueLocalVariableEntity {
|
|
483
512
|
ofIndexedElementSetterDeclaration(node: tree.IndexedElementSetterDeclaration): e.LocalVariableEntity;
|
484
513
|
ofDereferencedVariableSetterDeclaration(node: tree.DereferencedVariableSetterDeclaration): e.LocalVariableEntity;
|
485
514
|
}
|
486
|
-
declare class DefaultConstructors {
|
487
|
-
private readonly _analyzer;
|
488
|
-
private readonly _defaultConstructorEntities;
|
489
|
-
constructor(_analyzer: Analyzer);
|
490
|
-
ofStructuredType(type: StructuredTypeDeclaration): readonly e.ConstructorEntity[];
|
491
|
-
private createDefaultConstructors;
|
492
|
-
private getPublicInstanceStoredVariables;
|
493
|
-
}
|
494
515
|
declare class OverriddenMember {
|
495
516
|
private readonly _analyzer;
|
496
517
|
private readonly _namedMemberFinder;
|
@@ -646,16 +667,15 @@ declare class PackageImports {
|
|
646
667
|
private readonly _importedPackageNameTrees;
|
647
668
|
constructor(_analyzer: Analyzer);
|
648
669
|
analyzeExplicitPackageImports(sourceFile: project.SourceFile): AnalyzedPackageImports;
|
649
|
-
getPackagesAvailableForImport(pkg: project.SourcePackage): readonly
|
670
|
+
getPackagesAvailableForImport(pkg: project.SourcePackage): readonly e.PackageEntity[];
|
650
671
|
getUniqueImportedPackages(sourceFile: project.SourceFile): readonly PackageImportInfo[];
|
651
672
|
getImportedPackageNameTree(node: tree.SourceFile): ImportedPackageNameTree;
|
652
673
|
private getAutomaticallyImportedPackages;
|
653
674
|
}
|
654
675
|
export declare class AnalyzedPackageImport {
|
655
676
|
readonly entity: e.PackageEntity | undefined;
|
656
|
-
readonly translationPackage: AnalyzedTranslationPackage | undefined;
|
657
677
|
readonly isAliasedImport: e.PackageAliasEntity | undefined;
|
658
|
-
constructor(entity: e.PackageEntity | undefined,
|
678
|
+
constructor(entity: e.PackageEntity | undefined, isAliasedImport: e.PackageAliasEntity | undefined);
|
659
679
|
}
|
660
680
|
export declare class AnalyzedPackageImports {
|
661
681
|
readonly packageImportInfos: Map<tree.PackageImport, AnalyzedPackageImport>;
|
@@ -664,9 +684,8 @@ export declare class AnalyzedPackageImports {
|
|
664
684
|
}
|
665
685
|
export declare class PackageImportInfo {
|
666
686
|
readonly entity: e.PackageEntity;
|
667
|
-
readonly translationPackage: AnalyzedTranslationPackage | undefined;
|
668
687
|
readonly isAliasedImport: e.PackageAliasEntity | undefined;
|
669
|
-
constructor(entity: e.PackageEntity,
|
688
|
+
constructor(entity: e.PackageEntity, isAliasedImport: e.PackageAliasEntity | undefined);
|
670
689
|
}
|
671
690
|
declare class TypeUtils {
|
672
691
|
private readonly _analyzer;
|
@@ -732,44 +751,16 @@ declare class ConflictsCheck {
|
|
732
751
|
export type EntityWithoutTypeParametersInSignature = e.ConstructorEntity | e.DestructorEntity | e.OperatorEntity | e.IndexerEntity;
|
733
752
|
export type TypeMemberWithoutTypeParametersInSignature = types.Constructor | types.Destructor | types.Operator | types.Indexer;
|
734
753
|
export declare class ExpressionDenotesFunctionCheckResult {
|
735
|
-
readonly candidates: readonly
|
736
|
-
readonly suitableFunctions: readonly
|
737
|
-
get singleSuitableFunction():
|
738
|
-
constructor(candidates: readonly
|
754
|
+
readonly candidates: readonly AccessedFunction[];
|
755
|
+
readonly suitableFunctions: readonly AccessedFunction[];
|
756
|
+
get singleSuitableFunction(): AccessedFunction | undefined;
|
757
|
+
constructor(candidates: readonly AccessedFunction[], suitableFunctions: readonly AccessedFunction[]);
|
739
758
|
}
|
740
759
|
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 {};
|
760
|
+
readonly candidates: readonly types.Operator[];
|
761
|
+
readonly suitableOperators: readonly types.Operator[];
|
762
|
+
get singleSuitableOperator(): types.Operator | undefined;
|
763
|
+
constructor(candidates: readonly types.Operator[], suitableOperators: readonly types.Operator[]);
|
773
764
|
}
|
774
765
|
export declare class DeclaredTypeMemberEntities {
|
775
766
|
readonly variables: readonly e.FieldEntity[];
|
@@ -779,7 +770,7 @@ export declare class DeclaredTypeMemberEntities {
|
|
779
770
|
readonly destructors: readonly e.DestructorEntity[];
|
780
771
|
readonly indexers: readonly e.SourceIndexerEntity[];
|
781
772
|
readonly dereferenceOperators: readonly e.DereferenceOperatorEntity[];
|
782
|
-
get namedMembers(): NamedTypeMemberEntity[];
|
773
|
+
get namedMembers(): e.NamedTypeMemberEntity[];
|
783
774
|
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
775
|
}
|
785
776
|
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
|
}
|