@artel/artc 0.6.25216 → 0.6.25218
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 -50
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +1056 -1060
- package/build/{chunk-6RYP5SET.js → chunk-FI6LW2RD.js} +5 -4
- package/build/{chunk-TJG64G2K.js → chunk-SK7ZBC3X.js} +16737 -15766
- package/build/{chunk-O7AXOZXA.js → chunk-TQDMVKTN.js} +13 -5
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +4 -26
- package/build/types/analysis/Analyzer.d.ts +162 -200
- package/build/types/analysis/{CallArgumentToParameterMatchResult.d.ts → ArgumentToParameterMatchResult.d.ts} +6 -7
- package/build/types/analysis/{CallArgumentsToParametersMatcher.d.ts → ArgumentsToParametersMatcher.d.ts} +14 -14
- package/build/types/analysis/ConstructorOverloadResolver.d.ts +1 -1
- package/build/types/analysis/DereferenceExpressionMeaning.d.ts +3 -3
- package/build/types/analysis/DiagnosticCollector.d.ts +3 -0
- package/build/types/analysis/FindModifier.d.ts +2 -0
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +14 -12
- package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +12 -7
- package/build/types/analysis/LocalizationContext.d.ts +4 -5
- package/build/types/analysis/Lookup.d.ts +8 -7
- package/build/types/analysis/ModifierFlags.d.ts +16 -0
- package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +0 -1
- package/build/types/analysis/NodeTypeUtils.d.ts +1 -0
- package/build/types/analysis/OperationOverloadResolver.d.ts +2 -2
- package/build/types/analysis/OverloadResolver.d.ts +4 -4
- package/build/types/analysis/PackageMemberLookup.d.ts +5 -6
- package/build/types/analysis/PropertyAccessExpressionMeaning.d.ts +18 -16
- package/build/types/analysis/Scope.d.ts +21 -116
- package/build/types/analysis/SemanticContext.d.ts +16 -6
- package/build/types/analysis/SemanticContextBuilder.d.ts +1 -1
- package/build/types/analysis/SourceFileMembers.d.ts +12 -89
- package/build/types/analysis/TagMeaning.d.ts +57 -9
- package/build/types/analysis/Tags.d.ts +2 -2
- package/build/types/analysis/TypeMemberLookup.d.ts +15 -15
- package/build/types/analysis/TypeOverloadResolver.d.ts +1 -1
- package/build/types/analysis/WellKnownDeclarations.d.ts +1 -0
- package/build/types/analysis/index.d.ts +1 -1
- package/build/types/api/Api.d.ts +2 -6
- package/build/types/diagnostic/DiagnosticCode.d.ts +111 -103
- package/build/types/emitter/{EmitterGeneratedDeclarationKind.d.ts → EmitPhaseName.d.ts} +1 -44
- package/build/types/emitter/EmitterContext.d.ts +13 -1
- package/build/types/emitter/Entities.d.ts +58 -16
- package/build/types/emitter/EntityMap.d.ts +1 -3
- package/build/types/emitter/IrBuilder.d.ts +6 -2
- package/build/types/emitter/IrToJs.d.ts +5 -5
- package/build/types/emitter/Transformer.d.ts +20 -13
- package/build/types/emitter/ir/EmitOptions.d.ts +163 -0
- package/build/types/emitter/ir/Nodes.d.ts +213 -185
- package/build/types/emitter/ir/index.d.ts +1 -2
- package/build/types/emitter/ir/types.d.ts +4 -3
- package/build/types/entities/AliasTypeEntity.d.ts +9 -5
- package/build/types/entities/ConstructorEntity.d.ts +2 -0
- package/build/types/entities/DereferenceOperatorEntity.d.ts +9 -0
- package/build/types/entities/DestructorEntity.d.ts +2 -0
- package/build/types/entities/GetterEntity.d.ts +8 -0
- package/build/types/entities/IndexerEntity.d.ts +9 -0
- package/build/types/entities/MethodEntity.d.ts +9 -5
- package/build/types/entities/MethodTypeEntity.d.ts +18 -5
- package/build/types/entities/OperatorEntity.d.ts +5 -3
- package/build/types/entities/PackageEntity.d.ts +3 -3
- package/build/types/entities/PackageMembers.d.ts +4 -90
- package/build/types/entities/SetterEntity.d.ts +8 -0
- package/build/types/entities/StructuredTypeEntity.d.ts +22 -9
- package/build/types/entities/TypeEntity.d.ts +15 -0
- package/build/types/entities/TypeExtensionEntity.d.ts +2 -0
- package/build/types/entities/TypeParameterEntity.d.ts +12 -7
- package/build/types/entities/VariableEntity.d.ts +50 -41
- package/build/types/entities/VariantTypeEntity.d.ts +18 -11
- package/build/types/entities/index.d.ts +17 -25
- package/build/types/executor/Compiler.d.ts +1 -0
- package/build/types/executor/NodeCompiler.d.ts +1 -0
- package/build/types/parser/CharacterCodes.d.ts +8 -0
- package/build/types/parser/ReservedIdentifierDictionary.d.ts +1 -2
- package/build/types/parser/Scanner.d.ts +0 -6
- package/build/types/parser/UnescapeText.d.ts +1 -1
- package/build/types/project/FileSystemTree.d.ts +2 -2
- package/build/types/services/CompletionService.d.ts +4 -1
- package/build/types/services/DisplayService.d.ts +218 -163
- package/build/types/services/NodeSemanticInfo.d.ts +7 -5
- package/build/types/services/signature-help/SignatureWithValueParameters.d.ts +8 -24
- package/build/types/services/signature-help/TypeParameterSignatureHelpProvider.d.ts +1 -0
- package/build/types/services/source-generation/EntityToSyntax.d.ts +1 -1
- package/build/types/services/source-generation/SourceGenerationService.d.ts +2 -2
- package/build/types/services/workspace/ClientTrackedSourceFiles.d.ts +5 -5
- package/build/types/services/workspace/CompilationController.d.ts +3 -3
- package/build/types/services/workspace/FileSystemTreeProviderBasedOnWatchedFileSystem.d.ts +4 -4
- package/build/types/services/workspace/ManuallyUpdatedFileSystemTreeProvider.d.ts +4 -4
- package/build/types/services/workspace/Workspace.d.ts +3 -3
- package/build/types/services/workspace/WorkspaceFiles.d.ts +7 -7
- package/build/types/tree/KeywordKind.d.ts +37 -37
- package/build/types/tree/NodeKind.d.ts +37 -39
- package/build/types/tree/green/Nodes.d.ts +57 -80
- package/build/types/tree/green/SyntaxFactory.d.ts +4 -5
- package/build/types/tree/green/SyntaxToCode.d.ts +1 -2
- package/build/types/tree/red/Nodes.d.ts +65 -93
- package/build/types/ts-interop/Entities.d.ts +77 -34
- package/build/types/ts-interop/TsPackageMembersCreator.d.ts +0 -1
- package/build/types/types/MethodType.d.ts +2 -2
- package/build/types/types/TypeMembers.d.ts +9 -0
- package/build/types/types/VariantType.d.ts +2 -2
- package/package.json +2 -2
- package/build/types/analysis/DereferencedVariableAccess.d.ts +0 -14
- package/build/types/analysis/IndexedAccess.d.ts +0 -14
- package/build/types/analysis/VariableAccess.d.ts +0 -14
- package/build/types/analysis/VariantLookup.d.ts +0 -20
- package/build/types/emitter/ir/LoweringOptions.d.ts +0 -34
- package/build/types/emitter/ir/LoweringState.d.ts +0 -25
- package/build/types/entities/VariantEntity.d.ts +0 -31
- package/build/types/entities/Variants.d.ts +0 -10
@@ -1,26 +1,25 @@
|
|
1
1
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
2
2
|
import { VariableEntity } from '../entities/index.js';
|
3
|
-
import {
|
3
|
+
import { Argument, AutotypeCallExpression, CallExpression, IndexedAccessExpression, Tag } from '../tree/index.js';
|
4
4
|
import * as types from '../types/index.js';
|
5
5
|
import { LocalizedName } from './Localization.js';
|
6
6
|
import { Analyzer } from './index.js';
|
7
|
-
export declare class
|
7
|
+
export declare class ArgumentToParameterMatchResult {
|
8
8
|
private readonly _analyzer;
|
9
9
|
private readonly _matchResults;
|
10
10
|
constructor(_analyzer: Analyzer);
|
11
11
|
ofCallExpression(node: CallExpression): MatchResult | undefined;
|
12
12
|
ofAutotypeCallExpression(node: AutotypeCallExpression): MatchResult | undefined;
|
13
13
|
ofTag(node: Tag): MatchResult | undefined;
|
14
|
-
|
14
|
+
ofIndexedAccessExpression(node: IndexedAccessExpression): MatchResult | undefined;
|
15
|
+
private convertMatchResult;
|
15
16
|
private convertParameter;
|
16
|
-
private convertConstructorSignatureMatchResult;
|
17
|
-
private convertConstructorParameter;
|
18
17
|
}
|
19
18
|
export declare class MatchResult {
|
20
|
-
readonly
|
19
|
+
readonly parameterByArgument: ReadonlyMap<Argument, MatchResultValueParameter>;
|
21
20
|
readonly unmatchedParameters: readonly MatchResultValueParameter[];
|
22
21
|
readonly diagnostics: readonly Diagnostic[];
|
23
|
-
constructor(
|
22
|
+
constructor(parameterByArgument: ReadonlyMap<Argument, MatchResultValueParameter>, unmatchedParameters: readonly MatchResultValueParameter[], diagnostics: readonly Diagnostic[]);
|
24
23
|
}
|
25
24
|
export declare class MatchResultValueParameter {
|
26
25
|
readonly entity: VariableEntity;
|
@@ -3,23 +3,23 @@ import { Diagnostic, DiagnosticLocation } from '../diagnostic/Diagnostic.js';
|
|
3
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
|
-
export declare class
|
6
|
+
export declare class ArgumentToParameterMatcher<TSignature extends ISignature<TParameter>, TParameter extends ISignatureParameter, TArgument extends IArgument> {
|
7
7
|
private readonly _analyzer;
|
8
8
|
private readonly _signature;
|
9
|
-
private readonly
|
10
|
-
constructor(_analyzer: Analyzer, _signature: TSignature,
|
11
|
-
match(): MatchResult<TParameter,
|
12
|
-
private
|
13
|
-
private
|
14
|
-
private
|
9
|
+
private readonly _arguments;
|
10
|
+
constructor(_analyzer: Analyzer, _signature: TSignature, _arguments: readonly TArgument[]);
|
11
|
+
match(): MatchResult<TParameter, TArgument>;
|
12
|
+
private matchArgumentsToParameters;
|
13
|
+
private addArgumentDiagnostic;
|
14
|
+
private getArgumentType;
|
15
15
|
}
|
16
|
-
export declare class MatchResult<TParameter extends ISignatureParameter,
|
17
|
-
readonly mapping: ReadonlyMap<
|
16
|
+
export declare class MatchResult<TParameter extends ISignatureParameter, TArgument extends IArgument> {
|
17
|
+
readonly mapping: ReadonlyMap<TArgument, TParameter>;
|
18
18
|
readonly unmatchedRequiredParameters: readonly TParameter[];
|
19
19
|
readonly argumentArrangementDiagnostics: readonly Diagnostic[];
|
20
20
|
readonly hasTypeAssignabilityErrors: boolean;
|
21
21
|
get isMatching(): boolean;
|
22
|
-
constructor(mapping: ReadonlyMap<
|
22
|
+
constructor(mapping: ReadonlyMap<TArgument, TParameter>, unmatchedRequiredParameters: readonly TParameter[], argumentArrangementDiagnostics: readonly Diagnostic[], hasTypeAssignabilityErrors: boolean);
|
23
23
|
}
|
24
24
|
export interface ISignature<TParameter extends ISignatureParameter> {
|
25
25
|
getParameters(): readonly TParameter[];
|
@@ -29,15 +29,15 @@ export interface ISignatureParameter {
|
|
29
29
|
getType(): types.Type;
|
30
30
|
isOptional(): boolean;
|
31
31
|
}
|
32
|
-
export interface
|
32
|
+
export interface IArgument {
|
33
33
|
getExpression(): tree.Expression;
|
34
34
|
getName(): Name | undefined;
|
35
35
|
getDiagnosticLocation(): DiagnosticLocation | undefined;
|
36
36
|
}
|
37
|
-
export declare class
|
37
|
+
export declare class SourceArgument implements IArgument {
|
38
38
|
private readonly _analyzer;
|
39
|
-
readonly node: tree.
|
40
|
-
constructor(_analyzer: Analyzer, node: tree.
|
39
|
+
readonly node: tree.Argument;
|
40
|
+
constructor(_analyzer: Analyzer, node: tree.Argument);
|
41
41
|
getExpression(): tree.Expression;
|
42
42
|
getName(): Name | undefined;
|
43
43
|
getDiagnosticLocation(): DiagnosticLocation;
|
@@ -7,7 +7,7 @@ import { LocalizedName } from './Localization.js';
|
|
7
7
|
export declare class Resolver<TCandidate extends ICandidate<TValueParameter>, TValueParameter extends IValueParameter> {
|
8
8
|
private readonly _analyzer;
|
9
9
|
constructor(_analyzer: Analyzer);
|
10
|
-
resolve(candidates:
|
10
|
+
resolve(candidates: readonly TCandidate[], args: readonly tree.Argument[]): readonly TCandidate[];
|
11
11
|
}
|
12
12
|
export interface ICandidate<TValueParameter extends IValueParameter> {
|
13
13
|
getValueParameters(): readonly TValueParameter[];
|
@@ -1,7 +1,7 @@
|
|
1
|
+
import { AccessKind } from '../common/index.js';
|
1
2
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
2
3
|
import { DereferenceExpression } from '../tree/index.js';
|
3
4
|
import * as types from '../types/index.js';
|
4
|
-
import * as dereferencedVariableAccess from './DereferencedVariableAccess.js';
|
5
5
|
import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
|
6
6
|
import { Analyzer } from './index.js';
|
7
7
|
export declare class Resolver {
|
@@ -16,9 +16,9 @@ export declare class Resolver {
|
|
16
16
|
export type Meaning = Meaning_resolved | Meaning_unresolved;
|
17
17
|
declare class Meaning_resolved {
|
18
18
|
readonly operator: FoundAnonymousDeclaration<types.DereferenceOperator>;
|
19
|
-
readonly
|
19
|
+
readonly accessKind: AccessKind;
|
20
20
|
readonly kind = "resolved";
|
21
|
-
constructor(operator: FoundAnonymousDeclaration<types.DereferenceOperator>,
|
21
|
+
constructor(operator: FoundAnonymousDeclaration<types.DereferenceOperator>, accessKind: AccessKind);
|
22
22
|
}
|
23
23
|
declare class Meaning_unresolved {
|
24
24
|
readonly diagnostic: Diagnostic | undefined;
|
@@ -18,6 +18,7 @@ export declare class DiagnosticCollector {
|
|
18
18
|
constructor(analyzer: Analyzer, sourceFile: project.SourceFile, cancellationToken: CancellationToken | undefined);
|
19
19
|
collect(): Promise<Diagnostic[]>;
|
20
20
|
private collectNodeDiagnostics;
|
21
|
+
private checkCallExpression;
|
21
22
|
private addNotTranslatedPackageMembersDiagnostics;
|
22
23
|
private collectNotTranslatedPackageMembers;
|
23
24
|
private addNotTranslatedTypeMembersDiagnostics;
|
@@ -27,8 +28,10 @@ export declare class DiagnosticCollector {
|
|
27
28
|
private checkPackageMethodDeclaration;
|
28
29
|
private checkPackageVariableGetterDeclaration;
|
29
30
|
private checkPackageVariableSetterDeclaration;
|
31
|
+
private checkTypeConstructorDeclaration;
|
30
32
|
private checkTypeMethodDeclaration;
|
31
33
|
private checkOperatorDeclaration;
|
34
|
+
private checkTypeVariableDeclaration;
|
32
35
|
private checkTypeVariableGetterDeclaration;
|
33
36
|
private checkTypeVariableSetterDeclaration;
|
34
37
|
private checkTypeIndexedGetterDeclaration;
|
@@ -1,4 +1,6 @@
|
|
1
1
|
import * as tree from '../tree/index.js';
|
2
|
+
import { ModifierFlags } from './ModifierFlags.js';
|
2
3
|
type NodeWithModifiers = tree.PackageMemberDeclaration | tree.TypeMemberDeclaration;
|
3
4
|
export declare function findModifier(node: NodeWithModifiers, modifierKeywordKind: tree.ModifierKeywordKind): tree.Modifier | undefined;
|
5
|
+
export declare function createDeclaredModifierFlags(node: NodeWithModifiers): ModifierFlags;
|
4
6
|
export {};
|
@@ -1,13 +1,12 @@
|
|
1
|
-
import { Name } from '../common/index.js';
|
1
|
+
import { AccessKind, Name } from '../common/index.js';
|
2
2
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
3
|
-
import { NamedTypeEntity, PackageAliasEntity, VariableEntity
|
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 { AccessedMethod } from './AccessedMethod.js';
|
7
7
|
import { FoundAnonymousDeclaration, FoundNamedDeclaration } from './FoundDeclaration.js';
|
8
8
|
import { PackageNameTreeNode } from './ImportedPackageNameTree.js';
|
9
9
|
import * as scope from './Scope.js';
|
10
|
-
import * as variableAccess from './VariableAccess.js';
|
11
10
|
import { Analyzer, TargetTypeHint } from './index.js';
|
12
11
|
export declare class Resolver {
|
13
12
|
private readonly _semanticContext;
|
@@ -25,19 +24,22 @@ export declare class Resolver {
|
|
25
24
|
export declare class ResolutionResult {
|
26
25
|
readonly meaning: Meaning;
|
27
26
|
readonly diagnostic?: Diagnostic | undefined;
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
27
|
+
/**
|
28
|
+
* Может ли измениться результат, если посчитать его с другим целевым типом?
|
29
|
+
*/
|
30
|
+
readonly dependsOnTargetType: boolean;
|
31
|
+
constructor(meaning: Meaning, diagnostic?: Diagnostic | undefined,
|
32
|
+
/**
|
33
|
+
* Может ли измениться результат, если посчитать его с другим целевым типом?
|
34
|
+
*/
|
35
|
+
dependsOnTargetType?: boolean);
|
35
36
|
}
|
37
|
+
export type Meaning = Meaning_variableAccess | Meaning_methodAccess | Meaning_operatorAccess | Meaning_packageNameSegmentAccess | Meaning_packageAliasAccess | Meaning_typeAccess | Meaning_mixedAmbiguousAccess | Meaning_unresolved;
|
36
38
|
declare class Meaning_variableAccess {
|
37
39
|
readonly variable: FoundNamedDeclaration<AccessedVariable>;
|
38
|
-
readonly
|
40
|
+
readonly accessKind: AccessKind;
|
39
41
|
readonly kind = "variable-access";
|
40
|
-
constructor(variable: FoundNamedDeclaration<AccessedVariable>,
|
42
|
+
constructor(variable: FoundNamedDeclaration<AccessedVariable>, accessKind: AccessKind);
|
41
43
|
}
|
42
44
|
declare class Meaning_methodAccess {
|
43
45
|
readonly candidates: readonly FoundNamedDeclaration<AccessedMethod>[];
|
@@ -1,8 +1,8 @@
|
|
1
|
+
import { AccessKind } from '../common/index.js';
|
1
2
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
2
3
|
import { IndexedAccessExpression } from '../tree/index.js';
|
3
4
|
import * as types from '../types/index.js';
|
4
5
|
import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
|
5
|
-
import * as indexedAccess from './IndexedAccess.js';
|
6
6
|
import { Analyzer } from './index.js';
|
7
7
|
export declare class Resolver {
|
8
8
|
private readonly _analyzer;
|
@@ -10,20 +10,25 @@ export declare class Resolver {
|
|
10
10
|
private readonly _semanticContext;
|
11
11
|
private get semanticContext();
|
12
12
|
constructor(_analyzer: Analyzer, _node: IndexedAccessExpression);
|
13
|
-
resolve():
|
13
|
+
resolve(): ResolutionResult;
|
14
14
|
private getArgumentsRangeWithBrackets;
|
15
15
|
private convertSyntacticAccessKind;
|
16
16
|
}
|
17
|
+
export declare class ResolutionResult {
|
18
|
+
readonly meaning: Meaning;
|
19
|
+
readonly diagnostic?: Diagnostic | undefined;
|
20
|
+
constructor(meaning: Meaning, diagnostic?: Diagnostic | undefined);
|
21
|
+
}
|
17
22
|
export type Meaning = Meaning_resolved | Meaning_unresolved;
|
18
23
|
declare class Meaning_resolved {
|
19
|
-
readonly
|
20
|
-
readonly
|
24
|
+
readonly candidates: readonly FoundAnonymousDeclaration<types.Indexer>[];
|
25
|
+
readonly suitableIndexers: readonly FoundAnonymousDeclaration<types.Indexer>[];
|
26
|
+
readonly accessKind: AccessKind;
|
21
27
|
readonly kind = "resolved";
|
22
|
-
|
28
|
+
get singleSuitableIndexer(): FoundAnonymousDeclaration<types.Indexer> | undefined;
|
29
|
+
constructor(candidates: readonly FoundAnonymousDeclaration<types.Indexer>[], suitableIndexers: readonly FoundAnonymousDeclaration<types.Indexer>[], accessKind: AccessKind);
|
23
30
|
}
|
24
31
|
declare class Meaning_unresolved {
|
25
|
-
readonly diagnostic: Diagnostic | undefined;
|
26
32
|
readonly kind = "unresolved";
|
27
|
-
constructor(diagnostic: Diagnostic | undefined);
|
28
33
|
}
|
29
34
|
export {};
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import {
|
2
|
-
import { AliasTypeEntity, MethodEntity, PackageAliasEntity, PackageEntity, PackageMethodTypeEntity, PackageStructuredTypeEntity, PackageVariantTypeEntity, TypeEntity, TypeParameterEntity, VariableEntity
|
3
|
-
import { AnalyzedTranslationPackage, TranslatedTypeEntityMembers
|
1
|
+
import { Name, PackageLocale } from '../common/index.js';
|
2
|
+
import { AliasTypeEntity, MethodEntity, PackageAliasEntity, PackageEntity, PackageMethodTypeEntity, PackageStructuredTypeEntity, PackageVariantTypeEntity, TypeEntity, TypeParameterEntity, VariableEntity } from '../entities/index.js';
|
3
|
+
import { AnalyzedTranslationPackage, TranslatedTypeEntityMembers } from './AnalyzedTranslationPackage.js';
|
4
4
|
export declare class LocalizationContext {
|
5
5
|
readonly originalLocale: PackageLocale;
|
6
6
|
private readonly _translationPackageByTranslated;
|
@@ -9,7 +9,6 @@ export declare class LocalizationContext {
|
|
9
9
|
getTranslationPackage(packageEntity: PackageEntity): AnalyzedTranslationPackage | undefined;
|
10
10
|
getTranslationLocale(packageEntity: PackageEntity): PackageLocale;
|
11
11
|
getTranslatedTypeEntityMembers(typeEntity: TypeEntity): TranslatedTypeEntityMembers | undefined;
|
12
|
-
getTranslatedVariants(typeEntity: VariantTypeEntity): TranslatedVariants | undefined;
|
13
12
|
getEntityName(entity: NamedEntity): Name;
|
14
13
|
}
|
15
|
-
export type NamedEntity = VariableEntity |
|
14
|
+
export type NamedEntity = VariableEntity | PackageVariantTypeEntity | MethodEntity | TypeParameterEntity | PackageMethodTypeEntity | PackageStructuredTypeEntity | PackageAliasEntity | AliasTypeEntity;
|
@@ -7,13 +7,13 @@ export declare class Lookup {
|
|
7
7
|
private readonly _scopeChain;
|
8
8
|
private readonly _hidingMatcher;
|
9
9
|
constructor(_scopeChain: ScopeChain, _hidingMatcher: IEntityHidingMatcher);
|
10
|
-
getTypesOrContainersWithTypes(): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
|
11
|
-
getTypesOrContainersWithTypesByName(name: SearchName): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
|
12
|
-
getNamedDeclarations(): FoundNamedDeclaration<NamedDeclaration>[];
|
13
|
-
getNamedDeclarationsByName(name: SearchName): FoundNamedDeclaration<NamedDeclaration>[];
|
14
|
-
getOperators(): FoundAnonymousDeclaration<types.Operator>[];
|
15
|
-
getOperatorsByKind(kind: OperatorKind): FoundAnonymousDeclaration<types.Operator>[];
|
16
|
-
getTypeExtensionsByType(type: TypeEntity): TypeExtensionEntity[];
|
10
|
+
getTypesOrContainersWithTypes(): readonly FoundNamedDeclaration<TypeOrContainerWithTypes>[];
|
11
|
+
getTypesOrContainersWithTypesByName(name: SearchName): readonly FoundNamedDeclaration<TypeOrContainerWithTypes>[];
|
12
|
+
getNamedDeclarations(): readonly FoundNamedDeclaration<NamedDeclaration>[];
|
13
|
+
getNamedDeclarationsByName(name: SearchName): readonly FoundNamedDeclaration<NamedDeclaration>[];
|
14
|
+
getOperators(): readonly FoundAnonymousDeclaration<types.Operator>[];
|
15
|
+
getOperatorsByKind(kind: OperatorKind): readonly FoundAnonymousDeclaration<types.Operator>[];
|
16
|
+
getTypeExtensionsByType(type: TypeEntity): readonly TypeExtensionEntity[];
|
17
17
|
private checkTypeOrPackageDeclarationShadowing;
|
18
18
|
private checkNamedDeclarationShadowing;
|
19
19
|
private checkOperatorShadowing;
|
@@ -23,5 +23,6 @@ export declare class ScopeChain {
|
|
23
23
|
private constructor();
|
24
24
|
addFirst(scope: IScope): ScopeChain;
|
25
25
|
toQuery(): Query<IScope>;
|
26
|
+
enumerateScopes(): Iterable<IScope>;
|
26
27
|
static withSingleScope(scope: IScope): ScopeChain;
|
27
28
|
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export declare enum ModifierFlags {
|
2
|
+
None = 0,
|
3
|
+
HiddenWithoutLevel = 1,
|
4
|
+
HiddenInType = 2,
|
5
|
+
HiddenInHierarchy = 4,
|
6
|
+
HiddenInFile = 8,
|
7
|
+
HiddenInPackage = 16,
|
8
|
+
Basic = 32,
|
9
|
+
Static = 64,
|
10
|
+
Redefinable = 128,
|
11
|
+
Abstract = 256,
|
12
|
+
Redefined = 512,
|
13
|
+
Async = 1024,
|
14
|
+
Const = 2048,
|
15
|
+
NotComputed = 4096
|
16
|
+
}
|
@@ -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 convertNamedTypeToTypeDeclaration;
|
13
12
|
private resolveTypeOverload;
|
14
13
|
}
|
15
14
|
export declare class NamedTypeSpecifierResolutionResult {
|
@@ -15,6 +15,7 @@ export declare class NodeTypeUtils {
|
|
15
15
|
export type PackageTypeDeclaration = tree.PackageAliasTypeDeclaration | tree.PackageMethodTypeDeclaration | tree.PackageStructuredTypeDeclaration | tree.PackageVariantTypeDeclaration;
|
16
16
|
export type StructuredTypeDeclaration = tree.PackageStructuredTypeDeclaration | tree.AnonymousStructuredTypeDeclaration;
|
17
17
|
export type VariantTypeDeclaration = tree.PackageVariantTypeDeclaration | tree.AnonymousVariantTypeDeclaration;
|
18
|
+
export declare function isVariantTypeDeclaration(node: tree.Node): node is VariantTypeDeclaration;
|
18
19
|
export type MethodTypeDeclaration = tree.PackageMethodTypeDeclaration | tree.AnonymousMethodTypeDeclaration;
|
19
20
|
export type MethodDeclaration = tree.PackageMethodDeclaration | tree.NestedMethodDeclaration | tree.TypeMethodDeclaration;
|
20
21
|
export type TypeDeclaration = StructuredTypeDeclaration | VariantTypeDeclaration | MethodTypeDeclaration | tree.PackageAliasTypeDeclaration | tree.TypeParameterDeclaration;
|
@@ -5,8 +5,8 @@ import { Analyzer } from './Analyzer.js';
|
|
5
5
|
export declare class Resolver<TCandidate extends ICandidate<TValueParameter>, TValueParameter extends IValueParameter> {
|
6
6
|
private readonly _analyzer;
|
7
7
|
constructor(_analyzer: Analyzer);
|
8
|
-
resolveByCallExpression(candidates:
|
9
|
-
resolveByTargetType(candidates:
|
8
|
+
resolveByCallExpression(candidates: readonly TCandidate[], node: CallExpression): readonly TCandidate[];
|
9
|
+
resolveByTargetType(candidates: readonly TCandidate[], targetType: types.MethodType): readonly TCandidate[];
|
10
10
|
}
|
11
11
|
export interface ICandidate<TValueParameter extends IValueParameter> {
|
12
12
|
getValueParameters(): readonly TValueParameter[];
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { Analyzer } from '../analysis/index.js';
|
2
|
-
import * as matcher from './
|
3
|
-
export declare class OverloadResolver<TSignature extends matcher.ISignature<TParameter>, TParameter extends matcher.ISignatureParameter,
|
2
|
+
import * as matcher from './ArgumentsToParametersMatcher.js';
|
3
|
+
export declare class OverloadResolver<TSignature extends matcher.ISignature<TParameter>, TParameter extends matcher.ISignatureParameter, TArgument extends matcher.IArgument> {
|
4
4
|
private readonly _analyzer;
|
5
5
|
private readonly _signatures;
|
6
|
-
private readonly
|
7
|
-
constructor(_analyzer: Analyzer, _signatures: readonly TSignature[],
|
6
|
+
private readonly _arguments;
|
7
|
+
constructor(_analyzer: Analyzer, _signatures: readonly TSignature[], _arguments: readonly TArgument[]);
|
8
8
|
resolveOverload(): TSignature[];
|
9
9
|
private tryChooseBestSignature;
|
10
10
|
private chooseBetterTargetType;
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import { IEntityHidingMatcher, PackageEntity, TypeEntity, TypeExtensionEntity } from '../entities/index.js';
|
1
|
+
import { SearchName } from '../common/index.js';
|
2
|
+
import { IEntityHidingMatcher, NamedPackageMemberEntity, PackageEntity, TypeEntity, TypeExtensionEntity } from '../entities/index.js';
|
4
3
|
import { FoundNamedDeclaration } from './FoundDeclaration.js';
|
5
4
|
import { LocalizationContext } from './LocalizationContext.js';
|
6
5
|
export declare class PackageMemberLookup {
|
@@ -9,7 +8,7 @@ export declare class PackageMemberLookup {
|
|
9
8
|
private readonly _translatedMembers;
|
10
9
|
private get translatedMembers();
|
11
10
|
constructor(_package: PackageEntity, _localizationContext: LocalizationContext | undefined);
|
12
|
-
getNamedMembers(hidingMatcher?: IEntityHidingMatcher):
|
13
|
-
getNamedMembersByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher):
|
14
|
-
getTypeExtensions(type: TypeEntity, hidingMatcher?: IEntityHidingMatcher):
|
11
|
+
getNamedMembers(hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<NamedPackageMemberEntity>[];
|
12
|
+
getNamedMembersByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<NamedPackageMemberEntity>[];
|
13
|
+
getTypeExtensions(type: TypeEntity, hidingMatcher?: IEntityHidingMatcher): readonly TypeExtensionEntity[];
|
15
14
|
}
|
@@ -1,11 +1,11 @@
|
|
1
|
+
import { AccessKind } from '../common/index.js';
|
1
2
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
2
|
-
import { PackageTypeEntity, PackageVariableEntity
|
3
|
+
import { PackageTypeEntity, PackageVariableEntity } from '../entities/index.js';
|
3
4
|
import * as tree from '../tree/index.js';
|
4
5
|
import * as types from '../types/index.js';
|
5
6
|
import { AccessedMethod } from './AccessedMethod.js';
|
6
7
|
import { FoundAnonymousDeclaration, FoundNamedDeclaration } from './FoundDeclaration.js';
|
7
8
|
import { PackageNameTreeNode } from './ImportedPackageNameTree.js';
|
8
|
-
import * as variableAccess from './VariableAccess.js';
|
9
9
|
import { Analyzer, TargetTypeHint } from './index.js';
|
10
10
|
export declare class Resolver {
|
11
11
|
private readonly _semanticContext;
|
@@ -31,14 +31,22 @@ export declare class Resolver {
|
|
31
31
|
export declare class ResolutionResult {
|
32
32
|
readonly meaning: Meaning;
|
33
33
|
readonly diagnostic?: Diagnostic | undefined;
|
34
|
-
|
34
|
+
/**
|
35
|
+
* Может ли измениться результат, если посчитать его с другим целевым типом?
|
36
|
+
*/
|
37
|
+
readonly dependsOnTargetType: boolean;
|
38
|
+
constructor(meaning: Meaning, diagnostic?: Diagnostic | undefined,
|
39
|
+
/**
|
40
|
+
* Может ли измениться результат, если посчитать его с другим целевым типом?
|
41
|
+
*/
|
42
|
+
dependsOnTargetType?: boolean);
|
35
43
|
}
|
36
|
-
export type Meaning = Meaning_packageVariableAccess | Meaning_packageMethodAccess | Meaning_packageTypeAccess | Meaning_packageNameSegmentAccess |
|
44
|
+
export type Meaning = Meaning_packageVariableAccess | Meaning_packageMethodAccess | Meaning_packageTypeAccess | Meaning_packageNameSegmentAccess | Meaning_staticVariableAccess | Meaning_staticMethodAccess | Meaning_instanceVariableAccess | Meaning_instanceMethodAccess | Meaning_operatorAccess | Meaning_unresolved;
|
37
45
|
declare class Meaning_packageVariableAccess {
|
38
46
|
readonly variable: FoundNamedDeclaration<PackageVariableEntity>;
|
39
|
-
readonly
|
47
|
+
readonly accessKind: AccessKind;
|
40
48
|
readonly kind = "package-variable-access";
|
41
|
-
constructor(variable: FoundNamedDeclaration<PackageVariableEntity>,
|
49
|
+
constructor(variable: FoundNamedDeclaration<PackageVariableEntity>, accessKind: AccessKind);
|
42
50
|
}
|
43
51
|
declare class Meaning_packageMethodAccess {
|
44
52
|
readonly candidates: readonly FoundNamedDeclaration<AccessedMethod>[];
|
@@ -59,18 +67,12 @@ declare class Meaning_packageNameSegmentAccess {
|
|
59
67
|
readonly kind = "package-name-segment-access";
|
60
68
|
constructor(packageTreeNode: PackageNameTreeNode);
|
61
69
|
}
|
62
|
-
declare class Meaning_variantAccess {
|
63
|
-
readonly type: types.VariantType;
|
64
|
-
readonly variant: FoundNamedDeclaration<VariantEntity>;
|
65
|
-
readonly kind = "variant-access";
|
66
|
-
constructor(type: types.VariantType, variant: FoundNamedDeclaration<VariantEntity>);
|
67
|
-
}
|
68
70
|
declare class Meaning_staticVariableAccess {
|
69
71
|
readonly type: types.Type;
|
70
72
|
readonly variable: FoundNamedDeclaration<types.Variable>;
|
71
|
-
readonly
|
73
|
+
readonly accessKind: AccessKind;
|
72
74
|
readonly kind = "static-variable-access";
|
73
|
-
constructor(type: types.Type, variable: FoundNamedDeclaration<types.Variable>,
|
75
|
+
constructor(type: types.Type, variable: FoundNamedDeclaration<types.Variable>, accessKind: AccessKind);
|
74
76
|
}
|
75
77
|
declare class Meaning_staticMethodAccess {
|
76
78
|
readonly type: types.Type;
|
@@ -82,9 +84,9 @@ declare class Meaning_staticMethodAccess {
|
|
82
84
|
}
|
83
85
|
declare class Meaning_instanceVariableAccess {
|
84
86
|
readonly variable: FoundNamedDeclaration<types.Variable>;
|
85
|
-
readonly
|
87
|
+
readonly accessKind: AccessKind;
|
86
88
|
readonly kind = "instance-variable-access";
|
87
|
-
constructor(variable: FoundNamedDeclaration<types.Variable>,
|
89
|
+
constructor(variable: FoundNamedDeclaration<types.Variable>, accessKind: AccessKind);
|
88
90
|
}
|
89
91
|
declare class Meaning_instanceMethodAccess {
|
90
92
|
readonly candidates: readonly FoundNamedDeclaration<AccessedMethod>[];
|