@artel/artc 0.6.25239 → 0.6.25240
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 +4 -2
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +55 -55
- package/build/{chunk-TPCKKHPK.js → chunk-7PUGFDV6.js} +1 -1
- package/build/{chunk-3VRPBHJN.js → chunk-TMFKLPML.js} +1270 -406
- package/build/{chunk-UOGTFZ6X.js → chunk-VCSRWNJI.js} +2 -2
- package/build/types/analysis/Analyzer.d.ts +19 -6
- package/build/types/analysis/DiagnosticCollector.d.ts +2 -1
- package/build/types/analysis/ModifierValidator.d.ts +2 -2
- package/build/types/analysis/TypeMemberImplementationChecker.d.ts +21 -0
- package/build/types/analysis/semantic-context/SemanticContextBasedEntityHidingMatcher.d.ts +9 -8
- package/build/types/common/SearchName.d.ts +1 -0
- package/build/types/diagnostic/DiagnosticCode.d.ts +23 -16
- package/build/types/emitter/Entities.d.ts +2 -0
- package/build/types/emitter/EntityMap.d.ts +2 -0
- package/build/types/entities/AliasTypeEntity.d.ts +2 -1
- package/build/types/entities/BaseEntityHidingMatcher.d.ts +11 -0
- package/build/types/entities/EntityHidingMatcherWithinTypeEntity.d.ts +10 -0
- package/build/types/entities/FunctionTypeEntity.d.ts +5 -3
- package/build/types/entities/PackageEntity.d.ts +3 -1
- package/build/types/entities/StructuredTypeEntity.d.ts +5 -3
- package/build/types/entities/TypeEntity.d.ts +2 -1
- package/build/types/entities/TypeExtensionEntity.d.ts +3 -1
- package/build/types/entities/TypeParameterEntity.d.ts +5 -2
- package/build/types/entities/VariantTypeEntity.d.ts +3 -1
- package/build/types/entities/index.d.ts +15 -3
- package/build/types/ts-interop/Entities.d.ts +15 -3
- package/build/types/ts-interop/TsInteropContext.d.ts +4 -2
- package/build/types/types/TypeMembers.d.ts +8 -1
- package/package.json +2 -2
- package/build/types/analysis/TypeMemberImplementationValidator.d.ts +0 -13
@@ -1,6 +1,6 @@
|
|
1
1
|
import {
|
2
2
|
Compiler
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-7PUGFDV6.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-TMFKLPML.js";
|
18
18
|
|
19
19
|
// source/executor/FileSystemUri.ts
|
20
20
|
import { platform } from "os";
|
@@ -33,12 +33,13 @@ import { LocalizationContext } from './LocalizationContext.js';
|
|
33
33
|
import * as memberAccessExpressionResolution from './MemberAccessExpressionMeaning.js';
|
34
34
|
import { ModifierFlags } from './ModifierFlags.js';
|
35
35
|
import { NamedTypeSpecifierResolutionResult } from './NamedTypeSpecifierResolver.js';
|
36
|
-
import { DereferencedVariableAccessorDeclaration, FieldAccessorDeclaration, FunctionTypeDeclaration, GetterDeclaration, IndexedElementAccessorDeclaration, PackageVariableAccessorDeclaration, SetterDeclaration, StructuredTypeDeclaration, VariantTypeDeclaration } from './NodeTypeUtils.js';
|
36
|
+
import { DereferencedVariableAccessorDeclaration, FieldAccessorDeclaration, FunctionTypeDeclaration, GetterDeclaration, IndexedElementAccessorDeclaration, PackageVariableAccessorDeclaration, SetterDeclaration, StructuredTypeDeclaration, TypeDeclaration, VariantTypeDeclaration } from './NodeTypeUtils.js';
|
37
37
|
import * as objectExpressionMeaning from './ObjectExpressionMeaning.js';
|
38
38
|
import { SourceFileMembers as ActualSourceFileMembers } from './SourceFileMembers.js';
|
39
39
|
import * as tagMeaning from './TagMeaning.js';
|
40
40
|
import * as tags from './Tags.js';
|
41
41
|
import { TargetTypeHint } from './TargetTypeHint.js';
|
42
|
+
import { TypeMemberImplementationCheckResult } from './TypeMemberImplementationChecker.js';
|
42
43
|
import * as typeOverloadResolver from './TypeOverloadResolver.js';
|
43
44
|
import * as controlFlow from './control-flow/index.js';
|
44
45
|
import { WellKnownDeclarations } from './index.js';
|
@@ -98,7 +99,8 @@ export declare class Analyzer {
|
|
98
99
|
private readonly _diagnosticsComputedLazily;
|
99
100
|
private readonly _diagnosticsComputedLazilyAcceptor;
|
100
101
|
private readonly _sourcePackageMemberConflictsDiagnostics;
|
101
|
-
private readonly
|
102
|
+
private readonly _notExplicitlyImplementedAbstractTypeMembers;
|
103
|
+
private readonly _typeMemberImplementationCheckResults;
|
102
104
|
get tsInterop(): TsInteropContext;
|
103
105
|
constructor(compilation: project.Compilation, tsInteropInputs: TsInteropInputs);
|
104
106
|
getProjectSourceFile(node: tree.SourceFile): project.SourceFile;
|
@@ -248,7 +250,14 @@ export declare class Analyzer {
|
|
248
250
|
getLinkedMultiPlatformPackage(entity: e.PackageEntity, platform: PlatformKind): LinkedMultiPlatformPackage | undefined;
|
249
251
|
createPackageMembers(pkg: SourcePackage): OriginalPackageMembers;
|
250
252
|
instantiateType(entity: e.TypeEntity, typeArguments?: readonly types.Type[]): types.Type;
|
253
|
+
instantiateType(entity: e.TypeEntity, substitutions?: types.Substitutions): types.Type;
|
251
254
|
instantiateTypeByIdentitySubstitution(entity: e.TypeEntity): types.Type;
|
255
|
+
instantiateTypeMemberByIdentitySubstitution(entity: e.FieldEntity): types.Field;
|
256
|
+
instantiateTypeMemberByIdentitySubstitution(entity: e.MethodEntity): types.Method;
|
257
|
+
instantiateTypeMemberByIdentitySubstitution(entity: e.OperatorEntity): types.Operator;
|
258
|
+
instantiateTypeMemberByIdentitySubstitution(entity: e.IndexerEntity): types.Indexer;
|
259
|
+
instantiateTypeMemberByIdentitySubstitution(entity: e.DereferenceOperatorEntity): types.DereferenceOperator;
|
260
|
+
instantiateTypeMemberByIdentitySubstitution(entity: e.TypeMemberEntity): types.TypeMember;
|
252
261
|
createPackageMemberHiding(node: tree.PackageMemberDeclaration, modifierFlags: ModifierFlags): e.EntityHidingLevel | undefined;
|
253
262
|
createTypeMemberHiding(node: tree.TypeMemberDeclaration, modifierFlags: ModifierFlags): e.EntityHidingLevel | undefined;
|
254
263
|
getDeclarationsUsageCount(sourceFile: tree.SourceFile, cancellationToken: CancellationToken | undefined): Promise<DeclarationsUsageCountResult>;
|
@@ -279,7 +288,10 @@ export declare class Analyzer {
|
|
279
288
|
getSourceFileDiagnosticsComputedLazily(sourceFile: project.SourceFile): readonly Diagnostic[];
|
280
289
|
getDiagnosticsWithoutLocationComputedLazily(): readonly Diagnostic[];
|
281
290
|
validateSourcePackageMemberConflicts(pkg: project.ProgramPackage): readonly Diagnostic[];
|
282
|
-
|
291
|
+
getNotExplicitlyImplementedAbstractMembers(typeEntity: e.TypeEntityWithMembers): readonly types.TypeMember[];
|
292
|
+
getTypeMemberImplementationCheckResult(typeEntity: e.TypeEntityWithMembers): TypeMemberImplementationCheckResult;
|
293
|
+
createEntityContextForTypeDeclaration(node: TypeDeclaration): e.EntityContext;
|
294
|
+
isFunctionBlockWithImplicitlyReturnedExpression(node: tree.FunctionBlock): boolean;
|
283
295
|
private createTsInterop;
|
284
296
|
}
|
285
297
|
export declare class TsInteropInputs {
|
@@ -504,8 +516,8 @@ declare class OverriddenMember {
|
|
504
516
|
getOverriddenAndShadowedIndexers(node: IndexedElementAccessorDeclaration): OverriddenAndShadowedMembers<types.Indexer>;
|
505
517
|
getOverriddenAndShadowedDereferenceOperators(node: DereferencedVariableAccessorDeclaration): OverriddenAndShadowedMembers<types.DereferenceOperator>;
|
506
518
|
entityCanBeOverridden(entity: OverridableTypeMemberEntity): boolean;
|
507
|
-
|
508
|
-
|
519
|
+
getMemberTypeOrReturnType(member: types.TypeMember): types.Type;
|
520
|
+
findMatchingMembersInType(member: types.TypeMember, type: types.Type): readonly types.TypeMember[];
|
509
521
|
private findOverriddenMembers;
|
510
522
|
private findOverriddenOrShadowedNamedMembersInType;
|
511
523
|
private findOverriddenOrShadowedOperatorsInType;
|
@@ -520,7 +532,7 @@ declare class OverriddenMember {
|
|
520
532
|
}
|
521
533
|
export declare enum ShadowReason {
|
522
534
|
BaseMemberHasDifferentKind = 0,
|
523
|
-
|
535
|
+
BaseMemberCannotBeOverridden = 1,
|
524
536
|
NoOverrideModifier = 2,
|
525
537
|
NoOverrideModifierAndTypeOrReturnTypeMismatch = 3,
|
526
538
|
TypeOrReturnTypeMismatch = 4
|
@@ -665,6 +677,7 @@ declare class TypeUtils {
|
|
665
677
|
removeBaseTypesInPlace(types: types.Type[]): void;
|
666
678
|
removeDerivedTypesInPlace(types: types.Type[]): void;
|
667
679
|
getBaseOrAliasedTypes(type: types.Type): readonly types.Type[];
|
680
|
+
getPossiblyAliasedBaseObjectType(type: types.Type): types.Type | undefined;
|
668
681
|
getBaseAndAliasedTypesRecursively(type: types.Type): readonly types.Type[];
|
669
682
|
private collectBaseAndAliasedTypesRecursively;
|
670
683
|
private getBaseTypesForCommonTypesSearch;
|
@@ -79,9 +79,10 @@ export declare class DiagnosticCollector {
|
|
79
79
|
private checkIfNestedFunctionIsUnused;
|
80
80
|
private checkIfTypeParameterIsUnused;
|
81
81
|
private checkAllCodePathsReturnOrResultVariableIsAssigned;
|
82
|
-
private
|
82
|
+
private checkTypeMemberCorrectlyOverridesBaseMember;
|
83
83
|
private isReceiverBaseAutoVariableAccess;
|
84
84
|
private overridingMemberHasCorrectHiding;
|
85
|
+
private attachNodeLocationAndAddDiagnostics;
|
85
86
|
private addDiagnostic;
|
86
87
|
private addDiagnostics;
|
87
88
|
private addMaybeLazyDiagnostic;
|
@@ -71,8 +71,8 @@ export declare class ModifierValidator {
|
|
71
71
|
private typeMemberAllowsStaticModifier;
|
72
72
|
private reportDuplicateModifier;
|
73
73
|
private reportDuplicateHiddenModifier;
|
74
|
-
private
|
75
|
-
private
|
74
|
+
private reportDeclarationCannotBePlacedInGroupWithModifier;
|
75
|
+
private reportModifierCannotBeUsedWithAnotherModifier;
|
76
76
|
private reportModifierIsNotAllowedHere;
|
77
77
|
private findModifier;
|
78
78
|
private displayModifierNode;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { DiagnosticData } from '../diagnostic/DiagnosticData.js';
|
2
|
+
import { TypeEntityWithMembers } from '../entities/index.js';
|
3
|
+
import * as types from '../types/index.js';
|
4
|
+
import { Analyzer } from './Analyzer.js';
|
5
|
+
export declare class TypeMemberImplementationChecker {
|
6
|
+
private readonly _analyzer;
|
7
|
+
private readonly _typeEntity;
|
8
|
+
constructor(_analyzer: Analyzer, _typeEntity: TypeEntityWithMembers);
|
9
|
+
check(): TypeMemberImplementationCheckResult;
|
10
|
+
}
|
11
|
+
export declare class TypeMemberImplementationCheckResult {
|
12
|
+
readonly notImplementedAbstractMembers: readonly types.TypeMember[];
|
13
|
+
readonly implicitImplementations: readonly ImplicitAbstractMemberImplementationInfo[];
|
14
|
+
readonly diagnosticsData: readonly DiagnosticData[];
|
15
|
+
constructor(notImplementedAbstractMembers: readonly types.TypeMember[], implicitImplementations: readonly ImplicitAbstractMemberImplementationInfo[], diagnosticsData: readonly DiagnosticData[]);
|
16
|
+
}
|
17
|
+
export declare class ImplicitAbstractMemberImplementationInfo {
|
18
|
+
readonly abstractMember: types.TypeMember;
|
19
|
+
readonly implementingMember: types.TypeMember;
|
20
|
+
constructor(abstractMember: types.TypeMember, implementingMember: types.TypeMember);
|
21
|
+
}
|
@@ -1,14 +1,15 @@
|
|
1
|
-
import {
|
1
|
+
import { BaseEntityHidingMatcher } from '../../entities/BaseEntityHidingMatcher.js';
|
2
|
+
import { PackageEntity } from '../../entities/PackageEntity.js';
|
3
|
+
import { TypeEntity } from '../../entities/TypeEntity.js';
|
4
|
+
import { SourceFile } from '../../project/SourceFile.js';
|
2
5
|
import { SemanticContext } from './SemanticContext.js';
|
3
|
-
export declare class SemanticContextBasedEntityHidingMatcher
|
6
|
+
export declare class SemanticContextBasedEntityHidingMatcher extends BaseEntityHidingMatcher {
|
4
7
|
private readonly _semanticContext;
|
5
8
|
private readonly _sourceFile;
|
6
|
-
private readonly
|
9
|
+
private readonly _typeEntity;
|
7
10
|
private readonly _package;
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
+
protected get sourceFile(): SourceFile;
|
12
|
+
protected get package(): PackageEntity;
|
13
|
+
protected get typeEntity(): TypeEntity | undefined;
|
11
14
|
constructor(semanticContext: SemanticContext);
|
12
|
-
matches(hiding: EntityHidingLevel): boolean;
|
13
|
-
private collectBaseTypesRecursively;
|
14
15
|
}
|
@@ -149,9 +149,9 @@ export declare enum DiagnosticCode {
|
|
149
149
|
VariableMayNotHasBeenAssignedBeforeUsage = 310,
|
150
150
|
NotAllCodePathsReturnAValueAndResultLocalVariableMayNotHasBeenAssigned = 311,
|
151
151
|
WriteFunctionHasNoCorrespondingReadFunction = 312,
|
152
|
-
|
153
|
-
|
154
|
-
|
152
|
+
TypeCannotHaveMultipleBaseObjectTypes = 313,
|
153
|
+
TypeThatIsNotMarkedAsBasicCannotBeUsedAsBaseType = 314,
|
154
|
+
PlainObjectTypeCannotBeUsedAsBaseType = 315,
|
155
155
|
ThisTypeIsAlreadyListedInBaseTypeList = 316,
|
156
156
|
OnlyObjectAndAspectTypesCanBeUsedAsBaseTypes = 317,
|
157
157
|
PlainObjectTypeCanHaveOnlyAspectsAsBaseTypes = 318,
|
@@ -159,34 +159,41 @@ export declare enum DiagnosticCode {
|
|
159
159
|
ModifierListAlreadyContains0Modifier = 320,
|
160
160
|
ModifierListOfOuterDeclarationGroupAlreadyContains0Modifier = 321,
|
161
161
|
_0ModifierIsNotAllowedHere = 322,
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
162
|
+
DeclarationCannotBePlacedInGroupHaving0Modifier = 323,
|
163
|
+
PackageConstructorDeclarationCannotHaveModifiers = 324,
|
164
|
+
PackageEntryPointDeclarationCannotHaveModifiers = 325,
|
165
|
+
TranslationsCannotHaveModifiers = 326,
|
166
166
|
AbstractModifierCanOnlyBeUsedInAbstractObjectTypes = 327,
|
167
167
|
BasicModifierCanOnlyBeUsedInObjectTypesAspectTypesAndTypeAliases = 328,
|
168
168
|
OverrideModifierCanOnlyBeUsedInObjectAndAspectTypes = 329,
|
169
|
-
|
170
|
-
|
169
|
+
_0ModifierCannotBeUsedWith1Modifier = 330,
|
170
|
+
VariantDeclarationCannotHaveHiddenModifier = 331,
|
171
171
|
BasicModifierCanOnlyBeAppliedToObjectTypes = 332,
|
172
172
|
AbstractModifierCanOnlyBeAppliedToObjectTypes = 333,
|
173
|
-
|
174
|
-
|
173
|
+
NotBasicObjectTypesCannotHaveBasicMembers = 334,
|
174
|
+
BasicModifierCannotBeAppliedToAspectTypeFields = 335,
|
175
175
|
WriteFunctionMustHaveTheSameModifiersAsReadFunction = 336,
|
176
176
|
WriteFunctionMustHaveTheSameOrMoreRestrictiveHidingLevelThenReadFunction = 337,
|
177
177
|
DeclarationConflictsWithBaseTypeMember0 = 338,
|
178
178
|
DeclarationConflictsWithBaseTypeMember0AddOverrideModifier = 339,
|
179
|
-
|
179
|
+
DeclarationConflictsWithBaseTypeMember0ThisMemberCannotBeOverridden = 340,
|
180
180
|
DeclarationConflictsWithBaseTypeMember0ToOverrideTypeMustBeAssignableTo1 = 341,
|
181
181
|
DeclarationConflictsWithBaseTypeMember0ToOverrideReturnTypeMustBeAssignableTo1 = 342,
|
182
182
|
OverridingMemberMustHaveTheSameHidingLevelAsBaseMember0 = 343,
|
183
183
|
OverridingMethodMustBeAsyncBecauseBaseMethod0IsAsync = 344,
|
184
184
|
OverridingMethodMustNotBeAsyncBecauseBaseMethod0IsNotAsync = 345,
|
185
185
|
OverridingFieldMustNotBeConstOrHaveWriteFunctionToMatchBaseField0 = 346,
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
186
|
+
OverridingMemberMustHaveWriteFunctionToMatchBaseMember0 = 347,
|
187
|
+
TypeDoesNotImplementMember0 = 348,
|
188
|
+
TypeDoesNotImplementMember0ImplicitImplementationTypeMismatch1 = 349,
|
189
|
+
TypeDoesNotImplementMember0ImplicitImplementation1IsAsync = 350,
|
190
|
+
TypeDoesNotImplementMember0ImplicitImplementation1IsNotAsync = 351,
|
191
|
+
TypeDoesNotImplementMember0ImplicitImplementation1IsNotWriteable = 352,
|
192
|
+
TypeDoesNotImplementMember0ImplicitImplementation1WriteFunctionIsHidden = 353,
|
193
|
+
CannotAccessAbstractMemberOfBaseType = 354,
|
194
|
+
TheFollowingBaseTypeMembersConflictAndMustBeOverridden0 = 355,
|
195
|
+
TheFollowingBaseTypeMembersConflictBecauseTheyHaveTheSameOriginalName0AndMustBeOverridden1 = 356,
|
196
|
+
OnlyIdentifierOrIntegerLiteralIsAllowedAsParameterOfTextTemplateLiteralInTranslations = 357,
|
190
197
|
CannotFindTsLibDirectoryBaseSearchPaths0 = 401,
|
191
198
|
SourceFile0IsNotPartOfThePackageAndWontBeLoaded = 402,
|
192
199
|
ProgramWithoutMainPackageCannotBeCompiled = 403,
|
@@ -69,6 +69,7 @@ export declare class VariableEntityDetails implements TypeMemberEntityDetails {
|
|
69
69
|
isAbstract: boolean;
|
70
70
|
isTypeExtensionMemberAddedToPrototype: boolean;
|
71
71
|
isStatic: boolean;
|
72
|
+
isConst: boolean;
|
72
73
|
}
|
73
74
|
export interface ProxiedFieldInfo {
|
74
75
|
readonly tagType: TypeOrExtensionEntity;
|
@@ -110,6 +111,7 @@ export declare class TypeOrExtensionEntityDetails {
|
|
110
111
|
* актуальную для них самих информацию, и анализ переопределённых членов типа не требуется.
|
111
112
|
*/
|
112
113
|
areOwnComputedNamesOfMembersResolved: boolean;
|
114
|
+
implicitlyImplementedAbstractMembersByImplementingMember: ReadonlyMap<TypeMemberEntity, readonly TypeMemberEntity[]>;
|
113
115
|
}
|
114
116
|
export declare enum TypeOrExtensionEntityKind {
|
115
117
|
StructuredType = 0,
|
@@ -4,7 +4,7 @@ import { Name } from '../common/index.js';
|
|
4
4
|
import { PackageAliasTypeDeclaration } from '../tree/index.js';
|
5
5
|
import * as types from '../types/index.js';
|
6
6
|
import { OriginalTypeEntityMembers } from './TypeEntityMembers.js';
|
7
|
-
import { DefinitionKind, EntityHidingLevel, EntityKind, ITypeEntity, PackageEntity, SubstitutionApplicationMode, TypeEntityKind, TypeParameterEntity } from './index.js';
|
7
|
+
import { DefinitionKind, EntityContext, EntityHidingLevel, EntityKind, ITypeEntity, PackageEntity, SubstitutionApplicationMode, TypeEntityKind, TypeParameterEntity } from './index.js';
|
8
8
|
export interface AliasTypeEntity extends ITypeEntity {
|
9
9
|
readonly kind: EntityKind.Type;
|
10
10
|
readonly typeEntityKind: TypeEntityKind.Alias;
|
@@ -85,4 +85,5 @@ export declare class PackageAliasTypeDeclarationEntity implements AliasTypeEntit
|
|
85
85
|
isHidden(): EntityHidingLevel | undefined;
|
86
86
|
getTags(): readonly Tag[];
|
87
87
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
88
|
+
getContext(): EntityContext;
|
88
89
|
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { SourceFile } from '../project/SourceFile.js';
|
2
|
+
import { EntityHidingLevel, IEntityHidingMatcher } from './EntityHiding.js';
|
3
|
+
import { PackageEntity } from './PackageEntity.js';
|
4
|
+
import { TypeEntity } from './TypeEntity.js';
|
5
|
+
export declare abstract class BaseEntityHidingMatcher implements IEntityHidingMatcher {
|
6
|
+
protected abstract typeEntity: TypeEntity | undefined;
|
7
|
+
protected abstract sourceFile: SourceFile | undefined;
|
8
|
+
protected abstract package: PackageEntity;
|
9
|
+
matches(hiding: EntityHidingLevel): boolean;
|
10
|
+
private collectBaseTypesRecursively;
|
11
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { SourceFile } from '../project/SourceFile.js';
|
2
|
+
import { BaseEntityHidingMatcher } from './BaseEntityHidingMatcher.js';
|
3
|
+
import { PackageEntity, TypeEntity } from './index.js';
|
4
|
+
export declare class EntityHidingMatcherWithinTypeEntity extends BaseEntityHidingMatcher {
|
5
|
+
private readonly _typeEntity;
|
6
|
+
protected sourceFile: SourceFile | undefined;
|
7
|
+
protected get typeEntity(): TypeEntity | undefined;
|
8
|
+
protected get package(): PackageEntity;
|
9
|
+
constructor(_typeEntity: TypeEntity);
|
10
|
+
}
|
@@ -6,7 +6,7 @@ import * as types from '../types/index.js';
|
|
6
6
|
import { EntityNaming } from './EntityNaming.js';
|
7
7
|
import { OriginalTypeEntityMembers } from './TypeEntityMembers.js';
|
8
8
|
import type { PackageEntity } from './index.js';
|
9
|
-
import { BaseObjectType, DefinitionKind, EntityHidingLevel, EntityKind, ITypeEntity, ParameterVariableEntity, SubstitutionApplicationMode, TypeEntityKind, TypeParameterEntity } from './index.js';
|
9
|
+
import { BaseObjectType, DefinitionKind, EntityContext, EntityHidingLevel, EntityKind, ITypeEntity, ParameterVariableEntity, SubstitutionApplicationMode, TypeEntityKind, TypeParameterEntity } from './index.js';
|
10
10
|
export type FunctionTypeEntity = PackageFunctionTypeEntity | AnonymousFunctionTypeEntity;
|
11
11
|
export interface PackageFunctionTypeEntity extends IFunctionTypeEntity {
|
12
12
|
readonly subkind: 'package';
|
@@ -71,6 +71,7 @@ export declare class PackageFunctionTypeDeclarationEntity implements PackageFunc
|
|
71
71
|
getTags(): readonly Tag[];
|
72
72
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
73
73
|
getBaseObjectType(): BaseObjectType;
|
74
|
+
getContext(): EntityContext;
|
74
75
|
}
|
75
76
|
export declare class AnonymousFunctionTypeDeclarationEntity implements AnonymousFunctionTypeEntity {
|
76
77
|
private readonly _analyzer;
|
@@ -95,17 +96,18 @@ export declare class AnonymousFunctionTypeDeclarationEntity implements Anonymous
|
|
95
96
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
96
97
|
getContainingPackage(): PackageEntity;
|
97
98
|
getBaseObjectType(): BaseObjectType;
|
99
|
+
getContext(): EntityContext;
|
98
100
|
}
|
99
101
|
export declare class UnfinishedIntrinsicAnonymousFunctionTypeEntity {
|
100
102
|
private readonly _unfinishedValue;
|
101
103
|
get unfinishedValue(): AnonymousFunctionTypeEntity;
|
102
|
-
constructor(analyzer: Analyzer, returnType: types.Type, isAsync: boolean, substitutionApplicationMode: SubstitutionApplicationMode, containingPackage: PackageEntity, isHidden: EntityHidingLevel | undefined);
|
104
|
+
constructor(analyzer: Analyzer, returnType: types.Type, isAsync: boolean, substitutionApplicationMode: SubstitutionApplicationMode, containingPackage: PackageEntity, isHidden: EntityHidingLevel | undefined, context: EntityContext | undefined);
|
103
105
|
finish(typeParameters: readonly TypeParameterEntity[], valueParameters: readonly ParameterVariableEntity[]): AnonymousFunctionTypeEntity;
|
104
106
|
}
|
105
107
|
export declare class UnfinishedIntrinsicPackageFunctionTypeEntity {
|
106
108
|
private readonly _unfinishedValue;
|
107
109
|
get unfinishedValue(): PackageFunctionTypeEntity;
|
108
|
-
constructor(analyzer: Analyzer, name: Name, returnType: types.Type, isAsync: boolean, substitutionApplicationMode: SubstitutionApplicationMode, containingPackage: PackageEntity, isHidden: EntityHidingLevel | undefined);
|
110
|
+
constructor(analyzer: Analyzer, name: Name, returnType: types.Type, isAsync: boolean, substitutionApplicationMode: SubstitutionApplicationMode, containingPackage: PackageEntity, isHidden: EntityHidingLevel | undefined, context: EntityContext | undefined);
|
109
111
|
finish(typeParameters: readonly TypeParameterEntity[], valueParameters: readonly ParameterVariableEntity[]): PackageFunctionTypeEntity;
|
110
112
|
}
|
111
113
|
export {};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Analyzer } from '../analysis/index.js';
|
2
|
-
import { PackageLocale } from '../common/index.js';
|
2
|
+
import { PackageDialect, PackageLocale } from '../common/index.js';
|
3
3
|
import type { JavaScriptImplementationConfig, SourcePackage } from '../project/index.js';
|
4
4
|
import { PackageName, PlatformKind } from '../project/index.js';
|
5
5
|
import { DefinitionKind, EntityKind } from './index.js';
|
@@ -8,6 +8,7 @@ export interface PackageEntity {
|
|
8
8
|
readonly kind: EntityKind.Package;
|
9
9
|
getName(): PackageName;
|
10
10
|
getLocale(): PackageLocale;
|
11
|
+
getDialect(): PackageDialect;
|
11
12
|
getMembers(): OriginalPackageMembers;
|
12
13
|
isInterface(): InterfacePackageEntityInfo | undefined;
|
13
14
|
getImplementedInterfacePackage(): PackageEntity | undefined;
|
@@ -48,6 +49,7 @@ export declare class SourcePackageEntity implements PackageEntity {
|
|
48
49
|
constructor(_analyzer: Analyzer, _package: SourcePackage);
|
49
50
|
getName(): PackageName;
|
50
51
|
getLocale(): PackageLocale;
|
52
|
+
getDialect(): PackageDialect;
|
51
53
|
getMembers(): OriginalPackageMembers;
|
52
54
|
isInterface(): InterfacePackageEntityInfo | undefined;
|
53
55
|
getImplementedInterfacePackage(): PackageEntity | undefined;
|
@@ -6,7 +6,7 @@ import * as types from '../types/index.js';
|
|
6
6
|
import { EntityNaming } from './EntityNaming.js';
|
7
7
|
import { NamedTypeMemberEntity, OriginalTypeEntityMembers } from './TypeEntityMembers.js';
|
8
8
|
import type { PackageEntity } from './index.js';
|
9
|
-
import { ConstructorEntity, DefinitionKind, DereferenceOperatorEntity, DestructorEntity, EntityHidingLevel, EntityKind, IndexerEntity, ITypeEntity, OperatorEntity, SubstitutionApplicationMode, TypeEntityKind, TypeParameterEntity } from './index.js';
|
9
|
+
import { ConstructorEntity, DefinitionKind, DereferenceOperatorEntity, DestructorEntity, EntityContext, EntityHidingLevel, EntityKind, IndexerEntity, ITypeEntity, OperatorEntity, SubstitutionApplicationMode, TypeEntityKind, TypeParameterEntity } from './index.js';
|
10
10
|
export type StructuredTypeEntity = PackageStructuredTypeEntity | AnonymousStructuredTypeEntity;
|
11
11
|
export interface PackageStructuredTypeEntity extends IStructuredTypeEntity {
|
12
12
|
readonly subkind: 'package';
|
@@ -140,6 +140,7 @@ export declare class PackageStructuredTypeDeclarationEntity implements PackageSt
|
|
140
140
|
isHidden(): EntityHidingLevel | undefined;
|
141
141
|
getTags(): readonly Tag[];
|
142
142
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
143
|
+
getContext(): EntityContext;
|
143
144
|
}
|
144
145
|
export declare class SourcePackageStructuredTypeDeclarationData {
|
145
146
|
private readonly _analyzer;
|
@@ -195,18 +196,19 @@ export declare class AnonymousStructuredTypeDeclarationEntity implements Anonymo
|
|
195
196
|
getTags(): readonly Tag[];
|
196
197
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
197
198
|
getContainingPackage(): PackageEntity;
|
199
|
+
getContext(): EntityContext;
|
198
200
|
private getBaseTypes;
|
199
201
|
}
|
200
202
|
export declare class UnfinishedIntrinsicPackageStructuredTypeEntity {
|
201
203
|
private readonly _unfinishedValue;
|
202
204
|
get unfinishedValue(): PackageStructuredTypeEntity;
|
203
|
-
constructor(analyzer: Analyzer, name: Name, containingPackage: PackageEntity, typeParameters: readonly TypeParameterEntity[], isBasic: boolean, isAbstract: boolean, isAspect: boolean, isRefObject: boolean, baseObjectType: types.StructuredType | undefined, baseAspectTypes: readonly types.StructuredType[], isHidden: EntityHidingLevel | undefined, substitutionApplicationMode: SubstitutionApplicationMode);
|
205
|
+
constructor(analyzer: Analyzer, name: Name, containingPackage: PackageEntity, typeParameters: readonly TypeParameterEntity[], isBasic: boolean, isAbstract: boolean, isAspect: boolean, isRefObject: boolean, baseObjectType: types.StructuredType | undefined, baseAspectTypes: readonly types.StructuredType[], isHidden: EntityHidingLevel | undefined, substitutionApplicationMode: SubstitutionApplicationMode, context: EntityContext | undefined);
|
204
206
|
finish(ownNamedMembers: readonly NamedTypeMemberEntity[], ownOperators: readonly OperatorEntity[], ownConstructors: readonly ConstructorEntity[], ownDestructors: readonly DestructorEntity[], ownIndexers: readonly IndexerEntity[], ownDereferenceOperators: readonly DereferenceOperatorEntity[]): PackageStructuredTypeEntity;
|
205
207
|
}
|
206
208
|
export declare class UnfinishedIntrinsicAnonymousStructuredTypeEntity {
|
207
209
|
private readonly _unfinishedValue;
|
208
210
|
get unfinishedValue(): AnonymousStructuredTypeEntity;
|
209
|
-
constructor(analyzer: Analyzer, typeParameters: readonly TypeParameterEntity[], isAspect: boolean, isRefObject: boolean, baseObjectType: types.StructuredType | undefined, baseAspectTypes: readonly types.StructuredType[], isHidden: EntityHidingLevel | undefined, substitutionApplicationMode: SubstitutionApplicationMode, containingPackage: PackageEntity);
|
211
|
+
constructor(analyzer: Analyzer, typeParameters: readonly TypeParameterEntity[], isAspect: boolean, isRefObject: boolean, baseObjectType: types.StructuredType | undefined, baseAspectTypes: readonly types.StructuredType[], isHidden: EntityHidingLevel | undefined, substitutionApplicationMode: SubstitutionApplicationMode, containingPackage: PackageEntity, context: EntityContext | undefined);
|
210
212
|
finish(ownNamedMembers: readonly NamedTypeMemberEntity[], ownOperators: readonly OperatorEntity[], ownConstructors: readonly ConstructorEntity[], ownDestructors: readonly DestructorEntity[], ownIndexers: readonly IndexerEntity[], ownDereferenceOperators: readonly DereferenceOperatorEntity[]): AnonymousStructuredTypeEntity;
|
211
213
|
}
|
212
214
|
export {};
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Tag } from '../analysis/Tags.js';
|
2
|
-
import { AliasTypeEntity, EntityKind, FunctionTypeEntity, StructuredTypeEntity, TypeParameterEntity, VariantTypeEntity } from './index.js';
|
2
|
+
import { AliasTypeEntity, EntityContext, EntityKind, FunctionTypeEntity, StructuredTypeEntity, TypeParameterEntity, VariantTypeEntity } from './index.js';
|
3
3
|
export type TypeEntity = StructuredTypeEntity | FunctionTypeEntity | VariantTypeEntity | AliasTypeEntity | TypeParameterEntity;
|
4
4
|
export declare namespace TypeEntity {
|
5
5
|
function isAbstract(entity: TypeEntity): boolean;
|
@@ -7,6 +7,7 @@ export declare namespace TypeEntity {
|
|
7
7
|
export interface ITypeEntity {
|
8
8
|
readonly kind: EntityKind.Type;
|
9
9
|
readonly typeEntityKind: TypeEntityKind;
|
10
|
+
getContext(): EntityContext;
|
10
11
|
getTags(): readonly Tag[];
|
11
12
|
}
|
12
13
|
export declare enum TypeEntityKind {
|
@@ -2,7 +2,7 @@ import { Tag } from '../analysis/Tags.js';
|
|
2
2
|
import { Analyzer } from '../analysis/index.js';
|
3
3
|
import { TypeExtensionDeclaration } from '../tree/index.js';
|
4
4
|
import { OriginalTypeEntityMembers } from './TypeEntityMembers.js';
|
5
|
-
import { DefinitionKind, EntityHidingLevel, EntityKind, NamedTypeEntity, PackageEntity } from './index.js';
|
5
|
+
import { DefinitionKind, EntityContext, EntityHidingLevel, EntityKind, NamedTypeEntity, PackageEntity } from './index.js';
|
6
6
|
export interface TypeExtensionEntity {
|
7
7
|
readonly kind: EntityKind.TypeExtension;
|
8
8
|
getMembers(): OriginalTypeEntityMembers;
|
@@ -11,6 +11,7 @@ export interface TypeExtensionEntity {
|
|
11
11
|
getDefinition(): TypeExtensionEntityDefinition;
|
12
12
|
isHidden(): EntityHidingLevel | undefined;
|
13
13
|
getTags(): readonly Tag[];
|
14
|
+
getContext(): EntityContext;
|
14
15
|
}
|
15
16
|
type TypeExtensionEntityDefinition = {
|
16
17
|
kind: DefinitionKind.Source;
|
@@ -30,5 +31,6 @@ export declare class SourceTypeExtensionEntity implements TypeExtensionEntity {
|
|
30
31
|
getDefinition(): TypeExtensionEntityDefinition;
|
31
32
|
isHidden(): EntityHidingLevel | undefined;
|
32
33
|
getTags(): readonly Tag[];
|
34
|
+
getContext(): EntityContext;
|
33
35
|
}
|
34
36
|
export {};
|
@@ -3,7 +3,7 @@ import { Tag } from '../analysis/Tags.js';
|
|
3
3
|
import { Name } from '../common/index.js';
|
4
4
|
import { TypeParameterDeclaration } from '../tree/index.js';
|
5
5
|
import * as types from '../types/index.js';
|
6
|
-
import { AliasTypeEntity, DefinitionKind, EntityHidingLevel, EntityKind,
|
6
|
+
import { AliasTypeEntity, DefinitionKind, EntityContext, EntityHidingLevel, EntityKind, FunctionEntity, FunctionTypeEntity, ITypeEntity, StructuredTypeEntity, TypeEntityKind, VariantTypeEntity } from './index.js';
|
7
7
|
export interface TypeParameterEntity extends ITypeEntity {
|
8
8
|
readonly kind: EntityKind.Type;
|
9
9
|
readonly typeEntityKind: TypeEntityKind.Parameter;
|
@@ -77,6 +77,7 @@ export declare class SourceTypeParameterEntity implements TypeParameterEntity {
|
|
77
77
|
getContainingEntity(): EntityContainingTypeParameter;
|
78
78
|
isHidden(): EntityHidingLevel | undefined;
|
79
79
|
getTags(): readonly Tag[];
|
80
|
+
getContext(): EntityContext;
|
80
81
|
}
|
81
82
|
export declare class IntrinsicTypeParameterEntity implements TypeParameterEntity {
|
82
83
|
private readonly _name;
|
@@ -86,7 +87,8 @@ export declare class IntrinsicTypeParameterEntity implements TypeParameterEntity
|
|
86
87
|
readonly kind = EntityKind.Type;
|
87
88
|
readonly typeEntityKind = TypeEntityKind.Parameter;
|
88
89
|
private readonly _typeParameterConstraint;
|
89
|
-
|
90
|
+
private readonly _context;
|
91
|
+
constructor(_name: Name, _constraint: types.Type | undefined, _defaultValue: types.Type | undefined, _containingEntity: EntityContainingTypeParameter, context: EntityContext | undefined);
|
90
92
|
getName(): Name;
|
91
93
|
getConstraint(): TypeParameterConstraint;
|
92
94
|
getDefaultType(): types.Type | undefined;
|
@@ -96,4 +98,5 @@ export declare class IntrinsicTypeParameterEntity implements TypeParameterEntity
|
|
96
98
|
getContainingEntity(): EntityContainingTypeParameter;
|
97
99
|
isHidden(): EntityHidingLevel | undefined;
|
98
100
|
getTags(): readonly Tag[];
|
101
|
+
getContext(): EntityContext;
|
99
102
|
}
|
@@ -5,7 +5,7 @@ import { AnonymousVariantTypeDeclaration, PackageVariantTypeDeclaration } from '
|
|
5
5
|
import * as types from '../types/index.js';
|
6
6
|
import { EntityNaming } from './EntityNaming.js';
|
7
7
|
import { OriginalTypeEntityMembers } from './TypeEntityMembers.js';
|
8
|
-
import { BaseObjectType, DefinitionKind, EntityHidingLevel, EntityKind, ITypeEntity, PackageEntity, SubstitutionApplicationMode, TypeEntityKind, TypeParameterEntity } from './index.js';
|
8
|
+
import { BaseObjectType, DefinitionKind, EntityContext, EntityHidingLevel, EntityKind, ITypeEntity, PackageEntity, SubstitutionApplicationMode, TypeEntityKind, TypeParameterEntity } from './index.js';
|
9
9
|
export type VariantTypeEntity = PackageVariantTypeEntity | AnonymousVariantTypeEntity;
|
10
10
|
export interface PackageVariantTypeEntity extends IVariantTypeEntity {
|
11
11
|
readonly subkind: 'package';
|
@@ -64,6 +64,7 @@ export declare class PackageVariantTypeDeclarationEntity implements PackageVaria
|
|
64
64
|
getTags(): readonly Tag[];
|
65
65
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
66
66
|
getBaseObjectType(): BaseObjectType;
|
67
|
+
getContext(): EntityContext;
|
67
68
|
}
|
68
69
|
export declare class AnonymousVariantTypeDeclarationEntity implements AnonymousVariantTypeEntity {
|
69
70
|
private readonly _analyzer;
|
@@ -86,5 +87,6 @@ export declare class AnonymousVariantTypeDeclarationEntity implements AnonymousV
|
|
86
87
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
87
88
|
getContainingPackage(): PackageEntity;
|
88
89
|
getBaseObjectType(): BaseObjectType;
|
90
|
+
getContext(): EntityContext;
|
89
91
|
}
|
90
92
|
export {};
|
@@ -1,9 +1,13 @@
|
|
1
1
|
import { Analyzer } from '../analysis/Analyzer.js';
|
2
|
+
import { LocalizationContext } from '../analysis/LocalizationContext.js';
|
3
|
+
import { SemanticContext } from '../analysis/semantic-context/SemanticContext.js';
|
4
|
+
import { PackageDialect, PackageLocale } from '../common/index.js';
|
2
5
|
import * as types from '../types/index.js';
|
3
6
|
import { AliasTypeEntity } from './AliasTypeEntity.js';
|
4
7
|
import { ConstructorEntity } from './ConstructorEntity.js';
|
5
8
|
import { DereferenceOperatorEntity } from './DereferenceOperatorEntity.js';
|
6
9
|
import { DestructorEntity } from './DestructorEntity.js';
|
10
|
+
import { IEntityHidingMatcher } from './EntityHiding.js';
|
7
11
|
import { FunctionEntity, MethodEntity, PackageFunctionEntity } from './FunctionEntity.js';
|
8
12
|
import { FunctionTypeEntity, PackageFunctionTypeEntity } from './FunctionTypeEntity.js';
|
9
13
|
import { GetterEntity } from './GetterEntity.js';
|
@@ -80,10 +84,8 @@ export declare function isEntityWithTags(entity: Entity): entity is EntityWithTa
|
|
80
84
|
export type TypeMemberEntity = FieldEntity | MethodEntity | OperatorEntity | ConstructorEntity | DestructorEntity | IndexerEntity | DereferenceOperatorEntity;
|
81
85
|
export declare function isTypeMemberEntity(entity: Entity): entity is TypeMemberEntity;
|
82
86
|
export declare namespace TypeMemberEntity {
|
83
|
-
/**
|
84
|
-
* Возвращает `true`, если это член аспектного типа.
|
85
|
-
*/
|
86
87
|
function isAspectTypeMember(entity: TypeMemberEntity): boolean;
|
88
|
+
function isRefObjectTypeMember(entity: TypeMemberEntity): boolean;
|
87
89
|
/**
|
88
90
|
* Возвращает `true`, если объявление является всеобщим (помечено модификатором "всеобщее").
|
89
91
|
*/
|
@@ -104,6 +106,16 @@ export declare namespace TypeMemberEntity {
|
|
104
106
|
function getOverriddenMembers(entity: TypeMemberEntity): readonly types.TypeMember[];
|
105
107
|
function instantiate(analyzer: Analyzer, entity: TypeMemberEntity, substitutions: types.Substitutions): types.TypeMember;
|
106
108
|
}
|
109
|
+
export declare class EntityContext {
|
110
|
+
readonly containingPackage: PackageEntity;
|
111
|
+
readonly hidingMatcher: IEntityHidingMatcher;
|
112
|
+
readonly localizationContext: LocalizationContext | undefined;
|
113
|
+
readonly typeExtensionLookup: SemanticContext | undefined;
|
114
|
+
get lctxOrLocale(): LocalizationContext | PackageLocale;
|
115
|
+
get packageDialect(): PackageDialect;
|
116
|
+
constructor(containingPackage: PackageEntity, hidingMatcher: IEntityHidingMatcher, localizationContext: LocalizationContext | undefined, typeExtensionLookup: SemanticContext | undefined);
|
117
|
+
static fromSemanticContext(semanticContext: SemanticContext): EntityContext;
|
118
|
+
}
|
107
119
|
export declare function entityToStringDecorator<T extends {
|
108
120
|
new (...args: any[]): Entity;
|
109
121
|
}>(constructor: T): void;
|