@artel/artc 0.6.25217 → 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 +10 -62
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +1044 -1001
- package/build/{chunk-HN3XZZQX.js → chunk-FI6LW2RD.js} +5 -4
- package/build/{chunk-TXAEJ2GI.js → chunk-SK7ZBC3X.js} +15375 -15317
- package/build/{chunk-CMPXXHBQ.js → chunk-TQDMVKTN.js} +13 -5
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +4 -26
- package/build/types/analysis/Analyzer.d.ts +27 -69
- package/build/types/analysis/{CallArgumentToParameterMatchResult.d.ts → ArgumentToParameterMatchResult.d.ts} +4 -4
- 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 +2 -0
- package/build/types/analysis/FindModifier.d.ts +2 -0
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +14 -12
- 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 -99
- 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 +20 -16
- package/build/types/emitter/{EmitterGeneratedDeclarationKind.d.ts → EmitPhaseName.d.ts} +1 -44
- package/build/types/emitter/EmitterContext.d.ts +4 -1
- package/build/types/emitter/Entities.d.ts +52 -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 -4
- package/build/types/emitter/Transformer.d.ts +18 -10
- package/build/types/emitter/ir/EmitOptions.d.ts +163 -0
- package/build/types/emitter/ir/Nodes.d.ts +206 -167
- package/build/types/emitter/ir/index.d.ts +1 -2
- package/build/types/emitter/ir/types.d.ts +3 -3
- package/build/types/entities/AliasTypeEntity.d.ts +8 -4
- package/build/types/entities/ConstructorEntity.d.ts +2 -0
- package/build/types/entities/DereferenceOperatorEntity.d.ts +5 -3
- 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 +5 -3
- package/build/types/entities/MethodEntity.d.ts +9 -5
- package/build/types/entities/MethodTypeEntity.d.ts +10 -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 +11 -6
- 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 +11 -6
- package/build/types/entities/VariableEntity.d.ts +50 -41
- package/build/types/entities/VariantTypeEntity.d.ts +10 -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/project/FileSystemTree.d.ts +2 -2
- package/build/types/services/CompletionService.d.ts +4 -1
- package/build/types/services/DisplayService.d.ts +18 -2
- package/build/types/services/NodeSemanticInfo.d.ts +7 -5
- package/build/types/services/signature-help/SignatureWithValueParameters.d.ts +7 -21
- 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 +57 -58
- package/build/types/tree/green/Nodes.d.ts +57 -71
- 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 -79
- package/build/types/ts-interop/Entities.d.ts +51 -28
- package/build/types/ts-interop/TsPackageMembersCreator.d.ts +0 -1
- package/build/types/types/TypeMembers.d.ts +9 -0
- 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 -36
- package/build/types/emitter/ir/LoweringState.d.ts +0 -49
- package/build/types/entities/VariantEntity.d.ts +0 -31
- package/build/types/entities/Variants.d.ts +0 -10
@@ -1,26 +1,74 @@
|
|
1
1
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
2
|
+
import { MethodEntity, NamedTypeEntity, PackageAliasEntity } from '../entities/index.js';
|
2
3
|
import { Tag } from '../tree/index.js';
|
3
4
|
import * as types from '../types/index.js';
|
4
|
-
import {
|
5
|
+
import { AccessedMethod } from './AccessedMethod.js';
|
6
|
+
import { FoundAnonymousDeclaration, FoundNamedDeclaration } from './FoundDeclaration.js';
|
7
|
+
import { PackageNameTreeNode } from './ImportedPackageNameTree.js';
|
5
8
|
import { Analyzer } from './index.js';
|
6
9
|
export declare class Resolver {
|
7
10
|
private readonly _analyzer;
|
8
11
|
private readonly _node;
|
12
|
+
private readonly _semanticContext;
|
13
|
+
private get semanticContext();
|
9
14
|
constructor(_analyzer: Analyzer, _node: Tag);
|
10
|
-
resolve():
|
15
|
+
resolve(): ResolutionResult;
|
16
|
+
private resolveNameInScope;
|
17
|
+
private resolveNameInPackage;
|
18
|
+
private resolveTypeOverload;
|
19
|
+
private resolveTagType;
|
20
|
+
private resolveTagMethod;
|
21
|
+
private createAccessedMethod;
|
22
|
+
private resolveMethodOverload;
|
11
23
|
}
|
12
|
-
export
|
13
|
-
|
14
|
-
readonly
|
24
|
+
export declare class ResolutionResult {
|
25
|
+
readonly meaning: Meaning;
|
26
|
+
readonly resolvedQualifiers: readonly ResolvedQualifier[];
|
27
|
+
readonly diagnostic?: Diagnostic | undefined;
|
28
|
+
constructor(meaning: Meaning, resolvedQualifiers: readonly ResolvedQualifier[], diagnostic?: Diagnostic | undefined);
|
29
|
+
}
|
30
|
+
export type Meaning = Meaning_tagType | Meaning_tagMethod | Meaning_unresolved;
|
31
|
+
declare class Meaning_tagType {
|
32
|
+
readonly type: types.Type;
|
15
33
|
readonly candidates: readonly FoundAnonymousDeclaration<types.Constructor>[];
|
16
34
|
readonly suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[];
|
17
|
-
readonly kind = "
|
35
|
+
readonly kind = "tag-type";
|
18
36
|
get singleSuitableConstructor(): FoundAnonymousDeclaration<types.Constructor> | undefined;
|
19
|
-
constructor(type: types.
|
37
|
+
constructor(type: types.Type, candidates: readonly FoundAnonymousDeclaration<types.Constructor>[], suitableConstructors: readonly FoundAnonymousDeclaration<types.Constructor>[]);
|
38
|
+
}
|
39
|
+
declare class Meaning_tagMethod {
|
40
|
+
readonly candidates: readonly FoundNamedDeclaration<AccessedMethod>[];
|
41
|
+
readonly suitableMethods: readonly FoundNamedDeclaration<AccessedMethod>[];
|
42
|
+
readonly kind = "tag-method";
|
43
|
+
get singleSuitableMethod(): FoundNamedDeclaration<AccessedMethod> | undefined;
|
44
|
+
constructor(candidates: readonly FoundNamedDeclaration<AccessedMethod>[], suitableMethods: readonly FoundNamedDeclaration<AccessedMethod>[]);
|
20
45
|
}
|
21
46
|
declare class Meaning_unresolved {
|
22
|
-
readonly diagnostics: readonly Diagnostic[];
|
23
47
|
readonly kind = "unresolved";
|
24
|
-
|
48
|
+
}
|
49
|
+
export type ResolvedQualifier = ResolvedQualifier_packageNameSegment | ResolvedQualifier_packageAlias | ResolvedQualifier_type | ResolvedQualifier_method;
|
50
|
+
export declare class ResolvedQualifier_packageNameSegment {
|
51
|
+
readonly packageTreeNode: PackageNameTreeNode;
|
52
|
+
readonly kind = "package-name-segment";
|
53
|
+
constructor(packageTreeNode: PackageNameTreeNode);
|
54
|
+
}
|
55
|
+
export declare class ResolvedQualifier_packageAlias {
|
56
|
+
readonly packageAlias: PackageAliasEntity;
|
57
|
+
readonly kind = "package-alias";
|
58
|
+
constructor(packageAlias: PackageAliasEntity);
|
59
|
+
}
|
60
|
+
export declare class ResolvedQualifier_type {
|
61
|
+
readonly candidates: readonly FoundNamedDeclaration<NamedTypeEntity>[];
|
62
|
+
readonly suitableTypes: readonly FoundNamedDeclaration<NamedTypeEntity>[];
|
63
|
+
readonly kind = "type";
|
64
|
+
get singleSuitableType(): FoundNamedDeclaration<NamedTypeEntity> | undefined;
|
65
|
+
constructor(candidates: readonly FoundNamedDeclaration<NamedTypeEntity>[], suitableTypes: readonly FoundNamedDeclaration<NamedTypeEntity>[]);
|
66
|
+
}
|
67
|
+
export declare class ResolvedQualifier_method {
|
68
|
+
readonly candidates: readonly FoundNamedDeclaration<MethodEntity>[];
|
69
|
+
readonly suitableMethods: readonly FoundNamedDeclaration<MethodEntity>[];
|
70
|
+
readonly kind = "method";
|
71
|
+
get singleSuitableMethod(): FoundNamedDeclaration<MethodEntity> | undefined;
|
72
|
+
constructor(candidates: readonly FoundNamedDeclaration<MethodEntity>[], suitableMethods: readonly FoundNamedDeclaration<MethodEntity>[]);
|
25
73
|
}
|
26
74
|
export {};
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { VariableEntity } from '../entities/index.js';
|
2
2
|
import * as types from '../types/index.js';
|
3
3
|
export declare class Tag {
|
4
|
-
readonly type: types.
|
4
|
+
readonly type: types.Type;
|
5
5
|
readonly constructor_: types.Constructor;
|
6
6
|
readonly argumentByParameter: ReadonlyMap<VariableEntity, TagArgument>;
|
7
7
|
private readonly _argumentByName;
|
8
8
|
get argumentByName(): ReadonlyMap<string, TagArgument>;
|
9
|
-
constructor(type: types.
|
9
|
+
constructor(type: types.Type, constructor_: types.Constructor, argumentByParameter: ReadonlyMap<VariableEntity, TagArgument>);
|
10
10
|
}
|
11
11
|
export type TagArgument = TagArgument_string | TagArgument_numeric | TagArgument_boolean | TagArgument_invalid;
|
12
12
|
export declare class TagArgument_string {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { PackageLocale,
|
1
|
+
import { PackageLocale, SearchName } from '../common/index.js';
|
2
2
|
import { IEntityHidingMatcher, OperatorKind, TypeEntity } from '../entities/index.js';
|
3
3
|
import * as types from '../types/index.js';
|
4
4
|
import { Analyzer } from './Analyzer.js';
|
@@ -16,13 +16,13 @@ export declare class TypeMemberLookup {
|
|
16
16
|
get searchLocale(): PackageLocale;
|
17
17
|
constructor(_analyzer: Analyzer, _type: types.Type, _localizationContext: LocalizationContext | undefined);
|
18
18
|
static ofTypeEntity(analyzer: Analyzer, entity: TypeEntity, localizationContext: LocalizationContext | undefined): TypeMemberLookup;
|
19
|
-
getNamedMembers(hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup):
|
20
|
-
getNamedMembersByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup):
|
21
|
-
getOperators(hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup):
|
22
|
-
getOperatorsByKind(kind: OperatorKind, hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup):
|
23
|
-
getConstructors(hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup):
|
24
|
-
getIndexers(hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup):
|
25
|
-
getDereferenceOperators(hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup):
|
19
|
+
getNamedMembers(hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup): readonly FoundNamedDeclaration<types.NamedTypeMember>[];
|
20
|
+
getNamedMembersByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup): readonly FoundNamedDeclaration<types.NamedTypeMember>[];
|
21
|
+
getOperators(hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup): readonly FoundAnonymousDeclaration<types.Operator>[];
|
22
|
+
getOperatorsByKind(kind: OperatorKind, hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup): readonly FoundAnonymousDeclaration<types.Operator>[];
|
23
|
+
getConstructors(hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup): readonly FoundAnonymousDeclaration<types.Constructor>[];
|
24
|
+
getIndexers(hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup): readonly FoundAnonymousDeclaration<types.Indexer>[];
|
25
|
+
getDereferenceOperators(hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup): readonly FoundAnonymousDeclaration<types.DereferenceOperator>[];
|
26
26
|
private getLocaleOfTypeEntity;
|
27
27
|
}
|
28
28
|
export declare class BoundTypeMemberLookup {
|
@@ -31,11 +31,11 @@ export declare class BoundTypeMemberLookup {
|
|
31
31
|
private readonly _typeExtensionLookup;
|
32
32
|
constructor(analyzer: Analyzer, type: types.Type, localizationContext: LocalizationContext | undefined, hidingMatcher: IEntityHidingMatcher | undefined, typeExtensionLookup: Lookup | undefined);
|
33
33
|
static ofTypeEntity(analyzer: Analyzer, entity: TypeEntity, localizationContext: LocalizationContext | undefined, hidingMatcher: IEntityHidingMatcher | undefined, typeExtensionLookup: Lookup | undefined): BoundTypeMemberLookup;
|
34
|
-
getNamedMembers():
|
35
|
-
getNamedMembersByName(name: SearchName):
|
36
|
-
getOperators():
|
37
|
-
getOperatorsByKind(kind: OperatorKind):
|
38
|
-
getConstructors():
|
39
|
-
getIndexers():
|
40
|
-
getDereferenceOperators():
|
34
|
+
getNamedMembers(): readonly FoundNamedDeclaration<types.NamedTypeMember>[];
|
35
|
+
getNamedMembersByName(name: SearchName): readonly FoundNamedDeclaration<types.NamedTypeMember>[];
|
36
|
+
getOperators(): readonly FoundAnonymousDeclaration<types.Operator>[];
|
37
|
+
getOperatorsByKind(kind: OperatorKind): readonly FoundAnonymousDeclaration<types.Operator>[];
|
38
|
+
getConstructors(): readonly FoundAnonymousDeclaration<types.Constructor>[];
|
39
|
+
getIndexers(): readonly FoundAnonymousDeclaration<types.Indexer>[];
|
40
|
+
getDereferenceOperators(): readonly FoundAnonymousDeclaration<types.DereferenceOperator>[];
|
41
41
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
export declare class Resolver<TCandidate extends ICandidate> {
|
2
|
-
resolveByArgumentCount(candidates:
|
2
|
+
resolveByArgumentCount(candidates: readonly TCandidate[], argumentCount: number): readonly TCandidate[];
|
3
3
|
}
|
4
4
|
export interface ICandidate {
|
5
5
|
getParameterCount(): number;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
export * from './Analyzer.js';
|
2
|
-
export * from './
|
2
|
+
export * from './ArgumentsToParametersMatcher.js';
|
3
3
|
export * from './DeclarationsUsageCounter.js';
|
4
4
|
export * from './DiagnosticCollector.js';
|
5
5
|
export * from './FindModifier.js';
|
package/build/types/api/Api.d.ts
CHANGED
@@ -3,9 +3,8 @@ export * from '../analysis/AnalyzedTranslationPackage.js';
|
|
3
3
|
export * from '../analysis/Analyzer.js';
|
4
4
|
export type { Meaning as AutotypeCallExpressionMeaning } from '../analysis/AutotypeCallExpressionMeaning.js';
|
5
5
|
export type { Meaning as BaseExpressionMeaning } from '../analysis/BaseExpressionMeaning.js';
|
6
|
-
export { MatchResult, MatchResultValueParameter } from '../analysis/
|
6
|
+
export { MatchResult, MatchResultValueParameter } from '../analysis/ArgumentToParameterMatchResult.js';
|
7
7
|
export type { Meaning as CallExpressionMeaning } from '../analysis/CallExpressionMeaning.js';
|
8
|
-
export * as dereferencedVariableAccess from '../analysis/DereferencedVariableAccess.js';
|
9
8
|
export type { Meaning as DereferenceExpressionMeaning } from '../analysis/DereferenceExpressionMeaning.js';
|
10
9
|
export * from '../analysis/DiagnosticCollector.js';
|
11
10
|
export * from '../analysis/EntityLocalizationHelper.js';
|
@@ -13,7 +12,6 @@ export * from '../analysis/FindModifier.js';
|
|
13
12
|
export * from '../analysis/FoundDeclaration.js';
|
14
13
|
export type { Meaning as IdentifierExpressionMeaning, ResolutionResult as IdentifierExpressionResolutionResult } from '../analysis/IdentifierExpressionMeaning.js';
|
15
14
|
export * from '../analysis/ImportedPackageNameTree.js';
|
16
|
-
export * as indexedAccess from '../analysis/IndexedAccess.js';
|
17
15
|
export type { Meaning as IndexedAccessExpressionMeaning } from '../analysis/IndexedAccessExpressionMeaning.js';
|
18
16
|
export * from '../analysis/Localization.js';
|
19
17
|
export * from '../analysis/LocalizationContext.js';
|
@@ -22,7 +20,7 @@ export * from '../analysis/NodeTypeUtils.js';
|
|
22
20
|
export type { Meaning as ObjectExpressionMeaning } from '../analysis/ObjectExpressionMeaning.js';
|
23
21
|
export * from '../analysis/PackageMemberLookup.js';
|
24
22
|
export type { Meaning as PropertyAccessExpressionMeaning, ResolutionResult as PropertyAccessExpressionResolutionResult } from '../analysis/PropertyAccessExpressionMeaning.js';
|
25
|
-
export type { IScope, NamedDeclaration,
|
23
|
+
export type { IScope, NamedDeclaration, TypeOrContainerWithTypes } from '../analysis/Scope.js';
|
26
24
|
export * from '../analysis/SemanticContext.js';
|
27
25
|
export * from '../analysis/SourceFileMembers.js';
|
28
26
|
export * from '../analysis/SourcePackageDependencyGraph.js';
|
@@ -32,8 +30,6 @@ export * from '../analysis/Tags.js';
|
|
32
30
|
export * from '../analysis/TargetTypeHint.js';
|
33
31
|
export * from '../analysis/TypeMemberLookup.js';
|
34
32
|
export * from '../analysis/Utils.js';
|
35
|
-
export * as variableAccess from '../analysis/VariableAccess.js';
|
36
|
-
export * from '../analysis/VariantLookup.js';
|
37
33
|
export * from '../analysis/Visitor.js';
|
38
34
|
export * from '../analysis/WellKnownDeclarations.js';
|
39
35
|
export * from '../common/index.js';
|
@@ -16,9 +16,9 @@ export declare enum DiagnosticCode {
|
|
16
16
|
TypeParameterExpected = 14,
|
17
17
|
ParameterExpected = 15,
|
18
18
|
RunStatementClauseExpected = 16,
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
CatchClauseOrFinallyClauseExpected = 17,
|
20
|
+
PackageImportExpected = 18,
|
21
|
+
UsingDirectiveOrSourceFileMemberExpected = 19,
|
22
22
|
TypeMemberTranslationExpected = 20,
|
23
23
|
TranslationExpected = 21,
|
24
24
|
Expected0But1Found = 22,
|
@@ -30,7 +30,7 @@ export declare enum DiagnosticCode {
|
|
30
30
|
FieldNameCanContainOnlyTwoBackQuote = 28,
|
31
31
|
BackQuotesCanOnlyBeUsedInParameterAndFieldNames = 29,
|
32
32
|
NameThatMatchesKeywordMustBeEnclosedInSingleQuotes = 30,
|
33
|
-
|
33
|
+
TagNameExpected = 31,
|
34
34
|
TypeCannotBeUsedAsValue = 32,
|
35
35
|
PackageMemberNotFound = 33,
|
36
36
|
TypeMemberNotFound = 34,
|
@@ -57,15 +57,15 @@ export declare enum DiagnosticCode {
|
|
57
57
|
MethodNotFound = 55,
|
58
58
|
UnknownPackage = 56,
|
59
59
|
CannotAssignValueToExpression = 57,
|
60
|
-
|
61
|
-
|
60
|
+
NotEveryRequiredParameterIsProvidedWithArgument = 58,
|
61
|
+
ParameterForPositionalArgumentNotFound = 59,
|
62
62
|
CannotDetermineTargetTypeToCallTheConstructor = 60,
|
63
63
|
AmbiguousAccess = 61,
|
64
64
|
PackageNameConflictsWithDeclarationName = 62,
|
65
65
|
CanNotAssignValueToContextVariable = 63,
|
66
66
|
ExpectedPackageNameOrAliasButFoundType = 64,
|
67
67
|
TypeExpected = 65,
|
68
|
-
|
68
|
+
NameOfTypeOrPackageNotFound = 66,
|
69
69
|
TypeIsNotATag = 67,
|
70
70
|
ExpressionOfType0CanNotBeUsedForEnumeration = 68,
|
71
71
|
Operator0IsNotDefinedForTypes1And2 = 69,
|
@@ -89,7 +89,7 @@ export declare enum DiagnosticCode {
|
|
89
89
|
YieldStatementCanNotBeUsedInAnonymousMethods = 87,
|
90
90
|
YieldStatementCanNotBeUsedHere = 88,
|
91
91
|
MethodsUsingYieldStatementMustHaveEnumerableAsReturnType = 89,
|
92
|
-
|
92
|
+
YieldStatementCanNotBeUsedInRunStatementThatHasCatchClause = 90,
|
93
93
|
YieldStatementCanNotBeUsedInFinallyClause = 91,
|
94
94
|
SubprogramMustReturnValue = 92,
|
95
95
|
ResultVariableCanNotBeUsedInMethodsUsingYieldStatement = 93,
|
@@ -110,12 +110,16 @@ export declare enum DiagnosticCode {
|
|
110
110
|
Operator0MustHaveOneParameter = 108,
|
111
111
|
Operator0MustHaveNoMoreThanOneParameter = 109,
|
112
112
|
CorrespondingRedefinableTypeMemberNotFound = 110,
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
113
|
+
ConstructorCanNotBeRedefinable = 111,
|
114
|
+
ConstructorCanNotBeRedefined = 112,
|
115
|
+
AsyncMethodCanOnlyBeCalledFromMethodMarkedWithAsyncModifier = 113,
|
116
|
+
TagNotFound = 114,
|
117
|
+
TypeOrMethodNameExpected = 115,
|
118
|
+
PackageNameOrAliasExpected = 116,
|
119
|
+
CanNotFindTsLibDirectoryBaseSearchPaths0 = 117,
|
120
|
+
SourceFile0IsNotPartOfThePackageAndWontBeLoaded = 118,
|
121
|
+
ProgramWithoutMainPackageCanNotBeCompiled = 119,
|
122
|
+
JsonConfigurationValidationError = 120,
|
123
|
+
StandardPackage0NotFound = 121,
|
124
|
+
Declaration0NotFoundInStandardPackage1 = 122
|
121
125
|
}
|
@@ -1,49 +1,5 @@
|
|
1
1
|
import { PackageLocale } from '../common/index.js';
|
2
2
|
import { OperatorKind } from '../entities/OperatorKind.js';
|
3
|
-
export declare const enum EmitterGeneratedDeclarationKind {
|
4
|
-
MainFunction = 0,
|
5
|
-
PackageConstructor = 1,
|
6
|
-
PackageRunFunction = 2,
|
7
|
-
PlainObjectConstructorPrefix = 3,
|
8
|
-
ExtensionConstructor = 4,
|
9
|
-
ExtensionMethodTargetParameter = 5,
|
10
|
-
GlobalVariableGetterPrefix = 6,
|
11
|
-
GlobalVariableSetterPrefix = 7,
|
12
|
-
TypeVariableGetterPrefix = 8,
|
13
|
-
TypeVariableSetterPrefix = 9,
|
14
|
-
TypeIndexedElementGetter = 10,
|
15
|
-
TypeIndexedElementSetter = 11,
|
16
|
-
TypeDereferencedVariable = 12,
|
17
|
-
TypeDereferencedVariableGetter = 13,
|
18
|
-
TypeDereferencedVariableSetter = 14,
|
19
|
-
TypeBackingVariablePrefix = 15,
|
20
|
-
TempVariablePrefix = 16,
|
21
|
-
DefaultImportPrefix = 17,
|
22
|
-
NamespaceImportPrefix = 18,
|
23
|
-
RefCountVariable = 19,
|
24
|
-
AddReferenceMethod = 20,
|
25
|
-
RemoveReferenceMethod = 21,
|
26
|
-
ShallowCopyMethod = 22,
|
27
|
-
MergedConstructorIdParameter = 23,
|
28
|
-
MergedConstructorParameterPrefix = 24,
|
29
|
-
AnonymousType = 25,
|
30
|
-
PlainObjectMethodNewThisVariable = 26,
|
31
|
-
PlainObjectMethodResultNewThisProperty = 27,
|
32
|
-
PlainObjectMethodResultResultProperty = 28,
|
33
|
-
ProxyVariable = 29,
|
34
|
-
TypeConstructor = 30,
|
35
|
-
TypeExtensionPrefix = 31
|
36
|
-
}
|
37
|
-
export declare const emitterGeneratedDeclarationNamesByLocale: {
|
38
|
-
[T in PackageLocale]: {
|
39
|
-
[T in EmitterGeneratedDeclarationKind]: string;
|
40
|
-
};
|
41
|
-
};
|
42
|
-
export declare const operatorNamesByLocale: {
|
43
|
-
[T in PackageLocale]: {
|
44
|
-
[T in OperatorKind]: string;
|
45
|
-
};
|
46
|
-
};
|
47
3
|
export declare class EmitPhaseName {
|
48
4
|
static ofMainFunction(locale: PackageLocale): string;
|
49
5
|
static ofPackageConstructor(locale: PackageLocale): string;
|
@@ -78,4 +34,5 @@ export declare class EmitPhaseName {
|
|
78
34
|
static ofTypeConstructor(locale: PackageLocale): string;
|
79
35
|
static ofTypeExtension(locale: PackageLocale, extendedTypeName: string): string;
|
80
36
|
static ofOperator(locale: PackageLocale, kind: OperatorKind): string;
|
37
|
+
static ofSetterParameter(locale: PackageLocale): string;
|
81
38
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { Analyzer } from '../analysis/Analyzer.js';
|
2
2
|
import * as analyzerEntities from '../entities/index.js';
|
3
|
-
import { Type, TypeOrExtensionEntity } from './Entities.js';
|
3
|
+
import { Type, TypeMemberEntity, TypeOrExtensionEntity } from './Entities.js';
|
4
4
|
import { EntityMap } from './EntityMap.js';
|
5
5
|
import { Expression } from './ir/index.js';
|
6
6
|
export declare class EmitterContext {
|
@@ -21,6 +21,9 @@ export declare class EmitterContext {
|
|
21
21
|
unaliasTypeEntity(typeEntity: TypeOrExtensionEntity): Type;
|
22
22
|
unaliasType(type: Type): Type;
|
23
23
|
isTypeEmittedAsClass(entity: TypeOrExtensionEntity): boolean;
|
24
|
+
isRefOrPlainObjectTypeEntity(entity: TypeOrExtensionEntity): boolean;
|
25
|
+
isAspectTypeEntity(entity: TypeOrExtensionEntity): boolean;
|
26
|
+
enumerateAllOverriddenMembers<T extends TypeMemberEntity>(entity: T): Iterable<T>;
|
24
27
|
}
|
25
28
|
declare class TypeUtils {
|
26
29
|
private readonly _ectx;
|
@@ -6,7 +6,7 @@ export interface MethodEntity {
|
|
6
6
|
name: string;
|
7
7
|
parameters: readonly VariableEntity[];
|
8
8
|
returnType: Type;
|
9
|
-
|
9
|
+
ifTypeMemberThenContainingType: TypeOrExtensionEntity | undefined;
|
10
10
|
isPackageMember: boolean;
|
11
11
|
containingPackage: PackageEntity;
|
12
12
|
details: MethodEntityDetails;
|
@@ -18,48 +18,81 @@ export declare enum MethodEntityKind {
|
|
18
18
|
Destructor = 3,
|
19
19
|
Operator = 4
|
20
20
|
}
|
21
|
-
export declare class MethodEntityDetails {
|
21
|
+
export declare class MethodEntityDetails implements TypeMemberEntityDetails {
|
22
22
|
isAsync: boolean;
|
23
23
|
isPackageConstructor: boolean;
|
24
24
|
isPackageEntryPoint: boolean;
|
25
|
-
|
25
|
+
overriddenMembers: readonly MethodEntity[];
|
26
26
|
ifRedefinableAliasTypeMethodThenRealMethod: MethodEntity | undefined;
|
27
|
-
isEnumeratorMethod: boolean;
|
28
27
|
isDefaultExport: boolean;
|
29
28
|
isAliasTypeOrExtensionMemberThatRequiresLowering: boolean;
|
30
29
|
isBuiltInOperator: boolean;
|
31
|
-
|
30
|
+
hasComputedName: ComputedNameInfo | undefined;
|
32
31
|
isRedefinable: boolean;
|
33
32
|
isTypeExtensionMemberAddedToPrototype: boolean;
|
33
|
+
isAbstract: boolean;
|
34
|
+
isStatic: boolean;
|
35
|
+
}
|
36
|
+
export interface ComputedNameInfo {
|
37
|
+
/**
|
38
|
+
* Глобальная или статическая переменная, содержащая уникальный символ (Symbol). Используется в качестве ключа.
|
39
|
+
*/
|
40
|
+
readonly symbolDeclaration: VariableEntity;
|
41
|
+
/**
|
42
|
+
* Нужно ли использовать вычисляемое имя в месте объявления, или только в местах использования?
|
43
|
+
*/
|
44
|
+
readonly affectsDeclaration: boolean;
|
45
|
+
/**
|
46
|
+
* Должны ли члены типы, заменяющие этот член, использовать указанный символ в качестве ключа?
|
47
|
+
*/
|
48
|
+
readonly affectsDerivedMembers: boolean;
|
34
49
|
}
|
35
50
|
export interface VariableEntity {
|
36
51
|
readonly kind: 'variable';
|
37
52
|
name: string;
|
38
53
|
type: Type;
|
39
|
-
|
54
|
+
ifTypeMemberThenContainingType: TypeOrExtensionEntity | undefined;
|
40
55
|
isPackageMember: boolean;
|
41
56
|
containingPackage: PackageEntity;
|
42
57
|
getter: MethodEntity | undefined;
|
43
58
|
setter: MethodEntity | undefined;
|
44
59
|
details: VariableEntityDetails;
|
45
60
|
}
|
46
|
-
export declare class VariableEntityDetails {
|
61
|
+
export declare class VariableEntityDetails implements TypeMemberEntityDetails {
|
47
62
|
isVariadicParameter: boolean;
|
48
|
-
|
63
|
+
overriddenMembers: readonly VariableEntity[];
|
49
64
|
isProxiedTypeVariable: ProxiedTypeVariableInfo | undefined;
|
50
65
|
isDefaultExport: boolean;
|
51
|
-
|
66
|
+
hasComputedName: ComputedNameInfo | undefined;
|
52
67
|
isRedefinable: boolean;
|
68
|
+
isAbstract: boolean;
|
69
|
+
isTypeExtensionMemberAddedToPrototype: boolean;
|
70
|
+
isStatic: boolean;
|
53
71
|
}
|
54
72
|
export interface ProxiedTypeVariableInfo {
|
55
73
|
readonly tagType: TypeOrExtensionEntity;
|
56
74
|
readonly constructor: MethodEntity;
|
57
75
|
}
|
58
76
|
export type TypeMemberEntity = MethodEntity | VariableEntity;
|
77
|
+
interface TypeMemberEntityDetails {
|
78
|
+
isStatic: boolean;
|
79
|
+
isAbstract: boolean;
|
80
|
+
isRedefinable: boolean;
|
81
|
+
overriddenMembers: readonly TypeMemberEntity[];
|
82
|
+
hasComputedName: ComputedNameInfo | undefined;
|
83
|
+
isTypeExtensionMemberAddedToPrototype: boolean;
|
84
|
+
}
|
59
85
|
export interface TypeOrExtensionEntity {
|
60
86
|
readonly kind: 'type-or-extension';
|
61
87
|
name: string;
|
62
|
-
|
88
|
+
/**
|
89
|
+
* Базовый объектный тип, не являющийся псевдонимом.
|
90
|
+
*/
|
91
|
+
baseObjectType: TypeOrExtensionEntity | undefined;
|
92
|
+
/**
|
93
|
+
* Базовые аспектные типы, не являющиеся псевдонимами.
|
94
|
+
*/
|
95
|
+
baseAspectTypes: readonly TypeOrExtensionEntity[];
|
63
96
|
typeOrExtensionKind: TypeOrExtensionEntityKind;
|
64
97
|
members: readonly TypeMemberEntity[];
|
65
98
|
containingPackage: PackageEntity;
|
@@ -70,6 +103,12 @@ export declare class TypeOrExtensionEntityDetails {
|
|
70
103
|
aliasedType: Type | undefined;
|
71
104
|
isDefaultExport: boolean;
|
72
105
|
extendedType: TypeOrExtensionEntity | undefined;
|
106
|
+
/**
|
107
|
+
* Является ли имя члена типа вычисляемым (`details.hasComputedName`) может зависеть от заменённых членов типа.
|
108
|
+
* Если `areOwnComputedNamesOfMembersResolved` === `true`, поля `details.hasComputedName` членов типа хранят
|
109
|
+
* актуальную для них самих информацию, и анализ заменённых членов типа не требуется.
|
110
|
+
*/
|
111
|
+
areOwnComputedNamesOfMembersResolved: boolean;
|
73
112
|
}
|
74
113
|
export declare enum TypeOrExtensionEntityKind {
|
75
114
|
StructuredType = 0,
|
@@ -97,10 +136,6 @@ export declare class PackageEntityDetails {
|
|
97
136
|
isSource: boolean;
|
98
137
|
isPackageWithMainMethod: boolean;
|
99
138
|
}
|
100
|
-
export interface TypeMemberEntityInfo {
|
101
|
-
containingType: TypeOrExtensionEntity;
|
102
|
-
isStatic: boolean;
|
103
|
-
}
|
104
139
|
export type Type = SimpleType | UnionType;
|
105
140
|
export declare class SimpleType {
|
106
141
|
readonly entity: TypeOrExtensionEntity;
|
@@ -123,7 +158,7 @@ export declare class IntrinsicVariableEntity implements VariableEntity {
|
|
123
158
|
type: Type;
|
124
159
|
containingPackage: PackageEntity;
|
125
160
|
readonly kind = "variable";
|
126
|
-
|
161
|
+
ifTypeMemberThenContainingType: TypeOrExtensionEntity | undefined;
|
127
162
|
isPackageMember: boolean;
|
128
163
|
getter: MethodEntity | undefined;
|
129
164
|
setter: MethodEntity | undefined;
|
@@ -137,7 +172,7 @@ export declare class IntrinsicMethodEntity implements MethodEntity {
|
|
137
172
|
returnType: Type;
|
138
173
|
containingPackage: PackageEntity;
|
139
174
|
readonly kind = "method";
|
140
|
-
|
175
|
+
ifTypeMemberThenContainingType: TypeOrExtensionEntity | undefined;
|
141
176
|
isPackageMember: boolean;
|
142
177
|
details: MethodEntityDetails;
|
143
178
|
constructor(methodEntityKind: MethodEntityKind, name: string, parameters: readonly VariableEntity[], returnType: Type, containingPackage: PackageEntity);
|
@@ -150,3 +185,4 @@ export declare class IntrinsicPackageEntity implements PackageEntity {
|
|
150
185
|
details: PackageEntityDetails;
|
151
186
|
constructor(name: string, locale: PackageLocale);
|
152
187
|
}
|
188
|
+
export {};
|
@@ -16,11 +16,8 @@ export declare class EntityMap {
|
|
16
16
|
private readonly _typeOrExtensions;
|
17
17
|
private readonly _packages;
|
18
18
|
private readonly _linkedPackages;
|
19
|
-
private readonly _enumeratorMethod;
|
20
|
-
private get enumeratorMethod();
|
21
19
|
constructor(analyzer: Analyzer, targetPlatform: PlatformKind);
|
22
20
|
getVariableEntity(entity: analyzerEntities.VariableEntity): emitterEntities.VariableEntity;
|
23
|
-
getVariantEntity(entity: analyzerEntities.VariantEntity): emitterEntities.VariableEntity;
|
24
21
|
getMethodEntity(entity: analyzerEntities.MethodEntity): emitterEntities.MethodEntity;
|
25
22
|
getOperatorEntity(entity: analyzerEntities.OperatorEntity): emitterEntities.MethodEntity;
|
26
23
|
getConstructorEntity(entity: analyzerEntities.ConstructorEntity): emitterEntities.MethodEntity;
|
@@ -41,4 +38,5 @@ export declare class EntityMap {
|
|
41
38
|
private getContainingPackageAndAccumulateIfMember;
|
42
39
|
private getNameText;
|
43
40
|
private isDefaultExport;
|
41
|
+
private unaliasTypeEntity;
|
44
42
|
}
|
@@ -46,11 +46,13 @@ export declare class IrBuilder {
|
|
46
46
|
private buildTypeMethodDeclaration;
|
47
47
|
private buildOperatorDeclaration;
|
48
48
|
private buildTypeVariableDeclaration;
|
49
|
-
private
|
49
|
+
private buildComputedTypeVariableDeclaration;
|
50
|
+
private buildTypeVariableGetterDeclarationRequired;
|
50
51
|
private buildTypeVariableSetterDeclaration;
|
51
52
|
private buildBackingTypeVariable;
|
52
53
|
private buildDisposeStatement;
|
53
54
|
private buildRunStatement;
|
55
|
+
private buildTryStatement;
|
54
56
|
private buildEmptyStatement;
|
55
57
|
private buildErrorStatement;
|
56
58
|
private buildExpressionStatement;
|
@@ -99,7 +101,9 @@ export declare class IrBuilder {
|
|
99
101
|
private buildIdentifierExpression;
|
100
102
|
private createExplicitReceiver;
|
101
103
|
private getEntityFromType;
|
102
|
-
private
|
104
|
+
private buildArgumentList;
|
105
|
+
private buildDecorators;
|
106
|
+
private buildTagAsDecorator;
|
103
107
|
private buildAndSaveTypeIfIsAnonymousTypeSpecifier;
|
104
108
|
private buildAndSaveAnonymousTypeDeclaration;
|
105
109
|
private buildAnonymousStructuredTypeDeclaration;
|
@@ -65,6 +65,7 @@ export declare class IrToJs {
|
|
65
65
|
private convertJsIdentifierExpression;
|
66
66
|
private convertPrefixUnaryExpression;
|
67
67
|
private convertTextLiteral;
|
68
|
+
private convertTextWithEntityName;
|
68
69
|
private convertTextTemplateLiteral;
|
69
70
|
private convertTernaryExpression;
|
70
71
|
private convertThisExpression;
|
@@ -75,11 +76,10 @@ export declare class IrToJs {
|
|
75
76
|
private convertTypeAccessExpression;
|
76
77
|
private convertVariableAccessExpression;
|
77
78
|
private convertMethodAccessExpression;
|
78
|
-
private convertVariantAccessExpression;
|
79
79
|
private convertTypeVariableAccessExpression;
|
80
80
|
private convertTypeMethodAccessExpression;
|
81
81
|
private convertConstructorCallExpression;
|
82
|
-
private
|
82
|
+
private convertArguments;
|
83
83
|
private convertInlineJsExpression;
|
84
84
|
private convertAssignmentExpression;
|
85
85
|
private convertCommaExpression;
|
@@ -109,9 +109,10 @@ export declare class IrToJs {
|
|
109
109
|
private convertTypeConstructorDeclaration;
|
110
110
|
private convertTypeMethodDeclaration;
|
111
111
|
private convertTypeVariableDeclaration;
|
112
|
-
private
|
113
|
-
private
|
112
|
+
private convertComputedTypeVariableDeclaration;
|
113
|
+
private convertDecorator;
|
114
114
|
private addNodeLocation;
|
115
115
|
private getEntityName;
|
116
116
|
private convertArrayWithErrorBoundary;
|
117
|
+
private isLValue;
|
117
118
|
}
|