@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,7 +1,6 @@
|
|
1
1
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
2
2
|
import { AutotypeCallExpression } from '../tree/index.js';
|
3
3
|
import * as types from '../types/index.js';
|
4
|
-
import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
|
5
4
|
import { Analyzer, TargetTypeHint } from './index.js';
|
6
5
|
export declare class Resolver {
|
7
6
|
private readonly _analyzer;
|
@@ -20,8 +19,8 @@ declare class Meaning_constructorCall {
|
|
20
19
|
* с ним совместим.
|
21
20
|
*/
|
22
21
|
readonly type: types.Type;
|
23
|
-
readonly candidates: readonly
|
24
|
-
readonly suitableConstructors: readonly
|
22
|
+
readonly candidates: readonly types.Constructor[];
|
23
|
+
readonly suitableConstructors: readonly types.Constructor[];
|
25
24
|
readonly kind = "constructor-call";
|
26
25
|
constructor(
|
27
26
|
/**
|
@@ -31,7 +30,7 @@ declare class Meaning_constructorCall {
|
|
31
30
|
* создаваемый найденным конструктором, будет отличаться от результирующего типа, хранимого в этом поле, но будет
|
32
31
|
* с ним совместим.
|
33
32
|
*/
|
34
|
-
type: types.Type, candidates: readonly
|
33
|
+
type: types.Type, candidates: readonly types.Constructor[], suitableConstructors: readonly types.Constructor[]);
|
35
34
|
}
|
36
35
|
declare class Meaning_unresolved {
|
37
36
|
readonly diagnostics: readonly Diagnostic[];
|
@@ -2,7 +2,6 @@ import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
|
2
2
|
import * as tree from '../tree/index.js';
|
3
3
|
import * as types from '../types/index.js';
|
4
4
|
import { Analyzer } from './Analyzer.js';
|
5
|
-
import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
|
6
5
|
/**
|
7
6
|
* "основа" не является самостоятельным выражением и может использоваться только в следующих конструкциях:
|
8
7
|
* 1. `основа()` - в конструкторе для вызова базового конструктора или в методе для вызова базового метода.
|
@@ -16,16 +15,22 @@ export declare class Resolver {
|
|
16
15
|
private readonly _analyzer;
|
17
16
|
private readonly _node;
|
18
17
|
constructor(analyzer: Analyzer, node: tree.BaseExpression);
|
19
|
-
resolve():
|
18
|
+
resolve(): ResolutionsResult;
|
20
19
|
private resolveBaseConstructorOrMethodAccess;
|
21
20
|
private resolveBaseConstructorAccess;
|
22
21
|
private resolveBaseMethodAccess;
|
23
22
|
private resolveBaseOperatorAccess;
|
24
23
|
private resolveBaseObjectAccess;
|
25
|
-
private
|
24
|
+
private invalidContextDiagnostic;
|
26
25
|
private getBaseOrAliasedType;
|
27
26
|
private getContainingTypeMemberDeclaration;
|
28
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
|
+
}
|
29
34
|
export type Meaning = Meaning_baseObjectAccess | Meaning_baseConstructorAccess | Meaning_overriddenMethodAccess | Meaning_overriddenOperatorAccess | Meaning_unresolved;
|
30
35
|
declare class Meaning_baseObjectAccess {
|
31
36
|
readonly type: types.Type;
|
@@ -41,9 +46,10 @@ declare class Meaning_baseConstructorAccess {
|
|
41
46
|
* с ним совместим.
|
42
47
|
*/
|
43
48
|
readonly type: types.Type;
|
44
|
-
readonly candidates: readonly
|
45
|
-
readonly suitableConstructors: readonly
|
49
|
+
readonly candidates: readonly types.Constructor[];
|
50
|
+
readonly suitableConstructors: readonly types.Constructor[];
|
46
51
|
readonly kind = "base-constructor-access";
|
52
|
+
get singleSuitableConstructor(): types.Constructor | undefined;
|
47
53
|
constructor(
|
48
54
|
/**
|
49
55
|
* Тип объекта, получаемого в результате вызова конструктора.
|
@@ -52,7 +58,7 @@ declare class Meaning_baseConstructorAccess {
|
|
52
58
|
* создаваемый найденным конструктором, будет отличаться от результирующего типа, хранимого в этом поле, но будет
|
53
59
|
* с ним совместим.
|
54
60
|
*/
|
55
|
-
type: types.Type, candidates: readonly
|
61
|
+
type: types.Type, candidates: readonly types.Constructor[], suitableConstructors: readonly types.Constructor[]);
|
56
62
|
}
|
57
63
|
declare class Meaning_overriddenMethodAccess {
|
58
64
|
readonly method: types.Method;
|
@@ -65,8 +71,6 @@ declare class Meaning_overriddenOperatorAccess {
|
|
65
71
|
constructor(operator: types.Operator);
|
66
72
|
}
|
67
73
|
declare class Meaning_unresolved {
|
68
|
-
readonly diagnostic: Diagnostic;
|
69
74
|
readonly kind = "unresolved";
|
70
|
-
constructor(diagnostic: Diagnostic);
|
71
75
|
}
|
72
76
|
export {};
|
@@ -1,28 +1,26 @@
|
|
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';
|
6
|
-
import {
|
5
|
+
import { DiagnosticArgumentFactory } from './DiagnosticArgumentFactory.js';
|
7
6
|
export declare class BaseMemberConflictsValidator {
|
8
7
|
private readonly _analyzer;
|
9
8
|
private readonly _typeEntity;
|
10
9
|
private readonly _hidingMatcher;
|
11
|
-
private readonly
|
12
|
-
private readonly _dialect;
|
10
|
+
private readonly _diagnosticArgumentFactory;
|
13
11
|
private readonly _diagnostics;
|
14
12
|
private readonly _nodeForDiagnostic;
|
15
|
-
|
16
|
-
private get displayService();
|
17
|
-
constructor(_analyzer: Analyzer, _typeEntity: TypeEntityWithMembers, _hidingMatcher: IEntityHidingMatcher, _localizationContext: LocalizationContext, _dialect: PackageDialect | undefined, _diagnostics: DiagnosticAcceptor, _nodeForDiagnostic: Node);
|
13
|
+
constructor(_analyzer: Analyzer, _typeEntity: TypeEntityWithMembers, _hidingMatcher: IEntityHidingMatcher, _diagnosticArgumentFactory: DiagnosticArgumentFactory, _diagnostics: DiagnosticAcceptor, _nodeForDiagnostic: Node);
|
18
14
|
validate(): void;
|
19
15
|
private getAllNotShadowedNotOverriddenMembers;
|
20
|
-
private
|
21
|
-
private validateNamedMemberConflictsUsingOriginalNames;
|
16
|
+
private validateMemberConflicts;
|
22
17
|
private doTypeMembersConflict;
|
18
|
+
private doNamedTypeMemberConflictInOriginalLanguage;
|
19
|
+
private doNamedTypeMembersConflict;
|
23
20
|
private reportMembersConflictDiagnostic;
|
24
21
|
private reportMembersOriginalNameConflictConflictDiagnostic;
|
25
22
|
private addOverriddenMembersRecursively;
|
26
23
|
private typeMemberMatchesHiding;
|
27
|
-
private
|
24
|
+
private getOriginalTypeMemberNameConsideringOverriddenMembers;
|
25
|
+
private getLeastOverriddenNamedMember;
|
28
26
|
}
|
@@ -2,8 +2,6 @@ import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
|
2
2
|
import { CallExpression } from '../tree/index.js';
|
3
3
|
import * as types from '../types/index.js';
|
4
4
|
import { AccessedFunction } from './AccessedFunction.js';
|
5
|
-
import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
|
6
|
-
import { WithLocalization } from './Localization.js';
|
7
5
|
import { Analyzer } from './index.js';
|
8
6
|
export declare class Resolver {
|
9
7
|
private readonly _analyzer;
|
@@ -18,14 +16,14 @@ export declare class Resolver {
|
|
18
16
|
}
|
19
17
|
export type Meaning = Meaning_functionCall | Meaning_operatorCall | Meaning_objectFunctionCall | Meaning_constructorCall | Meaning_unresolved;
|
20
18
|
declare class Meaning_functionCall {
|
21
|
-
readonly func:
|
19
|
+
readonly func: AccessedFunction;
|
22
20
|
readonly kind = "function-call";
|
23
|
-
constructor(func:
|
21
|
+
constructor(func: AccessedFunction);
|
24
22
|
}
|
25
23
|
declare class Meaning_operatorCall {
|
26
|
-
readonly operator:
|
24
|
+
readonly operator: types.Operator;
|
27
25
|
readonly kind = "operator-call";
|
28
|
-
constructor(operator:
|
26
|
+
constructor(operator: types.Operator);
|
29
27
|
}
|
30
28
|
declare class Meaning_objectFunctionCall {
|
31
29
|
readonly type: types.FunctionType;
|
@@ -41,9 +39,10 @@ declare class Meaning_constructorCall {
|
|
41
39
|
* с ним совместим.
|
42
40
|
*/
|
43
41
|
readonly type: types.Type;
|
44
|
-
readonly candidates: readonly
|
45
|
-
readonly suitableConstructors: readonly
|
42
|
+
readonly candidates: readonly types.Constructor[];
|
43
|
+
readonly suitableConstructors: readonly types.Constructor[];
|
46
44
|
readonly kind = "constructor-call";
|
45
|
+
get singleSuitableConstructor(): types.Constructor | undefined;
|
47
46
|
constructor(
|
48
47
|
/**
|
49
48
|
* Тип объекта, получаемого в результате вызова конструктора.
|
@@ -52,7 +51,7 @@ declare class Meaning_constructorCall {
|
|
52
51
|
* создаваемый найденным конструктором, будет отличаться от результирующего типа, хранимого в этом поле, но будет
|
53
52
|
* с ним совместим.
|
54
53
|
*/
|
55
|
-
type: types.Type, candidates: readonly
|
54
|
+
type: types.Type, candidates: readonly types.Constructor[], suitableConstructors: readonly types.Constructor[]);
|
56
55
|
}
|
57
56
|
declare class Meaning_unresolved {
|
58
57
|
readonly diagnostics: readonly Diagnostic[];
|
@@ -2,8 +2,6 @@ import { Name } from '../common/index.js';
|
|
2
2
|
import * as tree from '../tree/index.js';
|
3
3
|
import * as types from '../types/index.js';
|
4
4
|
import { Analyzer } from './Analyzer.js';
|
5
|
-
import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
|
6
|
-
import { LocalizedName } from './Localization.js';
|
7
5
|
export declare class Resolver<TCandidate extends ICandidate<TValueParameter>, TValueParameter extends IValueParameter> {
|
8
6
|
private readonly _analyzer;
|
9
7
|
constructor(_analyzer: Analyzer);
|
@@ -17,16 +15,15 @@ export interface IValueParameter {
|
|
17
15
|
getType(): types.Type;
|
18
16
|
isOptional(): boolean;
|
19
17
|
}
|
20
|
-
export declare class
|
21
|
-
readonly value:
|
18
|
+
export declare class TypeMemberCandidate implements ICandidate<FoundTypeMemberCandidateValueParameter> {
|
19
|
+
readonly value: types.Constructor;
|
22
20
|
private readonly _valueParameters;
|
23
|
-
constructor(value:
|
21
|
+
constructor(value: types.Constructor);
|
24
22
|
getValueParameters(): readonly FoundTypeMemberCandidateValueParameter[];
|
25
23
|
}
|
26
24
|
declare class FoundTypeMemberCandidateValueParameter implements IValueParameter {
|
27
25
|
readonly value: types.ValueParameter;
|
28
|
-
|
29
|
-
constructor(value: types.ValueParameter, localizedName: LocalizedName);
|
26
|
+
constructor(value: types.ValueParameter);
|
30
27
|
getName(): Name;
|
31
28
|
getType(): types.Type;
|
32
29
|
isOptional(): boolean;
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import { CancellationToken } from '../common/index.js';
|
2
|
-
import { Entity } from '../entities/index.js';
|
2
|
+
import { Entity, NamedEntity } from '../entities/index.js';
|
3
3
|
import * as tree from '../tree/index.js';
|
4
4
|
import { Analyzer } from './Analyzer.js';
|
5
|
-
import { NamedEntity } from './LocalizationContext.js';
|
6
5
|
export declare class DeclarationsUsageCounter {
|
7
6
|
private readonly _analyzer;
|
8
7
|
private readonly _sourceFile;
|
@@ -2,7 +2,6 @@ import { AccessKind } from '../common/index.js';
|
|
2
2
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
3
3
|
import { DereferenceExpression } from '../tree/index.js';
|
4
4
|
import * as types from '../types/index.js';
|
5
|
-
import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
|
6
5
|
import { Analyzer } from './index.js';
|
7
6
|
export declare class Resolver {
|
8
7
|
private readonly _analyzer;
|
@@ -15,10 +14,10 @@ export declare class Resolver {
|
|
15
14
|
}
|
16
15
|
export type Meaning = Meaning_resolved | Meaning_unresolved;
|
17
16
|
declare class Meaning_resolved {
|
18
|
-
readonly operator:
|
17
|
+
readonly operator: types.DereferenceOperator;
|
19
18
|
readonly accessKind: AccessKind;
|
20
19
|
readonly kind = "resolved";
|
21
|
-
constructor(operator:
|
20
|
+
constructor(operator: types.DereferenceOperator, accessKind: AccessKind);
|
22
21
|
}
|
23
22
|
declare class Meaning_unresolved {
|
24
23
|
readonly diagnostic: Diagnostic | undefined;
|
@@ -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;
|
@@ -28,6 +28,7 @@ export declare class DiagnosticCollector {
|
|
28
28
|
private collectNotTranslatedPackageMembers;
|
29
29
|
private addNotTranslatedTypeMembersDiagnostics;
|
30
30
|
private collectNotTranslatedTypeMembers;
|
31
|
+
private isNotTranslatedEntity;
|
31
32
|
private createNotTranslatedEntitiesDiagnostic;
|
32
33
|
private checkAllDefaultConstructorArgumentsAreNamed;
|
33
34
|
private checkPackageFunctionDeclaration;
|
@@ -85,6 +86,5 @@ export declare class DiagnosticCollector {
|
|
85
86
|
private attachNodeLocationAndAddDiagnostics;
|
86
87
|
private addDiagnostic;
|
87
88
|
private addDiagnostics;
|
88
|
-
private
|
89
|
-
private addMaybeLazyDiagnostics;
|
89
|
+
private addDiagnosticsLocatedInAnalyzedFile;
|
90
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,10 +1,9 @@
|
|
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';
|
5
5
|
import * as types from '../types/index.js';
|
6
6
|
import { AccessedFunction } from './AccessedFunction.js';
|
7
|
-
import { FoundAnonymousDeclaration, FoundNamedDeclaration } from './FoundDeclaration.js';
|
8
7
|
import { PackageNameTreeNode } from './ImportedPackageNameTree.js';
|
9
8
|
import { Analyzer, TargetTypeHint } from './index.js';
|
10
9
|
import { NamedDeclaration } from './semantic-context/index.js';
|
@@ -23,12 +22,12 @@ export declare class Resolver {
|
|
23
22
|
}
|
24
23
|
export declare class ResolutionResult {
|
25
24
|
readonly meaning: Meaning;
|
26
|
-
readonly diagnostic?:
|
25
|
+
readonly diagnostic?: Diagnostic | undefined;
|
27
26
|
/**
|
28
27
|
* Может ли измениться результат, если посчитать его с другим целевым типом?
|
29
28
|
*/
|
30
29
|
readonly dependsOnTargetType: boolean;
|
31
|
-
constructor(meaning: Meaning, diagnostic?:
|
30
|
+
constructor(meaning: Meaning, diagnostic?: Diagnostic | undefined,
|
32
31
|
/**
|
33
32
|
* Может ли измениться результат, если посчитать его с другим целевым типом?
|
34
33
|
*/
|
@@ -36,24 +35,24 @@ export declare class ResolutionResult {
|
|
36
35
|
}
|
37
36
|
export type Meaning = Meaning_variableAccess | Meaning_functionAccess | Meaning_operatorAccess | Meaning_packageNameSegmentAccess | Meaning_packageAliasAccess | Meaning_typeAccess | Meaning_mixedAmbiguousAccess | Meaning_unresolved;
|
38
37
|
declare class Meaning_variableAccess {
|
39
|
-
readonly variable:
|
38
|
+
readonly variable: AccessedVariable;
|
40
39
|
readonly accessKind: AccessKind;
|
41
40
|
readonly kind = "variable-access";
|
42
|
-
constructor(variable:
|
41
|
+
constructor(variable: AccessedVariable, accessKind: AccessKind);
|
43
42
|
}
|
44
43
|
declare class Meaning_functionAccess {
|
45
|
-
readonly candidates: readonly
|
46
|
-
readonly suitableFunctions: readonly
|
44
|
+
readonly candidates: readonly AccessedFunction[];
|
45
|
+
readonly suitableFunctions: readonly AccessedFunction[];
|
47
46
|
readonly kind = "function-access";
|
48
|
-
get singleSuitableFunction():
|
49
|
-
constructor(candidates: readonly
|
47
|
+
get singleSuitableFunction(): AccessedFunction | undefined;
|
48
|
+
constructor(candidates: readonly AccessedFunction[], suitableFunctions: readonly AccessedFunction[]);
|
50
49
|
}
|
51
50
|
declare class Meaning_operatorAccess {
|
52
|
-
readonly candidates: readonly
|
53
|
-
readonly suitableOperators: readonly
|
51
|
+
readonly candidates: readonly types.Operator[];
|
52
|
+
readonly suitableOperators: readonly types.Operator[];
|
54
53
|
readonly kind = "operator-access";
|
55
|
-
get singleSuitableOperator():
|
56
|
-
constructor(candidates: readonly
|
54
|
+
get singleSuitableOperator(): types.Operator | undefined;
|
55
|
+
constructor(candidates: readonly types.Operator[], suitableOperators: readonly types.Operator[]);
|
57
56
|
}
|
58
57
|
declare class Meaning_packageAliasAccess {
|
59
58
|
readonly packageAlias: PackageAliasEntity;
|
@@ -66,16 +65,16 @@ declare class Meaning_packageNameSegmentAccess {
|
|
66
65
|
constructor(packageTreeNode: PackageNameTreeNode);
|
67
66
|
}
|
68
67
|
declare class Meaning_typeAccess {
|
69
|
-
readonly candidates: readonly
|
70
|
-
readonly suitableTypes: readonly
|
68
|
+
readonly candidates: readonly NamedTypeEntity[];
|
69
|
+
readonly suitableTypes: readonly types.Type[];
|
71
70
|
readonly kind = "type-access";
|
72
|
-
get singleSuitableType():
|
73
|
-
constructor(candidates: readonly
|
71
|
+
get singleSuitableType(): types.Type | undefined;
|
72
|
+
constructor(candidates: readonly NamedTypeEntity[], suitableTypes: readonly types.Type[]);
|
74
73
|
}
|
75
74
|
declare class Meaning_mixedAmbiguousAccess {
|
76
|
-
readonly declarations: readonly
|
75
|
+
readonly declarations: readonly NamedDeclaration[];
|
77
76
|
readonly kind = "mixed-ambiguous-access";
|
78
|
-
constructor(declarations: readonly
|
77
|
+
constructor(declarations: readonly NamedDeclaration[]);
|
79
78
|
}
|
80
79
|
declare class Meaning_unresolved {
|
81
80
|
readonly kind = "unresolved";
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import { Name } from '../common/index.js';
|
2
2
|
import { PackageEntity } from '../entities/PackageEntity.js';
|
3
|
-
import { AnalyzedTranslationPackage } from './AnalyzedTranslationPackage.js';
|
4
3
|
import { PackageImportInfo } from './Analyzer.js';
|
5
4
|
export declare class ImportedPackageNameTree {
|
6
5
|
private readonly _rootNodes;
|
@@ -10,14 +9,9 @@ export declare class ImportedPackageNameTree {
|
|
10
9
|
}
|
11
10
|
export interface PackageNameTreeNode {
|
12
11
|
readonly name: Name;
|
13
|
-
readonly package:
|
12
|
+
readonly package: PackageEntity | undefined;
|
14
13
|
readonly parent: PackageNameTreeNode | undefined;
|
15
14
|
getChild(name: Name): PackageNameTreeNode | undefined;
|
16
15
|
hasChild(name: Name): boolean;
|
17
16
|
getChildren(): Iterable<PackageNameTreeNode>;
|
18
17
|
}
|
19
|
-
export declare class ImportedPackage {
|
20
|
-
readonly value: PackageEntity;
|
21
|
-
readonly translationPackage: AnalyzedTranslationPackage | undefined;
|
22
|
-
constructor(value: PackageEntity, translationPackage: AnalyzedTranslationPackage | undefined);
|
23
|
-
}
|
@@ -1,8 +1,7 @@
|
|
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';
|
5
|
-
import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
|
6
5
|
import { Analyzer } from './index.js';
|
7
6
|
export declare class Resolver {
|
8
7
|
private readonly _analyzer;
|
@@ -16,17 +15,17 @@ export declare class Resolver {
|
|
16
15
|
}
|
17
16
|
export declare class ResolutionResult {
|
18
17
|
readonly meaning: Meaning;
|
19
|
-
readonly diagnostic?:
|
20
|
-
constructor(meaning: Meaning, diagnostic?:
|
18
|
+
readonly diagnostic?: Diagnostic | undefined;
|
19
|
+
constructor(meaning: Meaning, diagnostic?: Diagnostic | undefined);
|
21
20
|
}
|
22
21
|
export type Meaning = Meaning_resolved | Meaning_unresolved;
|
23
22
|
declare class Meaning_resolved {
|
24
|
-
readonly candidates: readonly
|
25
|
-
readonly suitableIndexers: readonly
|
23
|
+
readonly candidates: readonly types.Indexer[];
|
24
|
+
readonly suitableIndexers: readonly types.Indexer[];
|
26
25
|
readonly accessKind: AccessKind;
|
27
26
|
readonly kind = "resolved";
|
28
|
-
get singleSuitableIndexer():
|
29
|
-
constructor(candidates: readonly
|
27
|
+
get singleSuitableIndexer(): types.Indexer | undefined;
|
28
|
+
constructor(candidates: readonly types.Indexer[], suitableIndexers: readonly types.Indexer[], accessKind: AccessKind);
|
30
29
|
}
|
31
30
|
declare class Meaning_unresolved {
|
32
31
|
readonly kind = "unresolved";
|
@@ -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,5 +1,7 @@
|
|
1
|
-
import { PackageLocale
|
1
|
+
import { PackageLocale } from '../common/index.js';
|
2
2
|
import { Entity } from '../entities/index.js';
|
3
|
+
import { TranslationPackage } from '../project/index.js';
|
4
|
+
import * as tree from '../tree/index.js';
|
3
5
|
import { AnalyzedTranslationPackage } from './AnalyzedTranslationPackage.js';
|
4
6
|
export type Localization = Localization.Original | Localization.Translated;
|
5
7
|
export declare namespace Localization {
|
@@ -23,32 +25,24 @@ export declare namespace Localization {
|
|
23
25
|
}
|
24
26
|
export {};
|
25
27
|
}
|
26
|
-
export interface WithLocalization<T> {
|
27
|
-
readonly value: T;
|
28
|
-
readonly localization: Localization;
|
29
|
-
}
|
30
28
|
export declare class Translation {
|
31
29
|
readonly translationPackage: AnalyzedTranslationPackage;
|
32
|
-
|
30
|
+
readonly definition: TranslationDefinition;
|
31
|
+
constructor(translationPackage: AnalyzedTranslationPackage, definition: TranslationDefinition);
|
33
32
|
equals(other: Translation): boolean;
|
34
33
|
}
|
35
|
-
export type
|
36
|
-
export declare
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
interface ILocalizedName {
|
50
|
-
readonly value: Name;
|
51
|
-
readonly localization: Localization;
|
52
|
-
}
|
53
|
-
export {};
|
34
|
+
export type TranslationDefinition = SourceTranslationDefinition | IntrinsicTranslationDefinition;
|
35
|
+
export declare class SourceTranslationDefinition {
|
36
|
+
readonly nodeOrPackage: TranslationPackage | SourceTranslationDefinitionNode;
|
37
|
+
readonly translatedNameIdentifier: tree.Identifier | undefined;
|
38
|
+
readonly kind = "source";
|
39
|
+
constructor(nodeOrPackage: TranslationPackage | SourceTranslationDefinitionNode, translatedNameIdentifier: tree.Identifier | undefined);
|
40
|
+
equals(other: TranslationDefinition): boolean;
|
41
|
+
}
|
42
|
+
export type SourceTranslationDefinitionNode = tree.TopLevelTranslation | tree.TypeMemberTranslation;
|
43
|
+
export declare class IntrinsicTranslationDefinition {
|
44
|
+
readonly isMissingTranslationReplacement: boolean;
|
45
|
+
readonly kind = "intrinsic";
|
46
|
+
constructor(isMissingTranslationReplacement?: boolean);
|
47
|
+
equals(other: TranslationDefinition): boolean;
|
54
48
|
}
|