@artel/artc 0.6.25254 → 0.6.25256
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 +18 -8
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +607 -389
- package/build/{chunk-JTDPRR7O.js → chunk-CTEZ5IHI.js} +2 -2
- package/build/{chunk-3JS4YG6N.js → chunk-ER3TEZSN.js} +14316 -16033
- package/build/{chunk-JV2EK6MS.js → chunk-IHZZGWNS.js} +1 -1
- package/build/types/analysis/AccessedFunction.d.ts +19 -6
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +2 -1
- package/build/types/analysis/Analyzer.d.ts +119 -47
- package/build/types/analysis/ArgumentToParameterMatchResult.d.ts +1 -4
- package/build/types/analysis/ArgumentsToParametersMatcher.d.ts +9 -15
- package/build/types/analysis/AutotypeCallExpressionMeaning.d.ts +13 -7
- package/build/types/analysis/BaseExpressionMeaning.d.ts +43 -15
- package/build/types/analysis/CallExpressionMeaning.d.ts +41 -22
- package/build/types/analysis/ConstructorCallResolver.d.ts +22 -0
- package/build/types/analysis/DiagnosticArgumentFactory.d.ts +3 -1
- package/build/types/analysis/DiagnosticCollector.d.ts +5 -9
- package/build/types/analysis/DisplayableEntity.d.ts +12 -6
- package/build/types/analysis/FunctionAccessResolver.d.ts +15 -0
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +56 -22
- package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +3 -2
- package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +76 -27
- package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +0 -1
- package/build/types/analysis/NodeTypeUtils.d.ts +1 -0
- package/build/types/analysis/ObjectExpressionMeaning.d.ts +1 -0
- package/build/types/analysis/OperatorAccessResolver.d.ts +9 -0
- package/build/types/analysis/OverloadResolver.d.ts +91 -5
- package/build/types/analysis/ReturnTypeInferrer.d.ts +13 -0
- package/build/types/analysis/SourceFileMembers.d.ts +2 -0
- package/build/types/analysis/SubstitutedFunction.d.ts +22 -20
- package/build/types/analysis/TagMeaning.d.ts +16 -15
- package/build/types/analysis/TypeArgumentInferrer.d.ts +49 -0
- package/build/types/analysis/TypeNarrower.d.ts +6 -4
- package/build/types/analysis/TypeOverloadResolver.d.ts +4 -2
- package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +2 -6
- package/build/types/analysis/UserDefinableUnaryOperatorResolver.d.ts +2 -2
- package/build/types/analysis/Utils.d.ts +2 -0
- package/build/types/analysis/Visitor.d.ts +2 -2
- package/build/types/analysis/index.d.ts +0 -2
- package/build/types/analysis/semantic-context/Declarations.d.ts +4 -4
- package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +4 -0
- package/build/types/analysis/semantic-context/SemanticContextBuilder.d.ts +1 -0
- package/build/types/api/Api.d.ts +0 -2
- package/build/types/common/ArrayUtils.d.ts +5 -2
- package/build/types/common/Cached.d.ts +4 -0
- package/build/types/common/Lazy.d.ts +2 -0
- package/build/types/common/Query.d.ts +1 -1
- package/build/types/common/TreeQuery.d.ts +14 -48
- package/build/types/common/TreeTraversal.d.ts +1 -1
- package/build/types/common/index.d.ts +0 -1
- package/build/types/diagnostic/Diagnostic.d.ts +7 -0
- package/build/types/diagnostic/DiagnosticCode.d.ts +180 -173
- package/build/types/entities/AliasTypeEntity.d.ts +1 -0
- package/build/types/entities/AliasedType.d.ts +2 -2
- package/build/types/entities/FunctionEntity.d.ts +6 -3
- package/build/types/entities/FunctionTypeEntity.d.ts +2 -1
- package/build/types/entities/PackageAliasEntity.d.ts +2 -2
- package/build/types/entities/PackageMembers.d.ts +1 -0
- package/build/types/entities/StructuredTypeEntity.d.ts +1 -0
- package/build/types/entities/TypeEntityMembers.d.ts +2 -0
- package/build/types/entities/TypeParameterEntity.d.ts +1 -0
- package/build/types/entities/VariableEntity.d.ts +23 -11
- package/build/types/entities/VariantTypeEntity.d.ts +1 -0
- package/build/types/entities/index.d.ts +3 -2
- package/build/types/parser/CharacterCodes.d.ts +0 -8
- package/build/types/parser/Parser.d.ts +2 -2
- package/build/types/parser/TriviaInterner.d.ts +8 -0
- package/build/types/services/AddPropertyAssignmentService.d.ts +0 -7
- package/build/types/services/DisplayService.d.ts +16 -10
- package/build/types/services/NodeSemanticInfo.d.ts +3 -1
- package/build/types/services/TreeUtils.d.ts +1 -1
- package/build/types/services/signature-help/SignatureWithValueParameters.d.ts +9 -1
- package/build/types/services/signature-help/TypeParameterSignatureHelpProvider.d.ts +1 -1
- package/build/types/services/source-generation/EntityToSyntax.d.ts +1 -1
- package/build/types/tree/BaseNode.d.ts +32 -0
- package/build/types/tree/{green/Nodes.d.ts → Nodes.d.ts} +411 -359
- package/build/types/tree/{green/SyntaxToCode.d.ts → SyntaxToCode.d.ts} +1 -1
- package/build/types/tree/{green/Token.d.ts → Token.d.ts} +26 -10
- package/build/types/tree/{red/Utils.d.ts → Utils.d.ts} +4 -3
- package/build/types/tree/index.d.ts +10 -1
- package/build/types/ts-interop/Entities.d.ts +14 -0
- package/build/types/types/AliasType.d.ts +2 -2
- package/build/types/types/FunctionType.d.ts +2 -2
- package/build/types/types/IntersectionType.d.ts +3 -3
- package/build/types/types/ParameterType.d.ts +2 -2
- package/build/types/types/StructuredType.d.ts +2 -2
- package/build/types/types/Substitutions.d.ts +18 -6
- package/build/types/types/Type.d.ts +3 -3
- package/build/types/types/TypeMembers.d.ts +2 -1
- package/build/types/types/UnionType.d.ts +3 -3
- package/build/types/types/UnresolvedType.d.ts +2 -2
- package/build/types/types/VariantType.d.ts +2 -2
- package/package.json +7 -1
- package/build/types/analysis/ConstructorOverloadResolver.d.ts +0 -31
- package/build/types/analysis/FunctionOverloadResolver.d.ts +0 -21
- package/build/types/analysis/TargetTypeHint.d.ts +0 -5
- package/build/types/common/Errors.d.ts +0 -2
- package/build/types/tree/green/BaseNode.d.ts +0 -14
- package/build/types/tree/green/Utils.d.ts +0 -2
- package/build/types/tree/green/index.d.ts +0 -8
- package/build/types/tree/red/BaseNode.d.ts +0 -16
- package/build/types/tree/red/Internal.d.ts +0 -2
- package/build/types/tree/red/Nodes.d.ts +0 -2271
- package/build/types/tree/red/Token.d.ts +0 -30
- package/build/types/tree/red/index.d.ts +0 -10
- /package/build/types/tree/{red/NodePath.d.ts → NodePath.d.ts} +0 -0
- /package/build/types/tree/{green/SyntaxFactory.d.ts → SyntaxFactory.d.ts} +0 -0
|
@@ -3,44 +3,48 @@ 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';
|
|
5
5
|
import * as types from '../types/index.js';
|
|
6
|
-
import { AccessedFunction } from './AccessedFunction.js';
|
|
6
|
+
import { AccessedFunction, NotSubstitutedAccessedFunction } from './AccessedFunction.js';
|
|
7
|
+
import * as callExpressionMeaning from './CallExpressionMeaning.js';
|
|
7
8
|
import { PackageNameTreeNode } from './ImportedPackageNameTree.js';
|
|
8
|
-
import { Analyzer,
|
|
9
|
-
export declare class
|
|
9
|
+
import { Analyzer, ExpressionAnalysisOptions } from './index.js';
|
|
10
|
+
export declare class FirstStageResolver {
|
|
10
11
|
private readonly _semanticContext;
|
|
11
12
|
private readonly _analyzer;
|
|
12
13
|
private readonly _node;
|
|
13
|
-
private readonly _targetTypeHint;
|
|
14
14
|
private get memberName();
|
|
15
15
|
private get semanticContext();
|
|
16
16
|
private get receiver();
|
|
17
|
-
constructor(analyzer: Analyzer, node: tree.MemberAccessExpression
|
|
18
|
-
resolve():
|
|
17
|
+
constructor(analyzer: Analyzer, node: tree.MemberAccessExpression);
|
|
18
|
+
resolve(): FirstStageResolutionResult;
|
|
19
19
|
private resolvePackageAliasMemberAccessMeaning;
|
|
20
20
|
private resolvePackageMemberAccessMeaning;
|
|
21
|
+
private resolveTypeAccess;
|
|
21
22
|
private resolvePackageNameSegmentAccessMeaning;
|
|
22
|
-
private createAccessedFunctionFromPackageMember;
|
|
23
23
|
private resolveStaticMemberOrVariantAccessMeaning;
|
|
24
|
-
private createAccessedFunctionFromTypeMember;
|
|
25
24
|
private resolveInstanceMemberAccessMeaning;
|
|
26
25
|
private tryResolveInstanceOperatorAccessMeaning;
|
|
27
|
-
private resolveFunctionOverload;
|
|
28
26
|
private convertSyntacticAccessKind;
|
|
29
27
|
}
|
|
28
|
+
export declare class SecondStageResolver {
|
|
29
|
+
private readonly _analyzer;
|
|
30
|
+
private readonly _node;
|
|
31
|
+
private readonly _firstStageResolutionResult;
|
|
32
|
+
private readonly _analysisOptions;
|
|
33
|
+
constructor(analyzer: Analyzer, node: tree.MemberAccessExpression, firstStageResolutionResult: FirstStageResolutionResult, analysisOptions: ExpressionAnalysisOptions | undefined);
|
|
34
|
+
resolve(): ResolutionResult;
|
|
35
|
+
private resolveTypeAccessAtCalleePosition;
|
|
36
|
+
private resolvePackageFunctionAccess;
|
|
37
|
+
private resolveStaticMethodAccess;
|
|
38
|
+
private resolveInstanceMethodAccess;
|
|
39
|
+
private resolveNotCalledFunctionsAccess;
|
|
40
|
+
private resolveOperatorAccess;
|
|
41
|
+
}
|
|
30
42
|
export declare class ResolutionResult {
|
|
31
43
|
readonly meaning: Meaning;
|
|
32
|
-
readonly
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
readonly dependsOnTargetType: boolean;
|
|
37
|
-
constructor(meaning: Meaning, diagnostic?: Diagnostic | undefined,
|
|
38
|
-
/**
|
|
39
|
-
* Может ли измениться результат, если посчитать его с другим целевым типом?
|
|
40
|
-
*/
|
|
41
|
-
dependsOnTargetType?: boolean);
|
|
42
|
-
}
|
|
43
|
-
export type Meaning = Meaning_packageVariableAccess | Meaning_packageFunctionAccess | Meaning_packageTypeAccess | Meaning_packageNameSegmentAccess | Meaning_staticFieldAccess | Meaning_staticMethodAccess | Meaning_instanceFieldAccess | Meaning_instanceMethodAccess | Meaning_operatorAccess | Meaning_mixedAmbiguousAccess | Meaning_unresolved;
|
|
44
|
+
readonly diagnostics: readonly Diagnostic[] | undefined;
|
|
45
|
+
constructor(meaning: Meaning, diagnostics?: Diagnostic | readonly Diagnostic[]);
|
|
46
|
+
}
|
|
47
|
+
export type Meaning = Meaning_packageVariableAccess | Meaning_packageFunctionAccess | Meaning_packageTypeAccess | Meaning_constructorAccess | Meaning_packageNameSegmentAccess | Meaning_staticFieldAccess | Meaning_staticMethodAccess | Meaning_instanceFieldAccess | Meaning_instanceMethodAccess | Meaning_operatorAccess | Meaning_mixedAmbiguousAccess | Meaning_unresolved;
|
|
44
48
|
declare class Meaning_packageVariableAccess {
|
|
45
49
|
readonly variable: PackageVariableEntity;
|
|
46
50
|
readonly accessKind: AccessKind;
|
|
@@ -48,11 +52,13 @@ declare class Meaning_packageVariableAccess {
|
|
|
48
52
|
constructor(variable: PackageVariableEntity, accessKind: AccessKind);
|
|
49
53
|
}
|
|
50
54
|
declare class Meaning_packageFunctionAccess {
|
|
51
|
-
readonly candidates: readonly
|
|
55
|
+
readonly candidates: readonly NotSubstitutedAccessedFunction[];
|
|
52
56
|
readonly suitableFunctions: readonly AccessedFunction[];
|
|
57
|
+
readonly singleNotSuitableSubstitutedCandidate: AccessedFunction | undefined;
|
|
53
58
|
readonly kind = "package-function-access";
|
|
54
59
|
get singleSuitableFunction(): AccessedFunction | undefined;
|
|
55
|
-
|
|
60
|
+
get singleFunction(): AccessedFunction | undefined;
|
|
61
|
+
constructor(candidates: readonly NotSubstitutedAccessedFunction[], suitableFunctions: readonly AccessedFunction[], singleNotSuitableSubstitutedCandidate: AccessedFunction | undefined);
|
|
56
62
|
}
|
|
57
63
|
declare class Meaning_packageTypeAccess {
|
|
58
64
|
readonly candidates: readonly PackageTypeEntity[];
|
|
@@ -61,6 +67,12 @@ declare class Meaning_packageTypeAccess {
|
|
|
61
67
|
get singleSuitableType(): types.Type | undefined;
|
|
62
68
|
constructor(candidates: readonly PackageTypeEntity[], suitableTypes: readonly types.Type[]);
|
|
63
69
|
}
|
|
70
|
+
declare class Meaning_constructorAccess {
|
|
71
|
+
readonly typeCandidates: readonly PackageTypeEntity[];
|
|
72
|
+
readonly callExpressionMeaning: callExpressionMeaning.Meaning_constructorCall;
|
|
73
|
+
readonly kind = "constructor-access";
|
|
74
|
+
constructor(typeCandidates: readonly PackageTypeEntity[], callExpressionMeaning: callExpressionMeaning.Meaning_constructorCall);
|
|
75
|
+
}
|
|
64
76
|
declare class Meaning_packageNameSegmentAccess {
|
|
65
77
|
readonly packageTreeNode: PackageNameTreeNode;
|
|
66
78
|
readonly kind = "package-name-segment-access";
|
|
@@ -75,11 +87,13 @@ declare class Meaning_staticFieldAccess {
|
|
|
75
87
|
}
|
|
76
88
|
declare class Meaning_staticMethodAccess {
|
|
77
89
|
readonly type: types.Type;
|
|
78
|
-
readonly candidates: readonly
|
|
90
|
+
readonly candidates: readonly NotSubstitutedAccessedFunction[];
|
|
79
91
|
readonly suitableFunctions: readonly AccessedFunction[];
|
|
92
|
+
readonly singleNotSuitableSubstitutedCandidate: AccessedFunction | undefined;
|
|
80
93
|
readonly kind = "static-method-access";
|
|
81
94
|
get singleSuitableFunction(): AccessedFunction | undefined;
|
|
82
|
-
|
|
95
|
+
get singleFunction(): AccessedFunction | undefined;
|
|
96
|
+
constructor(type: types.Type, candidates: readonly NotSubstitutedAccessedFunction[], suitableFunctions: readonly AccessedFunction[], singleNotSuitableSubstitutedCandidate: AccessedFunction | undefined);
|
|
83
97
|
}
|
|
84
98
|
declare class Meaning_instanceFieldAccess {
|
|
85
99
|
readonly field: types.Field;
|
|
@@ -88,17 +102,20 @@ declare class Meaning_instanceFieldAccess {
|
|
|
88
102
|
constructor(field: types.Field, accessKind: AccessKind);
|
|
89
103
|
}
|
|
90
104
|
declare class Meaning_instanceMethodAccess {
|
|
91
|
-
readonly candidates: readonly
|
|
105
|
+
readonly candidates: readonly NotSubstitutedAccessedFunction[];
|
|
92
106
|
readonly suitableFunctions: readonly AccessedFunction[];
|
|
107
|
+
readonly singleNotSuitableSubstitutedCandidate: AccessedFunction | undefined;
|
|
93
108
|
readonly kind = "instance-method-access";
|
|
94
109
|
get singleSuitableFunction(): AccessedFunction | undefined;
|
|
95
|
-
|
|
110
|
+
get singleFunction(): AccessedFunction | undefined;
|
|
111
|
+
constructor(candidates: readonly NotSubstitutedAccessedFunction[], suitableFunctions: readonly AccessedFunction[], singleNotSuitableSubstitutedCandidate: AccessedFunction | undefined);
|
|
96
112
|
}
|
|
97
113
|
declare class Meaning_operatorAccess {
|
|
98
114
|
readonly candidates: readonly types.Operator[];
|
|
99
115
|
readonly suitableOperators: readonly types.Operator[];
|
|
100
116
|
readonly kind = "operator-access";
|
|
101
117
|
get singleSuitableOperator(): types.Operator | undefined;
|
|
118
|
+
get singleOperator(): types.Operator | undefined;
|
|
102
119
|
constructor(candidates: readonly types.Operator[], suitableOperators: readonly types.Operator[]);
|
|
103
120
|
}
|
|
104
121
|
declare class Meaning_mixedAmbiguousAccess {
|
|
@@ -109,4 +126,36 @@ declare class Meaning_mixedAmbiguousAccess {
|
|
|
109
126
|
declare class Meaning_unresolved {
|
|
110
127
|
readonly kind = "unresolved";
|
|
111
128
|
}
|
|
129
|
+
export declare class FirstStageResolutionResult {
|
|
130
|
+
readonly meaning: MeaningStage1;
|
|
131
|
+
readonly diagnostics: readonly Diagnostic[] | undefined;
|
|
132
|
+
constructor(meaning: MeaningStage1, diagnostics?: Diagnostic | readonly Diagnostic[]);
|
|
133
|
+
}
|
|
134
|
+
export type MeaningStage1 = Meaning_packageVariableAccess | MeaningStage1_packageFunctionAccess | Meaning_packageTypeAccess | MeaningStage1_typeAccessAtCalleePosition | Meaning_packageNameSegmentAccess | Meaning_staticFieldAccess | MeaningStage1_staticMethodAccess | Meaning_instanceFieldAccess | MeaningStage1_instanceMethodAccess | MeaningStage1_operatorAccess | Meaning_mixedAmbiguousAccess | Meaning_unresolved;
|
|
135
|
+
declare class MeaningStage1_typeAccessAtCalleePosition {
|
|
136
|
+
readonly types: readonly PackageTypeEntity[];
|
|
137
|
+
readonly kind = "type-access-at-callee-position";
|
|
138
|
+
constructor(types: readonly PackageTypeEntity[]);
|
|
139
|
+
}
|
|
140
|
+
declare class MeaningStage1_packageFunctionAccess {
|
|
141
|
+
readonly functions: readonly NotSubstitutedAccessedFunction[];
|
|
142
|
+
readonly kind = "package-function-access";
|
|
143
|
+
constructor(functions: readonly NotSubstitutedAccessedFunction[]);
|
|
144
|
+
}
|
|
145
|
+
declare class MeaningStage1_staticMethodAccess {
|
|
146
|
+
readonly type: types.Type;
|
|
147
|
+
readonly functions: readonly NotSubstitutedAccessedFunction[];
|
|
148
|
+
readonly kind = "static-method-access";
|
|
149
|
+
constructor(type: types.Type, functions: readonly NotSubstitutedAccessedFunction[]);
|
|
150
|
+
}
|
|
151
|
+
declare class MeaningStage1_instanceMethodAccess {
|
|
152
|
+
readonly functions: readonly NotSubstitutedAccessedFunction[];
|
|
153
|
+
readonly kind = "instance-method-access";
|
|
154
|
+
constructor(functions: readonly NotSubstitutedAccessedFunction[]);
|
|
155
|
+
}
|
|
156
|
+
declare class MeaningStage1_operatorAccess {
|
|
157
|
+
readonly operators: readonly types.Operator[];
|
|
158
|
+
readonly kind = "operator-access";
|
|
159
|
+
constructor(operators: readonly types.Operator[]);
|
|
160
|
+
}
|
|
112
161
|
export {};
|
|
@@ -9,7 +9,6 @@ export declare class NamedTypeSpecifierResolver {
|
|
|
9
9
|
private readonly _node;
|
|
10
10
|
constructor(_analyzer: Analyzer, _node: NamedTypeSpecifier);
|
|
11
11
|
resolve(): NamedTypeSpecifierResolutionResult;
|
|
12
|
-
private resolveTypeOverload;
|
|
13
12
|
}
|
|
14
13
|
export declare class NamedTypeSpecifierResolutionResult {
|
|
15
14
|
readonly type: types.Type | undefined;
|
|
@@ -14,6 +14,7 @@ export declare class NodeTypeUtils {
|
|
|
14
14
|
static isVariantTypeDeclaration(node: tree.Node): node is VariantTypeDeclaration;
|
|
15
15
|
static isNullLiteral(node: tree.Node): boolean;
|
|
16
16
|
static isSubprogramDeclarationOrLiteral(node: tree.Node): node is SubprogramDeclarationOrLiteral;
|
|
17
|
+
static isRegularOrBlockFunctionLiteral(node: tree.Node): node is RegularOrBlockFunctionLiteral;
|
|
17
18
|
}
|
|
18
19
|
export type PackageTypeDeclaration = tree.PackageAliasTypeDeclaration | tree.PackageFunctionTypeDeclaration | tree.PackageStructuredTypeDeclaration | tree.PackageVariantTypeDeclaration;
|
|
19
20
|
export type StructuredTypeDeclaration = tree.PackageStructuredTypeDeclaration | tree.AnonymousStructuredTypeDeclaration;
|
|
@@ -37,6 +37,7 @@ declare class Meaning_ownConstructorAccess {
|
|
|
37
37
|
readonly suitableConstructors: readonly types.Constructor[];
|
|
38
38
|
readonly kind = "own-constructor-access";
|
|
39
39
|
get singleSuitableConstructor(): types.Constructor | undefined;
|
|
40
|
+
get singleConstructor(): types.Constructor | undefined;
|
|
40
41
|
constructor(
|
|
41
42
|
/**
|
|
42
43
|
* Тип объекта, получаемого в результате вызова конструктора.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DiagnosticAcceptorWithArgumentFactory } from '../diagnostic/Diagnostic.js';
|
|
2
|
+
import * as tree from '../tree/index.js';
|
|
3
|
+
import * as types from '../types/index.js';
|
|
4
|
+
import { Analyzer } from './Analyzer.js';
|
|
5
|
+
export declare class Resolver {
|
|
6
|
+
static resolveByCallExpression(analyzer: Analyzer, candidates: readonly types.Operator[], node: tree.CallExpression, diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined): readonly types.Operator[];
|
|
7
|
+
static resolveByTargetType(analyzer: Analyzer, candidates: readonly types.Operator[], targetType: types.Type | undefined, diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined, nodeForDiagnostic: tree.Node | undefined): readonly types.Operator[];
|
|
8
|
+
private static reportAmbiguousAccessDiagnostic;
|
|
9
|
+
}
|
|
@@ -1,12 +1,98 @@
|
|
|
1
|
-
import { Analyzer } from '../analysis/index.js';
|
|
1
|
+
import { Analyzer, ExpressionAnalysisOptions } from '../analysis/index.js';
|
|
2
|
+
import { Displayable, Name } from '../common/index.js';
|
|
3
|
+
import { DiagnosticAcceptorWithArgumentFactory, DiagnosticLocation } from '../diagnostic/Diagnostic.js';
|
|
4
|
+
import { TypeParameterEntity } from '../entities/index.js';
|
|
5
|
+
import * as tree from '../tree/index.js';
|
|
6
|
+
import * as types from '../types/index.js';
|
|
2
7
|
import * as matcher from './ArgumentsToParametersMatcher.js';
|
|
3
|
-
|
|
8
|
+
import { DiagnosticArgumentFactory } from './DiagnosticArgumentFactory.js';
|
|
9
|
+
import * as inferrer from './TypeArgumentInferrer.js';
|
|
10
|
+
export declare class OverloadResolver<TSignature extends ISignature<TParameter>, TParameter extends ISignatureParameter, TArgument extends Argument> {
|
|
4
11
|
private readonly _analyzer;
|
|
12
|
+
private readonly _mode;
|
|
5
13
|
private readonly _signatures;
|
|
6
14
|
private readonly _arguments;
|
|
7
|
-
|
|
8
|
-
|
|
15
|
+
private readonly _analysisOptions;
|
|
16
|
+
private readonly _dataForTypeArgumentInference;
|
|
17
|
+
private readonly _diagnostics;
|
|
18
|
+
private readonly _nodesForDiagnostic;
|
|
19
|
+
constructor(_analyzer: Analyzer, _mode: ResolutionMode, _signatures: readonly TSignature[], _arguments: readonly TArgument[], _analysisOptions: ExpressionAnalysisOptions, _dataForTypeArgumentInference: DataForTypeArgumentInference | undefined, _diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined, _nodesForDiagnostic: NodesForDiagnostic | undefined);
|
|
20
|
+
resolveOverload(): ProcessedSignature<TSignature, TParameter, TArgument>[];
|
|
21
|
+
private areArgumentTypesAssignableToParameterTypes;
|
|
9
22
|
private tryChooseBestSignature;
|
|
10
23
|
private chooseBetterTargetType;
|
|
11
|
-
private
|
|
24
|
+
private functionLiteralCouldBeAssignableToType;
|
|
25
|
+
private reportAmbiguousAccessDiagnostic;
|
|
12
26
|
}
|
|
27
|
+
export interface ISignature<TParameter extends ISignatureParameter> extends matcher.ISignature<TParameter> {
|
|
28
|
+
getTypeParameters(): readonly TypeParameterEntity[];
|
|
29
|
+
getParameters(): readonly TParameter[];
|
|
30
|
+
getReturnType(): types.Type | undefined;
|
|
31
|
+
getOuterSubstitutions(): types.Substitutions | undefined;
|
|
32
|
+
toDisplayable(factory: DiagnosticArgumentFactory): Displayable;
|
|
33
|
+
}
|
|
34
|
+
export interface ISignatureParameter extends matcher.ISignatureParameter {
|
|
35
|
+
getType(): types.Type;
|
|
36
|
+
getIndex(): number;
|
|
37
|
+
}
|
|
38
|
+
export type ResolutionMode = ResolutionByExplicitArguments | ResolutionByTargetType;
|
|
39
|
+
export declare class ResolutionByExplicitArguments {
|
|
40
|
+
readonly kind = "by-explicit-arguments";
|
|
41
|
+
}
|
|
42
|
+
export declare class ResolutionByTargetType {
|
|
43
|
+
readonly targetType: types.FunctionType;
|
|
44
|
+
readonly kind = "by-target-type";
|
|
45
|
+
constructor(targetType: types.FunctionType);
|
|
46
|
+
}
|
|
47
|
+
export type Argument = SourceArgument | IntrinsicArgument;
|
|
48
|
+
export interface SourceArgument extends matcher.IArgument, inferrer.SourceArgument, IArgument {
|
|
49
|
+
readonly kind: 'source';
|
|
50
|
+
readonly expression: tree.Expression;
|
|
51
|
+
}
|
|
52
|
+
export declare class IntrinsicArgument implements matcher.IArgument, inferrer.IntrinsicArgument, IArgument {
|
|
53
|
+
readonly kind = "intrinsic";
|
|
54
|
+
readonly type: types.Type;
|
|
55
|
+
get name(): Name | undefined;
|
|
56
|
+
constructor(type: types.Type);
|
|
57
|
+
getDiagnosticLocation(): DiagnosticLocation | undefined;
|
|
58
|
+
getType(_analysisOptions: ExpressionAnalysisOptions | undefined): types.Type;
|
|
59
|
+
}
|
|
60
|
+
interface IArgument {
|
|
61
|
+
getType(analysisOptions: ExpressionAnalysisOptions | undefined): types.Type;
|
|
62
|
+
}
|
|
63
|
+
export declare class SourceNodeArgument implements SourceArgument {
|
|
64
|
+
readonly kind = "source";
|
|
65
|
+
readonly node: tree.Argument;
|
|
66
|
+
readonly name: Name | undefined;
|
|
67
|
+
private readonly _analyzer;
|
|
68
|
+
get expression(): tree.Expression;
|
|
69
|
+
constructor(analyzer: Analyzer, node: tree.Argument);
|
|
70
|
+
getDiagnosticLocation(): DiagnosticLocation;
|
|
71
|
+
getType(analysisOptions: ExpressionAnalysisOptions | undefined): types.Type;
|
|
72
|
+
}
|
|
73
|
+
export declare class SourceExpressionArgument implements SourceArgument {
|
|
74
|
+
private readonly _analyzer;
|
|
75
|
+
readonly expression: tree.Expression;
|
|
76
|
+
readonly kind = "source";
|
|
77
|
+
get name(): Name | undefined;
|
|
78
|
+
constructor(_analyzer: Analyzer, expression: tree.Expression);
|
|
79
|
+
getDiagnosticLocation(): DiagnosticLocation;
|
|
80
|
+
getType(analysisOptions: ExpressionAnalysisOptions | undefined): types.Type;
|
|
81
|
+
}
|
|
82
|
+
export declare class DataForTypeArgumentInference {
|
|
83
|
+
readonly specifiedTypeArguments: readonly types.Type[];
|
|
84
|
+
readonly targetType: types.Type | undefined;
|
|
85
|
+
constructor(specifiedTypeArguments: readonly types.Type[], targetType: types.Type | undefined);
|
|
86
|
+
}
|
|
87
|
+
export interface NodesForDiagnostic {
|
|
88
|
+
readonly accessNode: tree.Node | undefined;
|
|
89
|
+
readonly typeArgumentClause: tree.Node | undefined;
|
|
90
|
+
readonly argumentList: tree.Node | undefined;
|
|
91
|
+
}
|
|
92
|
+
export interface ProcessedSignature<TSignature extends ISignature<TParameter>, TParameter extends ISignatureParameter, TArgument extends matcher.IArgument> {
|
|
93
|
+
readonly value: TSignature;
|
|
94
|
+
readonly matchResult: matcher.MatchResult<TParameter, TArgument>;
|
|
95
|
+
readonly typeArguments: readonly types.Type[] | undefined;
|
|
96
|
+
readonly isMatching: boolean;
|
|
97
|
+
}
|
|
98
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Analyzer } from './Analyzer.js';
|
|
2
|
+
import * as tree from '../tree/index.js';
|
|
3
|
+
import { LocalVariableEntity } from '../entities/VariableEntity.js';
|
|
4
|
+
import * as types from '../types/index.js';
|
|
5
|
+
export declare class ReturnTypeInferrer {
|
|
6
|
+
private readonly _analyzer;
|
|
7
|
+
private readonly _block;
|
|
8
|
+
private readonly _resultVariable;
|
|
9
|
+
constructor(_analyzer: Analyzer, _block: tree.FunctionBlock, _resultVariable: LocalVariableEntity);
|
|
10
|
+
infer(): types.Type;
|
|
11
|
+
private checkResultVariableIsUsedAndCollectReturnedTypes;
|
|
12
|
+
private getTypeOfResultVariableAtTheEndOfSubprogram;
|
|
13
|
+
}
|
|
@@ -3,6 +3,8 @@ import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
|
|
|
3
3
|
import { PackageAliasEntity, PackageFunctionEntity, PackageTypeEntity, PackageVariableEntity, TypeExtensionEntity } from '../entities/index.js';
|
|
4
4
|
import { Analyzer } from './Analyzer.js';
|
|
5
5
|
export declare class SourceFileMembers {
|
|
6
|
+
private static readonly _emptyNamedMembers;
|
|
7
|
+
private static readonly _emptyPackageAliases;
|
|
6
8
|
private readonly _analyzer;
|
|
7
9
|
private readonly _namedMembers;
|
|
8
10
|
private readonly _typeExtensions;
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import { Name } from '../common/index.js';
|
|
2
|
-
import { FunctionEntity,
|
|
2
|
+
import { FunctionEntity, PackageOrNestedFunctionEntity } from '../entities/index.js';
|
|
3
3
|
import * as types from '../types/index.js';
|
|
4
|
+
import { AccessedFunctionValueParameter } from './AccessedFunction.js';
|
|
5
|
+
import { Analyzer } from './Analyzer.js';
|
|
4
6
|
export type SubstitutedFunction = SubstitutedFunction_entity | SubstitutedFunction_typeMember;
|
|
5
7
|
export declare class SubstitutedFunction_entity implements ISubstitutedFunction {
|
|
6
|
-
readonly entity:
|
|
7
|
-
readonly entitySignatureType: types.FunctionType;
|
|
8
|
+
readonly entity: PackageOrNestedFunctionEntity;
|
|
8
9
|
readonly substitutions: types.Substitutions;
|
|
9
10
|
readonly kind = "entity";
|
|
10
11
|
private readonly _signatureType;
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
private readonly _valueParameters;
|
|
13
|
+
get debuggerDisplay(): string;
|
|
14
|
+
constructor(entity: PackageOrNestedFunctionEntity, substitutions: types.Substitutions);
|
|
15
|
+
getEntity(): PackageOrNestedFunctionEntity;
|
|
13
16
|
getName(): Name;
|
|
14
|
-
getSignatureType(): types.FunctionType;
|
|
17
|
+
getSignatureType(analyzer: Analyzer): types.FunctionType;
|
|
15
18
|
getSubstitutions(): types.Substitutions;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}[];
|
|
19
|
+
getOuterSubstitutions(): types.Substitutions | undefined;
|
|
20
|
+
getValueParameters(): readonly AccessedFunctionValueParameter[];
|
|
21
|
+
getReturnType(): types.Type;
|
|
20
22
|
isAsync(): boolean;
|
|
21
23
|
}
|
|
22
24
|
export declare class SubstitutedFunction_typeMember implements ISubstitutedFunction {
|
|
@@ -24,26 +26,26 @@ export declare class SubstitutedFunction_typeMember implements ISubstitutedFunct
|
|
|
24
26
|
readonly substitutions: types.Substitutions;
|
|
25
27
|
readonly kind = "type-member";
|
|
26
28
|
private readonly _signatureType;
|
|
29
|
+
private readonly _valueParameters;
|
|
30
|
+
get debuggerDisplay(): string;
|
|
27
31
|
constructor(method: types.Method, substitutions: types.Substitutions);
|
|
28
32
|
getEntity(): FunctionEntity;
|
|
29
33
|
getName(): Name;
|
|
30
|
-
getSignatureType(): types.FunctionType;
|
|
34
|
+
getSignatureType(analyzer: Analyzer): types.FunctionType;
|
|
31
35
|
getSubstitutions(): types.Substitutions;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}[];
|
|
36
|
+
getOuterSubstitutions(): types.Substitutions | undefined;
|
|
37
|
+
getValueParameters(): readonly AccessedFunctionValueParameter[];
|
|
38
|
+
getReturnType(): types.Type;
|
|
36
39
|
isAsync(): boolean;
|
|
37
40
|
}
|
|
38
41
|
interface ISubstitutedFunction {
|
|
39
42
|
getEntity(): FunctionEntity;
|
|
40
43
|
getName(): Name;
|
|
41
|
-
getSignatureType(): types.FunctionType;
|
|
44
|
+
getSignatureType(analyzer: Analyzer): types.FunctionType;
|
|
42
45
|
getSubstitutions(): types.Substitutions;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}[];
|
|
46
|
+
getOuterSubstitutions(): types.Substitutions | undefined;
|
|
47
|
+
getValueParameters(): readonly AccessedFunctionValueParameter[];
|
|
48
|
+
getReturnType(): types.Type;
|
|
47
49
|
isAsync(): boolean;
|
|
48
50
|
}
|
|
49
51
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
|
2
|
-
import {
|
|
2
|
+
import { NamedTypeEntity, PackageAliasEntity } from '../entities/index.js';
|
|
3
3
|
import { Tag } from '../tree/index.js';
|
|
4
4
|
import * as types from '../types/index.js';
|
|
5
|
-
import { AccessedFunction } from './AccessedFunction.js';
|
|
5
|
+
import { AccessedFunction, NotSubstitutedAccessedFunction } from './AccessedFunction.js';
|
|
6
6
|
import { PackageNameTreeNode } from './ImportedPackageNameTree.js';
|
|
7
7
|
import { Analyzer } from './index.js';
|
|
8
8
|
import { EntityOrPackageNameTreeNode } from './Utils.js';
|
|
@@ -15,34 +15,35 @@ export declare class Resolver {
|
|
|
15
15
|
resolve(): ResolutionResult;
|
|
16
16
|
private resolveNameInScope;
|
|
17
17
|
private resolveNameInPackage;
|
|
18
|
-
private resolveTypeOverload;
|
|
19
18
|
private resolveTagType;
|
|
20
19
|
private resolveTagFunction;
|
|
21
|
-
private createAccessedFunction;
|
|
22
|
-
private resolveFunctionOverload;
|
|
23
20
|
}
|
|
24
21
|
export declare class ResolutionResult {
|
|
25
22
|
readonly meaning: Meaning;
|
|
26
23
|
readonly resolvedQualifiers: readonly ResolvedQualifier[];
|
|
27
|
-
readonly
|
|
28
|
-
readonly ambiguousDeclarations?: readonly EntityOrPackageNameTreeNode[]
|
|
29
|
-
constructor(meaning: Meaning, resolvedQualifiers: readonly ResolvedQualifier[],
|
|
24
|
+
readonly diagnostics?: readonly Diagnostic[];
|
|
25
|
+
readonly ambiguousDeclarations?: readonly EntityOrPackageNameTreeNode[];
|
|
26
|
+
constructor(meaning: Meaning, resolvedQualifiers: readonly ResolvedQualifier[], diagnostics?: (readonly Diagnostic[]) | Diagnostic, ambiguousDeclarations?: readonly EntityOrPackageNameTreeNode[]);
|
|
30
27
|
}
|
|
31
28
|
export type Meaning = Meaning_tagType | Meaning_tagFunction | Meaning_unresolved;
|
|
32
29
|
declare class Meaning_tagType {
|
|
33
30
|
readonly type: types.Type;
|
|
34
31
|
readonly candidates: readonly types.Constructor[];
|
|
35
32
|
readonly suitableConstructors: readonly types.Constructor[];
|
|
33
|
+
readonly singleNotSuitableSubstitutedCandidate: types.Constructor | undefined;
|
|
36
34
|
readonly kind = "tag-type";
|
|
37
35
|
get singleSuitableConstructor(): types.Constructor | undefined;
|
|
38
|
-
|
|
36
|
+
get singleConstructor(): types.Constructor | undefined;
|
|
37
|
+
constructor(type: types.Type, candidates: readonly types.Constructor[], suitableConstructors: readonly types.Constructor[], singleNotSuitableSubstitutedCandidate: types.Constructor | undefined);
|
|
39
38
|
}
|
|
40
39
|
declare class Meaning_tagFunction {
|
|
41
|
-
readonly candidates: readonly
|
|
40
|
+
readonly candidates: readonly NotSubstitutedAccessedFunction[];
|
|
42
41
|
readonly suitableFunctions: readonly AccessedFunction[];
|
|
42
|
+
readonly singleNotSuitableSubstitutedCandidate: AccessedFunction | undefined;
|
|
43
43
|
readonly kind = "tag-function";
|
|
44
44
|
get singleSuitableFunction(): AccessedFunction | undefined;
|
|
45
|
-
|
|
45
|
+
get singleFunction(): AccessedFunction | undefined;
|
|
46
|
+
constructor(candidates: readonly NotSubstitutedAccessedFunction[], suitableFunctions: readonly AccessedFunction[], singleNotSuitableSubstitutedCandidate: AccessedFunction | undefined);
|
|
46
47
|
}
|
|
47
48
|
declare class Meaning_unresolved {
|
|
48
49
|
readonly kind = "unresolved";
|
|
@@ -66,10 +67,10 @@ export declare class ResolvedQualifier_type {
|
|
|
66
67
|
constructor(candidates: readonly NamedTypeEntity[], suitableTypes: readonly NamedTypeEntity[]);
|
|
67
68
|
}
|
|
68
69
|
export declare class ResolvedQualifier_function {
|
|
69
|
-
readonly candidates: readonly
|
|
70
|
-
readonly suitableFunctions: readonly
|
|
70
|
+
readonly candidates: readonly NotSubstitutedAccessedFunction[];
|
|
71
|
+
readonly suitableFunctions: readonly AccessedFunction[];
|
|
71
72
|
readonly kind = "function";
|
|
72
|
-
get singleSuitableFunction():
|
|
73
|
-
constructor(candidates: readonly
|
|
73
|
+
get singleSuitableFunction(): AccessedFunction | undefined;
|
|
74
|
+
constructor(candidates: readonly NotSubstitutedAccessedFunction[], suitableFunctions: readonly AccessedFunction[]);
|
|
74
75
|
}
|
|
75
76
|
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { TypeParameterEntity } from '../entities/index.js';
|
|
2
|
+
import * as tree from '../tree/index.js';
|
|
3
|
+
import * as types from '../types/index.js';
|
|
4
|
+
import { Analyzer, ExpressionAnalysisOptions } from './Analyzer.js';
|
|
5
|
+
export type Argument = SourceArgument | IntrinsicArgument;
|
|
6
|
+
export interface SourceArgument {
|
|
7
|
+
readonly kind: 'source';
|
|
8
|
+
readonly expression: tree.Expression;
|
|
9
|
+
}
|
|
10
|
+
export interface IntrinsicArgument {
|
|
11
|
+
readonly kind: 'intrinsic';
|
|
12
|
+
readonly type: types.Type;
|
|
13
|
+
}
|
|
14
|
+
export declare class ArgumentWithTargetParameterInfo {
|
|
15
|
+
readonly value: Argument;
|
|
16
|
+
readonly parameterType: types.Type;
|
|
17
|
+
constructor(value: Argument, parameterType: types.Type);
|
|
18
|
+
}
|
|
19
|
+
export declare class TypeArgumentInferrer {
|
|
20
|
+
private readonly _analyzer;
|
|
21
|
+
private readonly _typeParameters;
|
|
22
|
+
private readonly _arguments;
|
|
23
|
+
private readonly _analysisOptions;
|
|
24
|
+
private readonly _returnType;
|
|
25
|
+
private readonly _outerSubstitutions;
|
|
26
|
+
private readonly _inferenceStates;
|
|
27
|
+
/**
|
|
28
|
+
* Специальный экземпляр типа, который используется как признак того, что вывод аргументов типа не удался.
|
|
29
|
+
*/
|
|
30
|
+
private readonly _unresolvedType;
|
|
31
|
+
private _inferenceHasFailed;
|
|
32
|
+
constructor(analyzer: Analyzer, typeParameters: readonly TypeParameterEntity[], args: readonly ArgumentWithTargetParameterInfo[], analysisOptions: ExpressionAnalysisOptions, returnType: types.Type | undefined, outerTypeSubstitutions: types.Substitutions | undefined);
|
|
33
|
+
infer(): readonly types.Type[] | undefined;
|
|
34
|
+
private inferFirstStage;
|
|
35
|
+
private inferSecondStage;
|
|
36
|
+
private inferFromTypes;
|
|
37
|
+
private inferToParameterType;
|
|
38
|
+
private inferToStructuredType;
|
|
39
|
+
private inferFromSubstitutions;
|
|
40
|
+
private inferToUnionType;
|
|
41
|
+
private inferFromFunctionTypes;
|
|
42
|
+
private createSubstitutions;
|
|
43
|
+
private inferFromTargetTypeDependentExpression;
|
|
44
|
+
private tryGetInferredType;
|
|
45
|
+
private tryFixTypeParametersContainedByTypesOfFunctionParameters;
|
|
46
|
+
private typeContainsTypeParameter;
|
|
47
|
+
private substitutionsContainTypeParameter;
|
|
48
|
+
private isDefinitelyTargetTypeDependentExpression;
|
|
49
|
+
}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
+
import { PackageLocale } from '../common/index.js';
|
|
1
2
|
import * as types from '../types/index.js';
|
|
2
3
|
import { Analyzer } from './Analyzer.js';
|
|
3
4
|
import * as controlFlow from './control-flow/index.js';
|
|
5
|
+
import { NarrowableReference } from './control-flow/index.js';
|
|
4
6
|
export declare class TypeNarrower {
|
|
5
7
|
private readonly _analyzer;
|
|
6
|
-
private readonly
|
|
8
|
+
private readonly _reference;
|
|
7
9
|
private readonly _initialType;
|
|
10
|
+
private readonly _locale;
|
|
8
11
|
private readonly _controlFlowNode;
|
|
9
|
-
private _reference;
|
|
10
12
|
private readonly _typeByNode;
|
|
11
13
|
private readonly _isVariableAssignedInLoopCheckResults;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
constructor(analyzer: Analyzer, reference: NarrowableReference, locale: PackageLocale, initialType: types.Type, controlFlowNode: controlFlow.Node);
|
|
15
|
+
static getTypeOfExpression(analyzer: Analyzer, referenceExpression: controlFlow.NarrowableReferenceExpression, initialType: types.Type, controlFlowNode: controlFlow.Node): types.Type;
|
|
14
16
|
getType(): types.Type;
|
|
15
17
|
private getTypeAtControlFlowNode;
|
|
16
18
|
private getTypeAtCondition;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { NamedTypeEntity } from '../entities/index.js';
|
|
2
|
+
export declare class Resolver {
|
|
3
|
+
static resolve<TCandidate extends ICandidate>(candidates: readonly TCandidate[], argumentCount: number): readonly TCandidate[];
|
|
4
|
+
static resolveByNamedTypeEntities<T extends NamedTypeEntity>(candidates: readonly T[], argumentCount: number): readonly T[];
|
|
3
5
|
}
|
|
4
6
|
export interface ICandidate {
|
|
5
7
|
getParameterCount(): number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WithDiagnostics } from '../common/index.js';
|
|
2
2
|
import { BinaryOperatorKind } from '../entities/OperatorKind.js';
|
|
3
|
-
import
|
|
3
|
+
import * as tree from '../tree/index.js';
|
|
4
4
|
import * as types from '../types/index.js';
|
|
5
5
|
import { Analyzer } from './index.js';
|
|
6
6
|
/**
|
|
@@ -26,11 +26,7 @@ export declare class UserDefinableBinaryOperatorResolver {
|
|
|
26
26
|
private readonly _right;
|
|
27
27
|
private readonly _operatorKind;
|
|
28
28
|
private readonly _operatorNodeForDiagnostic;
|
|
29
|
-
|
|
30
|
-
private readonly _rightType;
|
|
31
|
-
private get leftType();
|
|
32
|
-
private get rightType();
|
|
33
|
-
constructor(_analyzer: Analyzer, _left: Expression, _right: Expression, _operatorKind: BinaryOperatorKind, _operatorNodeForDiagnostic: Node);
|
|
29
|
+
constructor(_analyzer: Analyzer, _left: tree.Expression, _right: tree.Expression, _operatorKind: BinaryOperatorKind, _operatorNodeForDiagnostic: tree.Node);
|
|
34
30
|
resolve(): WithDiagnostics<types.Operator>;
|
|
35
31
|
private chooseSuitableOperators;
|
|
36
32
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WithDiagnostics } from '../common/index.js';
|
|
2
|
-
import
|
|
2
|
+
import * as tree from '../tree/index.js';
|
|
3
3
|
import * as types from '../types/index.js';
|
|
4
4
|
import { Analyzer } from './index.js';
|
|
5
5
|
/**
|
|
@@ -17,6 +17,6 @@ export declare class UserDefinableUnaryOperatorResolver {
|
|
|
17
17
|
private readonly _analyzer;
|
|
18
18
|
private readonly _node;
|
|
19
19
|
private get operatorKind();
|
|
20
|
-
constructor(_analyzer: Analyzer, _node: PrefixUnaryExpression);
|
|
20
|
+
constructor(_analyzer: Analyzer, _node: tree.PrefixUnaryExpression);
|
|
21
21
|
resolve(): WithDiagnostics<types.Operator>;
|
|
22
22
|
}
|
|
@@ -7,6 +7,8 @@ type TextToken = tree.Token<tree.TokenKind.TextLiteral> | tree.Token<tree.TokenK
|
|
|
7
7
|
export declare function getUnescapedTextFromTextToken(token: TextToken): string;
|
|
8
8
|
export declare function unwrapParenthesizedExpressions(expression: tree.Expression): tree.Expression;
|
|
9
9
|
export declare function getParentSkippingParenthesizedExpressions(expression: tree.Expression): tree.ExpressionParent;
|
|
10
|
+
export declare function getParentGenericSpecializationExpression(expression: tree.Expression): tree.GenericSpecializationExpression | undefined;
|
|
11
|
+
export declare function getGenericSpecializationExpressionOfCallee(callee: tree.Expression): tree.GenericSpecializationExpression | undefined;
|
|
10
12
|
export declare function unaliasType(type: types.Type): types.Type;
|
|
11
13
|
export declare function unaliasType(type: types.Type | undefined): types.Type | undefined;
|
|
12
14
|
export declare function getPackageContainingEntity(entity: Entity): PackageEntity;
|
|
@@ -2,6 +2,6 @@ import { Node, SourceFile } from '../tree/index.js';
|
|
|
2
2
|
type ChildNodeVisitor = (syntaxNode: VisitedChildNode) => void;
|
|
3
3
|
export type VisitedNode = Node;
|
|
4
4
|
export type VisitedChildNode = Exclude<Node, SourceFile>;
|
|
5
|
-
export declare function visitChildren(node: VisitedNode, visitChildCb: ChildNodeVisitor): void;
|
|
6
|
-
export declare function visitChildrenRecursively(node: VisitedNode, visitChildCb: ChildNodeVisitor): void;
|
|
5
|
+
export declare function visitChildren(node: VisitedNode, visitTokens: boolean, visitChildCb: ChildNodeVisitor): void;
|
|
6
|
+
export declare function visitChildrenRecursively(node: VisitedNode, visitTokens: boolean, visitChildCb: ChildNodeVisitor): void;
|
|
7
7
|
export {};
|
|
@@ -3,8 +3,6 @@ export * from './ArgumentsToParametersMatcher.js';
|
|
|
3
3
|
export * from './DeclarationsUsageCounter.js';
|
|
4
4
|
export * from './DiagnosticCollector.js';
|
|
5
5
|
export * from './FindModifier.js';
|
|
6
|
-
export * from './OverloadResolver.js';
|
|
7
6
|
export * from './SourcePackageDependencyGraph.js';
|
|
8
|
-
export * from './TargetTypeHint.js';
|
|
9
7
|
export * from './Visitor.js';
|
|
10
8
|
export * from './WellKnownDeclarations.js';
|