@artel/artc 0.6.25254 → 0.6.25255
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 -6
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +568 -365
- package/build/{chunk-JTDPRR7O.js → chunk-R2AFVF7W.js} +2 -2
- package/build/{chunk-JV2EK6MS.js → chunk-SSG7MY2R.js} +1 -1
- package/build/{chunk-3JS4YG6N.js → chunk-Y23FSWAN.js} +13016 -14906
- package/build/types/analysis/AccessedFunction.d.ts +11 -5
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +2 -1
- package/build/types/analysis/Analyzer.d.ts +116 -40
- 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 +12 -6
- 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/DiagnosticCollector.d.ts +5 -9
- 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/SubstitutedFunction.d.ts +10 -4
- 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/index.d.ts +0 -2
- package/build/types/analysis/semantic-context/Declarations.d.ts +4 -4
- 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 +3 -2
- package/build/types/common/Cached.d.ts +2 -0
- package/build/types/common/Query.d.ts +1 -1
- package/build/types/common/TreeQuery.d.ts +1 -2
- 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/StructuredTypeEntity.d.ts +1 -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 +2 -1
- 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/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 +26 -0
- package/build/types/tree/{green/Nodes.d.ts → Nodes.d.ts} +408 -356
- 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 +2 -2
- 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 +2 -2
- package/build/types/types/Type.d.ts +3 -3
- package/build/types/types/TypeMembers.d.ts +1 -0
- package/build/types/types/UnionType.d.ts +2 -2
- package/build/types/types/UnresolvedType.d.ts +2 -2
- package/build/types/types/VariantType.d.ts +2 -2
- package/package.json +1 -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/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
|
@@ -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
|
+
}
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import { Name } from '../common/index.js';
|
|
2
|
-
import { FunctionEntity, ParameterVariableEntity } from '../entities/index.js';
|
|
2
|
+
import { FunctionEntity, PackageOrNestedFunctionEntity, ParameterVariableEntity } from '../entities/index.js';
|
|
3
3
|
import * as types from '../types/index.js';
|
|
4
4
|
export type SubstitutedFunction = SubstitutedFunction_entity | SubstitutedFunction_typeMember;
|
|
5
5
|
export declare class SubstitutedFunction_entity implements ISubstitutedFunction {
|
|
6
|
-
readonly entity:
|
|
6
|
+
readonly entity: PackageOrNestedFunctionEntity;
|
|
7
7
|
readonly entitySignatureType: types.FunctionType;
|
|
8
8
|
readonly substitutions: types.Substitutions;
|
|
9
9
|
readonly kind = "entity";
|
|
10
10
|
private readonly _signatureType;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
get debuggerDisplay(): string;
|
|
12
|
+
constructor(entity: PackageOrNestedFunctionEntity, entitySignatureType: types.FunctionType, substitutions: types.Substitutions);
|
|
13
|
+
getEntity(): PackageOrNestedFunctionEntity;
|
|
13
14
|
getName(): Name;
|
|
14
15
|
getSignatureType(): types.FunctionType;
|
|
15
16
|
getSubstitutions(): types.Substitutions;
|
|
17
|
+
getCombinedSubstitutions(): types.Substitutions;
|
|
16
18
|
getValueParameters(): readonly {
|
|
17
19
|
entity: ParameterVariableEntity;
|
|
18
20
|
type: types.Type;
|
|
@@ -24,11 +26,14 @@ 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 _combinedSubstitutions;
|
|
30
|
+
get debuggerDisplay(): string;
|
|
27
31
|
constructor(method: types.Method, substitutions: types.Substitutions);
|
|
28
32
|
getEntity(): FunctionEntity;
|
|
29
33
|
getName(): Name;
|
|
30
34
|
getSignatureType(): types.FunctionType;
|
|
31
35
|
getSubstitutions(): types.Substitutions;
|
|
36
|
+
getCombinedSubstitutions(): types.Substitutions;
|
|
32
37
|
getValueParameters(): readonly {
|
|
33
38
|
entity: ParameterVariableEntity;
|
|
34
39
|
type: types.Type;
|
|
@@ -40,6 +45,7 @@ interface ISubstitutedFunction {
|
|
|
40
45
|
getName(): Name;
|
|
41
46
|
getSignatureType(): types.FunctionType;
|
|
42
47
|
getSubstitutions(): types.Substitutions;
|
|
48
|
+
getCombinedSubstitutions(): types.Substitutions;
|
|
43
49
|
getValueParameters(): readonly {
|
|
44
50
|
entity: ParameterVariableEntity;
|
|
45
51
|
type: types.Type;
|
|
@@ -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, InferenceOptions } 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 _inferenceOptions;
|
|
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[], inferenceOptions: InferenceOptions, 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;
|
|
@@ -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';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Name } from '../../common/index.js';
|
|
2
|
-
import { EntityHidingLevel, FunctionEntity, NamedTypeEntity, PackageAliasEntity, VariableEntity } from '../../entities/index.js';
|
|
2
|
+
import { EntityHidingLevel, FunctionEntity, NamedTypeEntity, PackageAliasEntity, PackageOrNestedFunctionEntity, VariableEntity } from '../../entities/index.js';
|
|
3
3
|
import * as types from '../../types/index.js';
|
|
4
4
|
import { PackageNameTreeNode } from '../ImportedPackageNameTree.js';
|
|
5
5
|
export type TypeOrContainerWithTypes = NamedDeclaration_type | NamedDeclaration_packageAlias | NamedDeclaration_packageNameSegment;
|
|
@@ -15,10 +15,10 @@ export type NamedDeclarationFunction = NamedDeclarationFunction_entity | NamedDe
|
|
|
15
15
|
export declare class NamedDeclarationFunction_entity implements INamedDeclarationFunction {
|
|
16
16
|
readonly kind = "entity";
|
|
17
17
|
private readonly _valueParameters;
|
|
18
|
-
readonly value:
|
|
19
|
-
constructor(value:
|
|
18
|
+
readonly value: PackageOrNestedFunctionEntity;
|
|
19
|
+
constructor(value: PackageOrNestedFunctionEntity);
|
|
20
20
|
getName(): Name;
|
|
21
|
-
getEntity():
|
|
21
|
+
getEntity(): PackageOrNestedFunctionEntity;
|
|
22
22
|
getTypeParameterArity(): number;
|
|
23
23
|
isHidden(): EntityHidingLevel | undefined;
|
|
24
24
|
getValueParameters(): readonly ValueParameter[];
|
|
@@ -81,6 +81,7 @@ export declare class SemanticContextBuilder {
|
|
|
81
81
|
private ofIndexedElementGetterDeclarationChild;
|
|
82
82
|
private ofIndexedElementSetterDeclarationChild;
|
|
83
83
|
private ofChildOfTypeExtensionDeclaration;
|
|
84
|
+
private isOffsetInsideNode;
|
|
84
85
|
private isOffsetBetweenNodes;
|
|
85
86
|
private isOffsetInsideStatementBlock;
|
|
86
87
|
private isOffsetInsideFunctionBlock;
|
package/build/types/api/Api.d.ts
CHANGED
|
@@ -22,7 +22,6 @@ export * from '../analysis/SourcePackageDependencyGraph.js';
|
|
|
22
22
|
export * from '../analysis/SubstitutedFunction.js';
|
|
23
23
|
export type { Meaning as TagMeaning } from '../analysis/TagMeaning.js';
|
|
24
24
|
export * from '../analysis/Tags.js';
|
|
25
|
-
export * from '../analysis/TargetTypeHint.js';
|
|
26
25
|
export * from '../analysis/TypeMemberLookup.js';
|
|
27
26
|
export * from '../analysis/Utils.js';
|
|
28
27
|
export * from '../analysis/Visitor.js';
|
|
@@ -43,7 +42,6 @@ export * from '../parser/Scanner.js';
|
|
|
43
42
|
export { TokenKind as ScannerTokenKind } from '../parser/TokenKind.js';
|
|
44
43
|
export * from '../parser/UnescapeText.js';
|
|
45
44
|
export * from '../project/index.js';
|
|
46
|
-
export * as green from '../tree/green/index.js';
|
|
47
45
|
export * as tree from '../tree/index.js';
|
|
48
46
|
export * from '../ts-interop/TsLibrariesProvider.js';
|
|
49
47
|
export * from '../ts-interop/Utils.js';
|
|
@@ -5,8 +5,9 @@ export declare class ArrayUtils {
|
|
|
5
5
|
* Работает быстрее, чем `array.splice(index, 1)`, и не выделяет память для массива удалённых элементов.
|
|
6
6
|
*/
|
|
7
7
|
static removeElement<T>(array: T[], index: number): void;
|
|
8
|
-
static pushElementIfUniqueComparingWithEquals<T extends WithEqualsMethod<T>>(array: T[], element: T): boolean;
|
|
9
|
-
static pushElementsIfUniqueComparingWithEquals<T extends WithEqualsMethod<T>>(array: T[], elements: readonly T[]): void;
|
|
8
|
+
static pushElementIfUniqueComparingWithEquals<T extends WithEqualsMethod<T>>(array: T[] | undefined, element: T): boolean;
|
|
9
|
+
static pushElementsIfUniqueComparingWithEquals<T extends WithEqualsMethod<T>>(array: T[] | undefined, elements: readonly T[]): void;
|
|
10
|
+
static count<T>(array: readonly T[], cb: (v: T) => boolean): number;
|
|
10
11
|
}
|
|
11
12
|
export type WithEqualsMethod<T> = {
|
|
12
13
|
equals(t: T): boolean;
|
|
@@ -5,7 +5,7 @@ export declare abstract class Query<T> implements Iterable<T> {
|
|
|
5
5
|
static empty<T>(): Query<T>;
|
|
6
6
|
static ofSuccessors<T>(first: T, next: (t: T) => T | undefined): Query<T>;
|
|
7
7
|
abstract [Symbol.iterator](): Iterator<T, void, undefined>;
|
|
8
|
-
map<K>(fn: (t: T) => K): Query<K>;
|
|
8
|
+
map<K>(fn: (t: T, i: number) => K): Query<K>;
|
|
9
9
|
forEach(fn: (t: T) => void): void;
|
|
10
10
|
exhaust(): void;
|
|
11
11
|
last(): T | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Analyzer } from '../analysis/index.js';
|
|
2
2
|
import { StructuredTypeDeclaration, TypeWithMembersDeclaration, VariantTypeDeclaration } from '../analysis/NodeTypeUtils.js';
|
|
3
|
-
import {
|
|
3
|
+
import { PackageEntity, TypeEntity, TypeEntityWithMembers } from '../entities/index.js';
|
|
4
4
|
import { SourceFile } from '../project/index.js';
|
|
5
5
|
import * as tree from '../tree/index.js';
|
|
6
6
|
import { PackageLocale } from './PackageLocale.js';
|
|
@@ -12,7 +12,6 @@ export declare abstract class TreeQuery {
|
|
|
12
12
|
projectSourceFile(analyzer: Analyzer): SourceFile;
|
|
13
13
|
packageEntity(analyzer: Analyzer): PackageEntity;
|
|
14
14
|
locale(analyzer: Analyzer): PackageLocale;
|
|
15
|
-
containingEntity(analyzer: Analyzer): Entity;
|
|
16
15
|
}
|
|
17
16
|
declare class NodeQuery extends TreeQuery {
|
|
18
17
|
private readonly _node;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DiagnosticArgumentFactory } from '../analysis/DiagnosticArgumentFactory.js';
|
|
1
2
|
import { Range } from '../common/index.js';
|
|
2
3
|
import { TextFile } from '../project/TextFile.js';
|
|
3
4
|
import { DiagnosticData } from './DiagnosticData.js';
|
|
@@ -14,6 +15,12 @@ export declare class DiagnosticLocation {
|
|
|
14
15
|
export interface DiagnosticAcceptor {
|
|
15
16
|
addDiagnostic(diagnostic: Diagnostic): void;
|
|
16
17
|
}
|
|
18
|
+
export declare class DiagnosticAcceptorWithArgumentFactory implements DiagnosticAcceptor {
|
|
19
|
+
readonly diagnosticAcceptor: DiagnosticAcceptor;
|
|
20
|
+
readonly argumentFactory: DiagnosticArgumentFactory;
|
|
21
|
+
constructor(diagnosticAcceptor: DiagnosticAcceptor, argumentFactory: DiagnosticArgumentFactory);
|
|
22
|
+
addDiagnostic(diagnostic: Diagnostic): void;
|
|
23
|
+
}
|
|
17
24
|
export declare class AccumulatingDiagnosticAcceptor implements DiagnosticAcceptor {
|
|
18
25
|
readonly items: Diagnostic[];
|
|
19
26
|
constructor(items?: Diagnostic[]);
|