@artel/artc 0.6.25245 → 0.6.25247
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 +12 -2
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +223 -212
- package/build/{chunk-FVBS6MPY.js → chunk-3MYTPUJZ.js} +1 -1
- package/build/{chunk-T7WG4Z7I.js → chunk-3PVSYUJV.js} +3584 -2718
- package/build/{chunk-TVZEHLXD.js → chunk-TTNFYVNF.js} +2 -2
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +0 -1
- package/build/types/analysis/Analyzer.d.ts +30 -23
- package/build/types/analysis/BaseExpressionMeaning.d.ts +9 -4
- package/build/types/analysis/BaseMemberConflictsValidator.d.ts +3 -5
- package/build/types/analysis/CallExpressionMeaning.d.ts +1 -0
- package/build/types/analysis/DiagnosticArgumentFactory.d.ts +18 -0
- package/build/types/analysis/DiagnosticCollector.d.ts +2 -3
- package/build/types/analysis/DisplayableEntity.d.ts +46 -0
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +3 -3
- package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +3 -3
- package/build/types/analysis/InstanceFieldsInitializationValidator.d.ts +18 -0
- package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +3 -3
- package/build/types/analysis/NamedTypeResolver.d.ts +2 -3
- package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +2 -3
- package/build/types/analysis/NodeTypeUtils.d.ts +1 -0
- package/build/types/analysis/ObjectExpressionMeaning.d.ts +9 -4
- package/build/types/analysis/OwnAndBaseConstructorCallsChecker.d.ts +23 -0
- package/build/types/analysis/PackageAndStaticVariablesInitializationValidator.d.ts +17 -0
- package/build/types/analysis/TagMeaning.d.ts +2 -3
- package/build/types/analysis/control-flow/NarrowableReference.d.ts +7 -8
- package/build/types/analysis/semantic-context/SemanticContext.d.ts +2 -1
- package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +2 -0
- package/build/types/analysis/semantic-context/SemanticContextBuilder.d.ts +3 -0
- package/build/types/analysis/semantic-context/SemanticContextValidatingNameConflicts.d.ts +6 -7
- package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +3 -1
- package/build/types/analysis/semantic-context/SubprogramSemanticContext.d.ts +1 -1
- package/build/types/analysis/semantic-context/TranslationTextTemplateSemanticContext.d.ts +13 -0
- 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/TreeQuery.d.ts +4 -4
- package/build/types/common/WithDiagnostics.d.ts +3 -4
- package/build/types/common/index.d.ts +1 -0
- package/build/types/diagnostic/DiagnosticCode.d.ts +129 -125
- package/build/types/diagnostic/DiagnosticData.d.ts +7 -3
- 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/BaseEntityHidingMatcher.d.ts +1 -1
- package/build/types/entities/EntityHiding.d.ts +1 -1
- package/build/types/entities/VariableEntity.d.ts +35 -3
- package/build/types/project/FileSystemTree.d.ts +2 -2
- package/build/types/services/source-generation/SourceGenerationService.d.ts +2 -2
- 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/NodeKind.d.ts +20 -21
- package/build/types/tree/green/Nodes.d.ts +12 -26
- package/build/types/tree/red/Nodes.d.ts +15 -29
- package/package.json +2 -2
@@ -1,6 +1,6 @@
|
|
1
1
|
import {
|
2
2
|
Compiler
|
3
|
-
} from "./chunk-
|
3
|
+
} from "./chunk-3MYTPUJZ.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-3PVSYUJV.js";
|
18
18
|
|
19
19
|
// source/executor/FileSystemUri.ts
|
20
20
|
import { platform } from "os";
|
@@ -64,7 +64,6 @@ export declare class AnalyzedTranslationPackage {
|
|
64
64
|
private createTranslatedTypeSignature;
|
65
65
|
private enumerateTranslationsDeclarations;
|
66
66
|
private findTypeTranslation;
|
67
|
-
private createAmbiguousAccessDiagnostic;
|
68
67
|
}
|
69
68
|
export declare class TranslatedPackageMembers {
|
70
69
|
private readonly _namedMembers;
|
@@ -1,5 +1,5 @@
|
|
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';
|
@@ -22,6 +22,7 @@ import * as callExpressionMeaning from './CallExpressionMeaning.js';
|
|
22
22
|
import * as constructorOverloadResolver from './ConstructorOverloadResolver.js';
|
23
23
|
import { DeclarationsUsageCountResult } from './DeclarationsUsageCounter.js';
|
24
24
|
import * as dereferenceExpressionMeaning from './DereferenceExpressionMeaning.js';
|
25
|
+
import { DiagnosticArgumentFactory } from './DiagnosticArgumentFactory.js';
|
25
26
|
import * as functionOverloadResolver from './FunctionOverloadResolver.js';
|
26
27
|
import * as identifierExpressionResolution from './IdentifierExpressionMeaning.js';
|
27
28
|
import { ImportedPackageNameTree, PackageNameTreeNode } from './ImportedPackageNameTree.js';
|
@@ -29,8 +30,9 @@ import * as indexedAccessExpressionMeaning from './IndexedAccessExpressionMeanin
|
|
29
30
|
import * as memberAccessExpressionResolution from './MemberAccessExpressionMeaning.js';
|
30
31
|
import { ModifierFlags } from './ModifierFlags.js';
|
31
32
|
import { NamedTypeSpecifierResolutionResult } from './NamedTypeSpecifierResolver.js';
|
32
|
-
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';
|
33
34
|
import * as objectExpressionMeaning from './ObjectExpressionMeaning.js';
|
35
|
+
import { OwnAndBaseConstructorCallsCheckResult } from './OwnAndBaseConstructorCallsChecker.js';
|
34
36
|
import { SourceFileMembers as ActualSourceFileMembers } from './SourceFileMembers.js';
|
35
37
|
import * as tagMeaning from './TagMeaning.js';
|
36
38
|
import * as tags from './Tags.js';
|
@@ -66,7 +68,6 @@ export declare class Analyzer {
|
|
66
68
|
readonly valueLocalVariableEntity: ValueLocalVariableEntity;
|
67
69
|
readonly semanticContext: semanticContext.SemanticContextBuilder;
|
68
70
|
readonly argumentToParameterMatchResult: ArgumentToParameterMatchResult;
|
69
|
-
readonly defaultConstructors: DefaultConstructors;
|
70
71
|
readonly overriddenMember: OverriddenMember;
|
71
72
|
readonly tags: Tags;
|
72
73
|
readonly linkedEntity: LinkedEntity;
|
@@ -86,8 +87,8 @@ export declare class Analyzer {
|
|
86
87
|
private readonly _autotypeCallExpressionMeanings;
|
87
88
|
private readonly _identifierExpressionResolutionResults;
|
88
89
|
private readonly _tagResolutionResults;
|
89
|
-
private readonly
|
90
|
-
private readonly
|
90
|
+
private readonly _objectExpressionResolutionResults;
|
91
|
+
private readonly _baseExpressionResolutionResults;
|
91
92
|
private readonly _namedTypeSpecifierResolutionResults;
|
92
93
|
private readonly _prefixUnaryExpressionOperatorResolutionResults;
|
93
94
|
private readonly _binaryExpressionUserDefinableOperatorResolutionResults;
|
@@ -99,6 +100,7 @@ export declare class Analyzer {
|
|
99
100
|
private readonly _linkedMultiPlatformPackagesByPlatform;
|
100
101
|
private readonly _functionBlockWithYieldStatementCheckResults;
|
101
102
|
private readonly _namedDeclarationsUsageCountResults;
|
103
|
+
private readonly _packageAndStaticVariablesInitializationDiagnostics;
|
102
104
|
private readonly _controlFlowGraphs;
|
103
105
|
private readonly _diagnosticsComputedLazily;
|
104
106
|
private readonly _diagnosticsComputedLazilyAcceptor;
|
@@ -109,9 +111,12 @@ export declare class Analyzer {
|
|
109
111
|
private _packageEntitiesByNameKey;
|
110
112
|
private readonly _localizedWellKnownDeclarations;
|
111
113
|
private readonly _localizedStandardTypes;
|
114
|
+
private readonly _ownAndBaseConstructorCallsCheckResults;
|
115
|
+
private readonly _expressionCanBeUsedInForLoopCheckResults;
|
112
116
|
get tsInterop(): TsInteropContext;
|
113
117
|
constructor(compilation: project.Compilation, tsInteropInputs: TsInteropInputs);
|
114
118
|
getProjectSourceFile(node: tree.SourceFile): project.SourceFile;
|
119
|
+
checkExpressionCanBeUsedInForLoop(node: tree.Expression): WithDiagnostics<ExpressionCanBeUsedInForLoopCheckResult>;
|
115
120
|
ifTypeEnumerableThenItemType(type: types.Type): types.Type | undefined;
|
116
121
|
ifTypeEnumeratorThenItemType(type: types.Type): types.Type | undefined;
|
117
122
|
isTypeArrayOrReadonlyArray(type: types.Type): {
|
@@ -144,8 +149,8 @@ export declare class Analyzer {
|
|
144
149
|
getAutotypeCallExpressionMeaning(node: tree.AutotypeCallExpression, targetTypeHint?: TargetTypeHint): autotypeCallExpressionMeaning.Meaning;
|
145
150
|
resolveIdentifierExpression(node: tree.IdentifierExpression, targetTypeHint?: TargetTypeHint): identifierExpressionResolution.ResolutionResult;
|
146
151
|
resolveTag(node: tree.Tag): tagMeaning.ResolutionResult;
|
147
|
-
|
148
|
-
|
152
|
+
resolveObjectExpression(node: tree.ObjectExpression): objectExpressionMeaning.ResolutionResult;
|
153
|
+
resolveBaseExpression(node: tree.BaseExpression): baseExpressionMeaning.ResolutionsResult;
|
149
154
|
/**
|
150
155
|
* Проверяет, является ли выражение цепочкой доступов через `?`, заканчивающейся выражением, тип которого допускает
|
151
156
|
* `пусто`.
|
@@ -252,7 +257,7 @@ export declare class Analyzer {
|
|
252
257
|
excludeTypeFromUnion(initialType: types.Type, excludedType: types.Type): types.Type;
|
253
258
|
isValueParameterVariadic(entity: e.VariableEntity): boolean;
|
254
259
|
getDefaultTypeParameterConstraint(locale: PackageLocale): types.Type;
|
255
|
-
|
260
|
+
getSignatureTypeOfFunctionEntity(entity: e.FunctionEntity): types.FunctionType;
|
256
261
|
getFunctionBlockLiteralValueParameters(node: tree.FunctionBlockLiteral): readonly e.ParameterVariableEntity[];
|
257
262
|
getExtendedType(node: tree.TypeExtensionDeclaration): WithDiagnostics<e.NamedTypeEntity>;
|
258
263
|
getAnalyzedTranslationPackageIfTargetResolved(package_: project.TranslationPackage): AnalyzedTranslationPackage | undefined;
|
@@ -274,11 +279,13 @@ export declare class Analyzer {
|
|
274
279
|
createPackageMemberHiding(node: tree.PackageMemberDeclaration, modifierFlags: ModifierFlags): e.EntityHidingLevel | undefined;
|
275
280
|
createTypeMemberHiding(node: tree.TypeMemberDeclaration, modifierFlags: ModifierFlags): e.EntityHidingLevel | undefined;
|
276
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[];
|
277
284
|
createBackingPackageVariables(declaredMembers: readonly (e.NamedPackageMemberEntity | e.PackageAliasEntity)[], pkg: e.PackageEntity): e.PackageVariableEntity[];
|
278
285
|
createBackingFields(declaredMembers: readonly e.NamedTypeMemberEntity[], type: e.TypeEntity): e.FieldEntity[];
|
279
|
-
createNodeDiagnostic(code: DiagnosticCode, node: tree.Node, formatArguments?: readonly
|
280
|
-
createSourceFileRangeDiagnostic(code: DiagnosticCode, range: Range, nodeOrSourceFile: tree.Node | project.SourceFile, formatArguments?: readonly
|
281
|
-
createDiagnostic(code: DiagnosticCode, location: DiagnosticLocation | undefined, formatArguments?: readonly
|
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;
|
282
289
|
createNodeDiagnosticLocation(node: tree.Node): DiagnosticLocation;
|
283
290
|
getDeclaredTypeMemberEntities(node: tree.TypeMemberDeclarationBlock): DeclaredTypeMemberEntities;
|
284
291
|
getBasicMethodOfOriginalTypeForBasicMethodOfAliasType(entity: e.MethodEntity): e.MethodEntity | undefined;
|
@@ -287,13 +294,9 @@ export declare class Analyzer {
|
|
287
294
|
} | undefined;
|
288
295
|
getControlFlowGraph(sourceFile: project.SourceFile): controlFlow.GraphBuildResult;
|
289
296
|
createAmbiguousEntityAccessDiagnostic(entities: readonly e.Entity[], node: tree.Node): Diagnostic;
|
290
|
-
createAmbiguousEntityAccessLazyDiagnostic(entities: readonly e.Entity[], node: tree.Node): Lazy<Diagnostic>;
|
291
297
|
createAmbiguousFunctionAccessDiagnostic(functions: readonly AccessedFunction[], node: tree.Node): Diagnostic;
|
292
|
-
createAmbiguousFunctionAccessLazyDiagnostic(functions: readonly AccessedFunction[], node: tree.Node): Lazy<Diagnostic>;
|
293
298
|
createAmbiguousTypeMemberAccessDiagnostic(members: readonly types.TypeMember[], node: tree.Node): Diagnostic;
|
294
|
-
createAmbiguousTypeMemberAccessLazyDiagnostic(members: readonly types.TypeMember[], node: tree.Node): Lazy<Diagnostic>;
|
295
299
|
createAmbiguousNamedScopeDeclarationAccessDiagnostic(declarations: readonly semanticContext.NamedDeclaration[], node: tree.Node): Diagnostic;
|
296
|
-
createAmbiguousNamedScopeDeclarationAccessLazyDiagnostic(declarations: readonly semanticContext.NamedDeclaration[], node: tree.Node): Lazy<Diagnostic>;
|
297
300
|
addDiagnosticComputedLazily(diagnostic: Diagnostic): void;
|
298
301
|
getAcceptorForDiagnosticsComputedLazily(): DiagnosticAcceptor;
|
299
302
|
getSourceFileDiagnosticsComputedLazily(sourceFile: project.SourceFile): readonly Diagnostic[];
|
@@ -306,6 +309,10 @@ export declare class Analyzer {
|
|
306
309
|
getLocalizedWellKnownDeclarations(locale: PackageLocale): WellKnownDeclarations;
|
307
310
|
getLocalizedStandardTypes(locale: PackageLocale): types.StandardTypes;
|
308
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;
|
309
316
|
private createTsInterop;
|
310
317
|
}
|
311
318
|
export declare class TsInteropInputs {
|
@@ -331,6 +338,11 @@ export declare const enum SyntacticAccessKind {
|
|
331
338
|
GetSet = 2,
|
332
339
|
ReferencedValue = 3
|
333
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
|
+
}
|
334
346
|
declare class Type {
|
335
347
|
private readonly _analyzer;
|
336
348
|
private readonly _unionTypeSpecifierTypes;
|
@@ -423,6 +435,7 @@ declare class Entity {
|
|
423
435
|
private readonly _setterEntities;
|
424
436
|
private readonly _typeExtensionEntities;
|
425
437
|
private readonly _packageAliasEntities;
|
438
|
+
private readonly _translationTextTemplateParameterDeclarationEntities;
|
426
439
|
constructor(_analyzer: Analyzer);
|
427
440
|
ofPackage(pkg: SourcePackage): e.PackageEntity;
|
428
441
|
ofPackageVariableDeclaration(node: tree.PackageVariableDeclaration): e.PackageVariableEntity;
|
@@ -465,6 +478,8 @@ declare class Entity {
|
|
465
478
|
ofVariantDeclaration(node: tree.VariantDeclaration): e.FieldEntity;
|
466
479
|
ofTypeExtensionDeclaration(node: tree.TypeExtensionDeclaration): e.TypeExtensionEntity;
|
467
480
|
ofPackageImport(node: tree.PackageImport): e.PackageAliasEntity;
|
481
|
+
ofTypeWithMembersDeclaration(node: TypeWithMembersDeclaration): e.TypeEntityWithMembers;
|
482
|
+
ofTranslationTextTemplateParameterDeclaration(node: tree.TranslationTextTemplateParameterDeclaration): e.TranslationTextTemplateParameterDeclarationEntity;
|
468
483
|
private getContainingPackageLoadedFromDts;
|
469
484
|
private createComputedFieldEntities;
|
470
485
|
private createDereferenceOperatorEntities;
|
@@ -499,14 +514,6 @@ declare class ValueLocalVariableEntity {
|
|
499
514
|
ofIndexedElementSetterDeclaration(node: tree.IndexedElementSetterDeclaration): e.LocalVariableEntity;
|
500
515
|
ofDereferencedVariableSetterDeclaration(node: tree.DereferencedVariableSetterDeclaration): e.LocalVariableEntity;
|
501
516
|
}
|
502
|
-
declare class DefaultConstructors {
|
503
|
-
private readonly _analyzer;
|
504
|
-
private readonly _defaultConstructorEntities;
|
505
|
-
constructor(_analyzer: Analyzer);
|
506
|
-
ofStructuredType(type: StructuredTypeDeclaration): readonly e.ConstructorEntity[];
|
507
|
-
private createDefaultConstructors;
|
508
|
-
private getPublicInstanceStoredVariables;
|
509
|
-
}
|
510
517
|
declare class OverriddenMember {
|
511
518
|
private readonly _analyzer;
|
512
519
|
private readonly _namedMemberFinder;
|
@@ -15,16 +15,22 @@ export declare class Resolver {
|
|
15
15
|
private readonly _analyzer;
|
16
16
|
private readonly _node;
|
17
17
|
constructor(analyzer: Analyzer, node: tree.BaseExpression);
|
18
|
-
resolve():
|
18
|
+
resolve(): ResolutionsResult;
|
19
19
|
private resolveBaseConstructorOrMethodAccess;
|
20
20
|
private resolveBaseConstructorAccess;
|
21
21
|
private resolveBaseMethodAccess;
|
22
22
|
private resolveBaseOperatorAccess;
|
23
23
|
private resolveBaseObjectAccess;
|
24
|
-
private
|
24
|
+
private invalidContextDiagnostic;
|
25
25
|
private getBaseOrAliasedType;
|
26
26
|
private getContainingTypeMemberDeclaration;
|
27
27
|
}
|
28
|
+
export declare class ResolutionsResult {
|
29
|
+
readonly meaning: Meaning;
|
30
|
+
readonly diagnostics?: readonly Diagnostic[] | undefined;
|
31
|
+
constructor(meaning: Meaning, diagnostics?: readonly Diagnostic[] | undefined);
|
32
|
+
static unresolved(diagnostics?: readonly Diagnostic[]): ResolutionsResult;
|
33
|
+
}
|
28
34
|
export type Meaning = Meaning_baseObjectAccess | Meaning_baseConstructorAccess | Meaning_overriddenMethodAccess | Meaning_overriddenOperatorAccess | Meaning_unresolved;
|
29
35
|
declare class Meaning_baseObjectAccess {
|
30
36
|
readonly type: types.Type;
|
@@ -43,6 +49,7 @@ declare class Meaning_baseConstructorAccess {
|
|
43
49
|
readonly candidates: readonly types.Constructor[];
|
44
50
|
readonly suitableConstructors: readonly types.Constructor[];
|
45
51
|
readonly kind = "base-constructor-access";
|
52
|
+
get singleSuitableConstructor(): types.Constructor | undefined;
|
46
53
|
constructor(
|
47
54
|
/**
|
48
55
|
* Тип объекта, получаемого в результате вызова конструктора.
|
@@ -64,8 +71,6 @@ declare class Meaning_overriddenOperatorAccess {
|
|
64
71
|
constructor(operator: types.Operator);
|
65
72
|
}
|
66
73
|
declare class Meaning_unresolved {
|
67
|
-
readonly diagnostic: Diagnostic;
|
68
74
|
readonly kind = "unresolved";
|
69
|
-
constructor(diagnostic: Diagnostic);
|
70
75
|
}
|
71
76
|
export {};
|
@@ -1,18 +1,16 @@
|
|
1
|
-
import { PackageDialect } from '../common/index.js';
|
2
1
|
import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
|
3
2
|
import { IEntityHidingMatcher, TypeEntityWithMembers } from '../entities/index.js';
|
4
3
|
import { Node } from '../tree/index.js';
|
5
4
|
import { Analyzer } from './Analyzer.js';
|
5
|
+
import { DiagnosticArgumentFactory } from './DiagnosticArgumentFactory.js';
|
6
6
|
export declare class BaseMemberConflictsValidator {
|
7
7
|
private readonly _analyzer;
|
8
8
|
private readonly _typeEntity;
|
9
9
|
private readonly _hidingMatcher;
|
10
|
-
private readonly
|
10
|
+
private readonly _diagnosticArgumentFactory;
|
11
11
|
private readonly _diagnostics;
|
12
12
|
private readonly _nodeForDiagnostic;
|
13
|
-
|
14
|
-
private get displayService();
|
15
|
-
constructor(_analyzer: Analyzer, _typeEntity: TypeEntityWithMembers, _hidingMatcher: IEntityHidingMatcher, _dialect: PackageDialect | undefined, _diagnostics: DiagnosticAcceptor, _nodeForDiagnostic: Node);
|
13
|
+
constructor(_analyzer: Analyzer, _typeEntity: TypeEntityWithMembers, _hidingMatcher: IEntityHidingMatcher, _diagnosticArgumentFactory: DiagnosticArgumentFactory, _diagnostics: DiagnosticAcceptor, _nodeForDiagnostic: Node);
|
16
14
|
validate(): void;
|
17
15
|
private getAllNotShadowedNotOverriddenMembers;
|
18
16
|
private validateMemberConflicts;
|
@@ -42,6 +42,7 @@ declare class Meaning_constructorCall {
|
|
42
42
|
readonly candidates: readonly types.Constructor[];
|
43
43
|
readonly suitableConstructors: readonly types.Constructor[];
|
44
44
|
readonly kind = "constructor-call";
|
45
|
+
get singleSuitableConstructor(): types.Constructor | undefined;
|
45
46
|
constructor(
|
46
47
|
/**
|
47
48
|
* Тип объекта, получаемого в результате вызова конструктора.
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { PackageDialect, PackageLocale } from '../common/index.js';
|
2
|
+
import { Entity } from '../entities/index.js';
|
3
|
+
import * as types from '../types/index.js';
|
4
|
+
import { AccessedFunction } from './AccessedFunction.js';
|
5
|
+
import { Analyzer } from './Analyzer.js';
|
6
|
+
import { DisplayableAccessedFunction, DisplayableEntity, DisplayablePackageNameTreeNode, DisplayableType, DisplayableTypeMember } from './DisplayableEntity.js';
|
7
|
+
import { PackageNameTreeNode } from './ImportedPackageNameTree.js';
|
8
|
+
export declare class DiagnosticArgumentFactory {
|
9
|
+
readonly locale: PackageLocale;
|
10
|
+
readonly dialect: PackageDialect;
|
11
|
+
private readonly _analyzer;
|
12
|
+
constructor(analyzer: Analyzer, locale: PackageLocale, dialect: PackageDialect);
|
13
|
+
createDisplayableEntity(entity: Entity): DisplayableEntity;
|
14
|
+
createDisplayableAccessedFunction(accessedFunction: AccessedFunction): DisplayableAccessedFunction;
|
15
|
+
createDisplayableTypeMember(member: types.TypeMember): DisplayableTypeMember;
|
16
|
+
createDisplayablePackageNameTreeNode(node: PackageNameTreeNode): DisplayablePackageNameTreeNode;
|
17
|
+
createDisplayableType(type: types.Type): DisplayableType;
|
18
|
+
}
|
@@ -7,7 +7,7 @@ export declare class DiagnosticCollector {
|
|
7
7
|
private readonly _analyzer;
|
8
8
|
private readonly _sourceFile;
|
9
9
|
private readonly _cancellationToken;
|
10
|
-
private readonly
|
10
|
+
private readonly _diagnosticArgumentFactory;
|
11
11
|
private readonly _translationPackage;
|
12
12
|
private readonly _diagnostics;
|
13
13
|
private readonly _diagnosticAcceptor;
|
@@ -86,6 +86,5 @@ export declare class DiagnosticCollector {
|
|
86
86
|
private attachNodeLocationAndAddDiagnostics;
|
87
87
|
private addDiagnostic;
|
88
88
|
private addDiagnostics;
|
89
|
-
private
|
90
|
-
private addMaybeLazyDiagnostics;
|
89
|
+
private addDiagnosticsLocatedInAnalyzedFile;
|
91
90
|
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { Displayable, PackageDialect, PackageLocale } from '../common/index.js';
|
2
|
+
import { Entity } from '../entities/index.js';
|
3
|
+
import { AccessedFunction } from './AccessedFunction.js';
|
4
|
+
import { Analyzer } from './Analyzer.js';
|
5
|
+
import * as types from '../types/index.js';
|
6
|
+
import { PackageNameTreeNode } from './ImportedPackageNameTree.js';
|
7
|
+
export declare class DisplayableEntity implements Displayable {
|
8
|
+
private readonly _analyzer;
|
9
|
+
private readonly _entity;
|
10
|
+
private readonly _locale;
|
11
|
+
private readonly _dialect;
|
12
|
+
constructor(_analyzer: Analyzer, _entity: Entity, _locale: PackageLocale, _dialect: PackageDialect | undefined);
|
13
|
+
getDisplayText(): string;
|
14
|
+
}
|
15
|
+
export declare class DisplayableAccessedFunction implements Displayable {
|
16
|
+
private readonly _analyzer;
|
17
|
+
private readonly _accessedFunction;
|
18
|
+
private readonly _locale;
|
19
|
+
private readonly _dialect;
|
20
|
+
constructor(_analyzer: Analyzer, _accessedFunction: AccessedFunction, _locale: PackageLocale, _dialect: PackageDialect | undefined);
|
21
|
+
getDisplayText(): string;
|
22
|
+
}
|
23
|
+
export declare class DisplayableTypeMember implements Displayable {
|
24
|
+
private readonly _analyzer;
|
25
|
+
private readonly _member;
|
26
|
+
private readonly _locale;
|
27
|
+
private readonly _dialect;
|
28
|
+
constructor(_analyzer: Analyzer, _member: types.TypeMember, _locale: PackageLocale, _dialect: PackageDialect | undefined);
|
29
|
+
getDisplayText(): string;
|
30
|
+
}
|
31
|
+
export declare class DisplayablePackageNameTreeNode implements Displayable {
|
32
|
+
private readonly _analyzer;
|
33
|
+
private readonly _node;
|
34
|
+
private readonly _locale;
|
35
|
+
private readonly _dialect;
|
36
|
+
constructor(_analyzer: Analyzer, _node: PackageNameTreeNode, _locale: PackageLocale, _dialect: PackageDialect | undefined);
|
37
|
+
getDisplayText(): string;
|
38
|
+
}
|
39
|
+
export declare class DisplayableType implements Displayable {
|
40
|
+
private readonly _analyzer;
|
41
|
+
private readonly _type;
|
42
|
+
private readonly _locale;
|
43
|
+
private readonly _dialect;
|
44
|
+
constructor(_analyzer: Analyzer, _type: types.Type, _locale: PackageLocale, _dialect: PackageDialect | undefined);
|
45
|
+
getDisplayText(): string;
|
46
|
+
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { AccessKind,
|
1
|
+
import { AccessKind, Name } from '../common/index.js';
|
2
2
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
3
3
|
import { NamedTypeEntity, PackageAliasEntity, VariableEntity } from '../entities/index.js';
|
4
4
|
import * as tree from '../tree/index.js';
|
@@ -22,12 +22,12 @@ export declare class Resolver {
|
|
22
22
|
}
|
23
23
|
export declare class ResolutionResult {
|
24
24
|
readonly meaning: Meaning;
|
25
|
-
readonly diagnostic?:
|
25
|
+
readonly diagnostic?: Diagnostic | undefined;
|
26
26
|
/**
|
27
27
|
* Может ли измениться результат, если посчитать его с другим целевым типом?
|
28
28
|
*/
|
29
29
|
readonly dependsOnTargetType: boolean;
|
30
|
-
constructor(meaning: Meaning, diagnostic?:
|
30
|
+
constructor(meaning: Meaning, diagnostic?: Diagnostic | undefined,
|
31
31
|
/**
|
32
32
|
* Может ли измениться результат, если посчитать его с другим целевым типом?
|
33
33
|
*/
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { AccessKind
|
1
|
+
import { AccessKind } from '../common/index.js';
|
2
2
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
3
3
|
import { IndexedAccessExpression } from '../tree/index.js';
|
4
4
|
import * as types from '../types/index.js';
|
@@ -15,8 +15,8 @@ export declare class Resolver {
|
|
15
15
|
}
|
16
16
|
export declare class ResolutionResult {
|
17
17
|
readonly meaning: Meaning;
|
18
|
-
readonly diagnostic?:
|
19
|
-
constructor(meaning: Meaning, diagnostic?:
|
18
|
+
readonly diagnostic?: Diagnostic | undefined;
|
19
|
+
constructor(meaning: Meaning, diagnostic?: Diagnostic | undefined);
|
20
20
|
}
|
21
21
|
export type Meaning = Meaning_resolved | Meaning_unresolved;
|
22
22
|
declare class Meaning_resolved {
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
|
2
|
+
import { Analyzer } from './Analyzer.js';
|
3
|
+
import { DeclarationsUsageCountResult } from './DeclarationsUsageCounter.js';
|
4
|
+
import { TypeWithMembersDeclaration } from './NodeTypeUtils.js';
|
5
|
+
export declare class InstanceFieldsInitializationValidator {
|
6
|
+
private readonly _analyzer;
|
7
|
+
private readonly _typeDeclaration;
|
8
|
+
private readonly _declarationsUsageCountResult;
|
9
|
+
private readonly _diagnostics;
|
10
|
+
private readonly _semanticContext;
|
11
|
+
private get semanticContext();
|
12
|
+
constructor(_analyzer: Analyzer, _typeDeclaration: TypeWithMembersDeclaration, _declarationsUsageCountResult: DeclarationsUsageCountResult, _diagnostics: DiagnosticAcceptor);
|
13
|
+
validate(): void;
|
14
|
+
private getFieldsThatNeedToBeInitializedInConstructor;
|
15
|
+
private checkDefaultConstructorInitializesAllFields;
|
16
|
+
private checkConstructorInitializesAllFields;
|
17
|
+
private getFieldDiagnosticLocationWithFallback;
|
18
|
+
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { AccessKind
|
1
|
+
import { AccessKind } from '../common/index.js';
|
2
2
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
3
3
|
import { Entity, PackageTypeEntity, PackageVariableEntity } from '../entities/index.js';
|
4
4
|
import * as tree from '../tree/index.js';
|
@@ -29,12 +29,12 @@ export declare class Resolver {
|
|
29
29
|
}
|
30
30
|
export declare class ResolutionResult {
|
31
31
|
readonly meaning: Meaning;
|
32
|
-
readonly diagnostic?:
|
32
|
+
readonly diagnostic?: Diagnostic | undefined;
|
33
33
|
/**
|
34
34
|
* Может ли измениться результат, если посчитать его с другим целевым типом?
|
35
35
|
*/
|
36
36
|
readonly dependsOnTargetType: boolean;
|
37
|
-
constructor(meaning: Meaning, diagnostic?:
|
37
|
+
constructor(meaning: Meaning, diagnostic?: Diagnostic | undefined,
|
38
38
|
/**
|
39
39
|
* Может ли измениться результат, если посчитать его с другим целевым типом?
|
40
40
|
*/
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { MaybeLazy } from '../common/index.js';
|
2
1
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
3
2
|
import { NamedTypeEntity, PackageAliasEntity } from '../entities/index.js';
|
4
3
|
import { QualifiedName } from '../tree/index.js';
|
@@ -22,9 +21,9 @@ export declare class NamedTypeResolver {
|
|
22
21
|
export declare class NamedTypeResolutionResult {
|
23
22
|
readonly types: readonly NamedTypeEntity[];
|
24
23
|
readonly resolvedQualifiers: readonly ResolvedQualifier[];
|
25
|
-
readonly diagnostics: readonly
|
24
|
+
readonly diagnostics: readonly Diagnostic[];
|
26
25
|
readonly ambiguousDeclarations: readonly EntityOrPackageNameTreeNode[] | undefined;
|
27
|
-
constructor(types: readonly NamedTypeEntity[], resolvedQualifiers: readonly ResolvedQualifier[], diagnostics: readonly
|
26
|
+
constructor(types: readonly NamedTypeEntity[], resolvedQualifiers: readonly ResolvedQualifier[], diagnostics: readonly Diagnostic[], ambiguousDeclarations: readonly EntityOrPackageNameTreeNode[] | undefined);
|
28
27
|
}
|
29
28
|
export type ResolvedQualifier = ResolvedQualifier_packageNameSegment | ResolvedQualifier_packageAlias | ResolvedQualifier_type;
|
30
29
|
export declare class ResolvedQualifier_packageNameSegment {
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { MaybeLazy } from '../common/index.js';
|
2
1
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
3
2
|
import { NamedTypeSpecifier } from '../tree/index.js';
|
4
3
|
import * as types from '../types/index.js';
|
@@ -15,7 +14,7 @@ export declare class NamedTypeSpecifierResolver {
|
|
15
14
|
export declare class NamedTypeSpecifierResolutionResult {
|
16
15
|
readonly type: types.Type | undefined;
|
17
16
|
readonly resolvedQualifiers: readonly ResolvedQualifier[];
|
18
|
-
readonly diagnostics: readonly
|
17
|
+
readonly diagnostics: readonly Diagnostic[];
|
19
18
|
readonly ambiguousDeclarations: readonly EntityOrPackageNameTreeNode[] | undefined;
|
20
|
-
constructor(type: types.Type | undefined, resolvedQualifiers: readonly ResolvedQualifier[], diagnostics: readonly
|
19
|
+
constructor(type: types.Type | undefined, resolvedQualifiers: readonly ResolvedQualifier[], diagnostics: readonly Diagnostic[], ambiguousDeclarations: readonly EntityOrPackageNameTreeNode[] | undefined);
|
21
20
|
}
|
@@ -22,6 +22,7 @@ export type FunctionTypeDeclaration = tree.PackageFunctionTypeDeclaration | tree
|
|
22
22
|
export type FunctionDeclaration = tree.PackageFunctionDeclaration | tree.NestedFunctionDeclaration | tree.MethodDeclaration;
|
23
23
|
export type TypeDeclaration = StructuredTypeDeclaration | VariantTypeDeclaration | FunctionTypeDeclaration | tree.PackageAliasTypeDeclaration | tree.TypeParameterDeclaration;
|
24
24
|
export type NamedTypeDeclaration = tree.PackageStructuredTypeDeclaration | tree.PackageVariantTypeDeclaration | tree.PackageFunctionTypeDeclaration | tree.PackageAliasTypeDeclaration | tree.TypeParameterDeclaration;
|
25
|
+
export type TypeWithMembersDeclaration = StructuredTypeDeclaration | VariantTypeDeclaration | tree.PackageAliasTypeDeclaration;
|
25
26
|
export type VariableDeclaration = tree.EnumerationVariableDeclaration | tree.PackageVariableDeclaration | tree.LocalVariableDeclaration | tree.ParameterDeclaration | tree.FieldDeclaration | tree.VariantDeclaration;
|
26
27
|
export type GetterDeclaration = tree.PackageVariableGetterDeclaration | tree.FieldGetterDeclaration | tree.IndexedElementGetterDeclaration | tree.DereferencedVariableGetterDeclaration;
|
27
28
|
export type SetterDeclaration = tree.PackageVariableSetterDeclaration | tree.FieldSetterDeclaration | tree.IndexedElementSetterDeclaration | tree.DereferencedVariableSetterDeclaration;
|
@@ -11,12 +11,18 @@ export declare class Resolver {
|
|
11
11
|
private readonly _analyzer;
|
12
12
|
private readonly _node;
|
13
13
|
constructor(analyzer: Analyzer, node: tree.ObjectExpression);
|
14
|
-
resolve():
|
14
|
+
resolve(): ResolutionResult;
|
15
15
|
private resolveOwnConstructorAccess;
|
16
16
|
private resolveContextAccess;
|
17
|
-
private
|
17
|
+
private invalidContextDiagnostic;
|
18
18
|
private findContainingConstructor;
|
19
19
|
}
|
20
|
+
export declare class ResolutionResult {
|
21
|
+
readonly meaning: Meaning;
|
22
|
+
readonly diagnostics?: readonly Diagnostic[] | undefined;
|
23
|
+
constructor(meaning: Meaning, diagnostics?: readonly Diagnostic[] | undefined);
|
24
|
+
static unresolved(diagnostics?: readonly Diagnostic[]): ResolutionResult;
|
25
|
+
}
|
20
26
|
export type Meaning = Meaning_ownConstructorAccess | Meaning_objectAccess | Meaning_unresolved;
|
21
27
|
declare class Meaning_ownConstructorAccess {
|
22
28
|
/**
|
@@ -30,6 +36,7 @@ declare class Meaning_ownConstructorAccess {
|
|
30
36
|
readonly candidates: readonly types.Constructor[];
|
31
37
|
readonly suitableConstructors: readonly types.Constructor[];
|
32
38
|
readonly kind = "own-constructor-access";
|
39
|
+
get singleSuitableConstructor(): types.Constructor | undefined;
|
33
40
|
constructor(
|
34
41
|
/**
|
35
42
|
* Тип объекта, получаемого в результате вызова конструктора.
|
@@ -46,8 +53,6 @@ declare class Meaning_objectAccess {
|
|
46
53
|
constructor(type: types.Type);
|
47
54
|
}
|
48
55
|
declare class Meaning_unresolved {
|
49
|
-
readonly diagnostic: Diagnostic | undefined;
|
50
56
|
readonly kind = "unresolved";
|
51
|
-
constructor(diagnostic: Diagnostic | undefined);
|
52
57
|
}
|
53
58
|
export {};
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
2
|
+
import { ConstructorEntity, TypeEntityWithMembers } from '../entities/index.js';
|
3
|
+
import * as tree from '../tree/index.js';
|
4
|
+
import * as types from '../types/index.js';
|
5
|
+
import { Analyzer } from './Analyzer.js';
|
6
|
+
import { SemanticContext } from './semantic-context/SemanticContext.js';
|
7
|
+
export declare class OwnAndBaseConstructorCallsChecker {
|
8
|
+
private readonly _analyzer;
|
9
|
+
private readonly _constructorDeclarations;
|
10
|
+
private readonly _typeEntity;
|
11
|
+
private readonly _semanticContext;
|
12
|
+
constructor(_analyzer: Analyzer, _constructorDeclarations: readonly tree.ConstructorDeclaration[], _typeEntity: TypeEntityWithMembers, _semanticContext: SemanticContext);
|
13
|
+
check(): OwnAndBaseConstructorCallsCheckResult;
|
14
|
+
private addOwnConstructorCallOrReportCycleDiagnostic;
|
15
|
+
private getUnaliasedBaseObjectType;
|
16
|
+
private findAccessibleConstructorWithoutParameters;
|
17
|
+
}
|
18
|
+
export declare class OwnAndBaseConstructorCallsCheckResult {
|
19
|
+
readonly ownConstructorCalls: ReadonlyMap<ConstructorEntity, ConstructorEntity>;
|
20
|
+
readonly baseConstructorCalls: ReadonlyMap<ConstructorEntity, types.Constructor>;
|
21
|
+
readonly diagnostics: readonly Diagnostic[];
|
22
|
+
constructor(ownConstructorCalls: ReadonlyMap<ConstructorEntity, ConstructorEntity>, baseConstructorCalls: ReadonlyMap<ConstructorEntity, types.Constructor>, diagnostics: readonly Diagnostic[]);
|
23
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
|
2
|
+
import { SourcePackage } from '../project/SourcePackage.js';
|
3
|
+
import { Analyzer } from './Analyzer.js';
|
4
|
+
import { DeclarationsUsageCountResult } from './DeclarationsUsageCounter.js';
|
5
|
+
export declare class PackageAndStaticVariablesInitializationValidator {
|
6
|
+
private readonly _analyzer;
|
7
|
+
private readonly _package;
|
8
|
+
private readonly _declarationsUsageCountResults;
|
9
|
+
private readonly _diagnostics;
|
10
|
+
constructor(_analyzer: Analyzer, _package: SourcePackage, _declarationsUsageCountResults: readonly DeclarationsUsageCountResult[], _diagnostics: DiagnosticAcceptor);
|
11
|
+
validate(): void;
|
12
|
+
private getVariablesThatNeedToBeInitializedInConstructor;
|
13
|
+
private collectStaticFieldsThatNeedToBeInitializedInConstructor;
|
14
|
+
private excludeVariablesInitializedInConstructor;
|
15
|
+
private reportNotInitialedVariableDiagnostic;
|
16
|
+
private getVariableDiagnosticLocationWithFallback;
|
17
|
+
}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { MaybeLazy } from '../common/index.js';
|
2
1
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
3
2
|
import { FunctionEntity, NamedTypeEntity, PackageAliasEntity } from '../entities/index.js';
|
4
3
|
import { Tag } from '../tree/index.js';
|
@@ -25,9 +24,9 @@ export declare class Resolver {
|
|
25
24
|
export declare class ResolutionResult {
|
26
25
|
readonly meaning: Meaning;
|
27
26
|
readonly resolvedQualifiers: readonly ResolvedQualifier[];
|
28
|
-
readonly diagnostic?:
|
27
|
+
readonly diagnostic?: Diagnostic | undefined;
|
29
28
|
readonly ambiguousDeclarations?: readonly EntityOrPackageNameTreeNode[] | undefined;
|
30
|
-
constructor(meaning: Meaning, resolvedQualifiers: readonly ResolvedQualifier[], diagnostic?:
|
29
|
+
constructor(meaning: Meaning, resolvedQualifiers: readonly ResolvedQualifier[], diagnostic?: Diagnostic | undefined, ambiguousDeclarations?: readonly EntityOrPackageNameTreeNode[] | undefined);
|
31
30
|
}
|
32
31
|
export type Meaning = Meaning_tagType | Meaning_tagFunction | Meaning_unresolved;
|
33
32
|
declare class Meaning_tagType {
|
@@ -1,15 +1,14 @@
|
|
1
|
-
import { LocalVariableEntity, PackageVariableEntity, ParameterVariableEntity } from '../../entities/VariableEntity.js';
|
1
|
+
import { FieldEntity, LocalVariableEntity, PackageVariableEntity, ParameterVariableEntity, TextTemplateParameterVariableEntity } from '../../entities/VariableEntity.js';
|
2
2
|
import * as tree from '../../tree/index.js';
|
3
|
-
import * as types from '../../types/index.js';
|
4
3
|
import { Analyzer } from '../Analyzer.js';
|
5
4
|
import { NarrowableReferenceExpression } from '../control-flow/NarrowableExpression.js';
|
6
5
|
export type NarrowableReference = NarrowableReference.LocalVariable | NarrowableReference.PackageVariable | NarrowableReference.InstanceField | NarrowableReference.StaticField | NarrowableReference.ObjectAutoVariable;
|
7
6
|
export declare namespace NarrowableReference {
|
8
7
|
export class LocalVariable implements INarrowableReference {
|
9
8
|
private readonly _analyzer;
|
10
|
-
readonly entity: LocalVariableEntity | ParameterVariableEntity;
|
9
|
+
readonly entity: LocalVariableEntity | ParameterVariableEntity | TextTemplateParameterVariableEntity;
|
11
10
|
readonly kind = "local-variable";
|
12
|
-
constructor(_analyzer: Analyzer, entity: LocalVariableEntity | ParameterVariableEntity);
|
11
|
+
constructor(_analyzer: Analyzer, entity: LocalVariableEntity | ParameterVariableEntity | TextTemplateParameterVariableEntity);
|
13
12
|
equals(other: NarrowableReference): boolean;
|
14
13
|
contains(_other: NarrowableReference): boolean;
|
15
14
|
equalsExpression(expression: NarrowableReferenceExpression): boolean;
|
@@ -27,10 +26,10 @@ export declare namespace NarrowableReference {
|
|
27
26
|
}
|
28
27
|
export class InstanceField implements INarrowableReference {
|
29
28
|
private readonly _analyzer;
|
30
|
-
readonly field:
|
29
|
+
readonly field: FieldEntity;
|
31
30
|
readonly receiver: NarrowableReference;
|
32
31
|
readonly kind = "instance-field";
|
33
|
-
constructor(_analyzer: Analyzer, field:
|
32
|
+
constructor(_analyzer: Analyzer, field: FieldEntity, receiver: NarrowableReference);
|
34
33
|
equals(other: NarrowableReference): boolean;
|
35
34
|
contains(other: NarrowableReference): boolean;
|
36
35
|
equalsExpression(expression: NarrowableReferenceExpression): boolean;
|
@@ -38,9 +37,9 @@ export declare namespace NarrowableReference {
|
|
38
37
|
}
|
39
38
|
export class StaticField implements INarrowableReference {
|
40
39
|
private readonly _analyzer;
|
41
|
-
readonly field:
|
40
|
+
readonly field: FieldEntity;
|
42
41
|
readonly kind = "static-field";
|
43
|
-
constructor(_analyzer: Analyzer, field:
|
42
|
+
constructor(_analyzer: Analyzer, field: FieldEntity);
|
44
43
|
equals(other: NarrowableReference): boolean;
|
45
44
|
contains(_other: NarrowableReference): boolean;
|
46
45
|
equalsExpression(expression: NarrowableReferenceExpression): boolean;
|