@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
@@ -11,107 +11,115 @@ export declare enum DiagnosticCode {
|
|
11
11
|
TypeSpecifierExpected = 9,
|
12
12
|
TypeBodyExpected = 10,
|
13
13
|
MethodCallArgumentExpected = 11,
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
14
|
+
IndexedAccessArgumentExpected = 12,
|
15
|
+
TagArgumentExpected = 13,
|
16
|
+
TypeParameterExpected = 14,
|
17
|
+
ParameterExpected = 15,
|
18
|
+
RunStatementClauseExpected = 16,
|
19
|
+
CatchClauseOrFinallyClauseExpected = 17,
|
20
|
+
PackageImportExpected = 18,
|
21
|
+
UsingDirectiveOrSourceFileMemberExpected = 19,
|
22
|
+
TypeMemberTranslationExpected = 20,
|
23
|
+
TranslationExpected = 21,
|
24
|
+
Expected0But1Found = 22,
|
25
|
+
InvalidTextTemplateLiteral = 23,
|
26
|
+
RunKeywordOnCreateKeywordOrModifierListExpected = 24,
|
27
|
+
ModifierListExpected = 25,
|
28
|
+
HidingLevelExpected = 26,
|
29
|
+
ParameterNameCanContainOnlyOneBackQuote = 27,
|
30
|
+
FieldNameCanContainOnlyTwoBackQuote = 28,
|
31
|
+
BackQuotesCanOnlyBeUsedInParameterAndFieldNames = 29,
|
32
|
+
NameThatMatchesKeywordMustBeEnclosedInSingleQuotes = 30,
|
33
|
+
TagNameExpected = 31,
|
34
|
+
TypeCannotBeUsedAsValue = 32,
|
35
|
+
PackageMemberNotFound = 33,
|
36
|
+
TypeMemberNotFound = 34,
|
37
|
+
CannotAccessStaticMembersOnTypeParameter = 35,
|
38
|
+
IndexerOfTheSpecifiedTypeNotFound = 36,
|
39
|
+
DereferenceOperatorOfTheSpecifiedTypeNotFound = 37,
|
40
|
+
IndexerNotFound = 38,
|
41
|
+
CannotCreateInstanceOfAspect = 39,
|
42
|
+
CannotCreateInstanceOfTypeParameter = 40,
|
43
|
+
CannotCreateInstanceOfUnresolvedType = 41,
|
44
|
+
TypeConstructorNotFound = 42,
|
45
|
+
CannotInvokeExpression = 43,
|
46
|
+
NamedArgumentExpectedButPositionalArgumentFound = 44,
|
47
|
+
ParameterWithGivenNameNotFound = 45,
|
48
|
+
ArgumentForParameterAlreadyPassed = 46,
|
49
|
+
PackageAliasCannotBeUsedAsValue = 47,
|
50
|
+
PackageNameCannotBeUsedAsValue = 48,
|
51
|
+
UnknownVariable = 49,
|
52
|
+
UnknownType = 50,
|
53
|
+
TypeWithArity0NotFound = 51,
|
54
|
+
VariableUsedBeforeBeingDeclared = 52,
|
55
|
+
Type0IsNotAssignableToType1 = 53,
|
56
|
+
VariableNotFound = 54,
|
57
|
+
MethodNotFound = 55,
|
58
|
+
UnknownPackage = 56,
|
59
|
+
CannotAssignValueToExpression = 57,
|
60
|
+
NotEveryRequiredParameterIsProvidedWithArgument = 58,
|
61
|
+
ParameterForPositionalArgumentNotFound = 59,
|
62
|
+
CannotDetermineTargetTypeToCallTheConstructor = 60,
|
63
|
+
AmbiguousAccess = 61,
|
64
|
+
PackageNameConflictsWithDeclarationName = 62,
|
65
|
+
CanNotAssignValueToContextVariable = 63,
|
66
|
+
ExpectedPackageNameOrAliasButFoundType = 64,
|
67
|
+
TypeExpected = 65,
|
68
|
+
NameOfTypeOrPackageNotFound = 66,
|
69
|
+
TypeIsNotATag = 67,
|
70
|
+
ExpressionOfType0CanNotBeUsedForEnumeration = 68,
|
71
|
+
Operator0IsNotDefinedForTypes1And2 = 69,
|
72
|
+
Operator0IsNotDefinedForType1 = 70,
|
73
|
+
VariantMustHaveAssociatedValue = 71,
|
74
|
+
PackageMemberOrPackageNotFound = 72,
|
75
|
+
TranslationsCanOnlyBeDeclaredInTranslationPackage = 73,
|
76
|
+
UnknownTranslatedPackage0 = 74,
|
77
|
+
BaseCannotBeUsedInThisContext = 75,
|
78
|
+
OverriddenMethodNotFound = 76,
|
79
|
+
ObjectCannotBeUsedInThisContext = 77,
|
80
|
+
BaseCannotBeUsedAsAnExpressionInItself = 78,
|
81
|
+
InterfacePackageMustNotContainImplementation = 79,
|
82
|
+
InterfacePackageVariablesMustNotHaveInitializers = 80,
|
83
|
+
BodyIsMissing = 81,
|
84
|
+
AbstractTypeMembersMustNotHaveBody = 82,
|
85
|
+
AbstractVariablesMustNotHaveInitializers = 83,
|
86
|
+
PackageIsAlreadyImportedInAnotherLanguage = 84,
|
87
|
+
OnlySubprogramsWithReturnTypeCanReturnValue = 85,
|
88
|
+
MethodsUsingYieldStatementCanNotReturnValue = 86,
|
89
|
+
YieldStatementCanNotBeUsedInAnonymousMethods = 87,
|
90
|
+
YieldStatementCanNotBeUsedHere = 88,
|
91
|
+
MethodsUsingYieldStatementMustHaveEnumerableAsReturnType = 89,
|
92
|
+
YieldStatementCanNotBeUsedInRunStatementThatHasCatchClause = 90,
|
93
|
+
YieldStatementCanNotBeUsedInFinallyClause = 91,
|
94
|
+
SubprogramMustReturnValue = 92,
|
95
|
+
ResultVariableCanNotBeUsedInMethodsUsingYieldStatement = 93,
|
96
|
+
TypeAliasReferencesItself = 94,
|
97
|
+
TypeParameterHasCircularConstraint = 95,
|
98
|
+
BaseTypeCausesInheritanceCycle = 96,
|
99
|
+
OnlyGenericTypesAndFunctionsCanBeSpecialized = 97,
|
100
|
+
Expected0TypeArguments = 98,
|
101
|
+
ExpectedFrom0To1TypeArguments = 99,
|
102
|
+
Type0IsNotAssignableToConstraint1 = 100,
|
103
|
+
VariableIsDeclaredButNotUsed = 101,
|
104
|
+
DefaultConstructorArgumentsMustBeNamed = 102,
|
105
|
+
IncorrectBodyOfRedefinableAliasTypeMethod = 103,
|
106
|
+
TheFollowingDeclarationsAreNotTranslated0 = 104,
|
107
|
+
TheFollowingDeclarationAreNotTranslated0And1More = 105,
|
108
|
+
OperatorMustNotBeStatic = 106,
|
109
|
+
Operator0MustNotHaveParameters = 107,
|
110
|
+
Operator0MustHaveOneParameter = 108,
|
111
|
+
Operator0MustHaveNoMoreThanOneParameter = 109,
|
112
|
+
CorrespondingRedefinableTypeMemberNotFound = 110,
|
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
|
117
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,5 +1,6 @@
|
|
1
1
|
import { Analyzer } from '../analysis/Analyzer.js';
|
2
|
-
import
|
2
|
+
import * as analyzerEntities from '../entities/index.js';
|
3
|
+
import { Type, TypeMemberEntity, TypeOrExtensionEntity } from './Entities.js';
|
3
4
|
import { EntityMap } from './EntityMap.js';
|
4
5
|
import { Expression } from './ir/index.js';
|
5
6
|
export declare class EmitterContext {
|
@@ -8,10 +9,21 @@ export declare class EmitterContext {
|
|
8
9
|
readonly type: TypeUtils;
|
9
10
|
readonly standardTypes: StandardTypes;
|
10
11
|
private readonly _integerTypeEntity;
|
12
|
+
private readonly _jsObjectType;
|
13
|
+
private readonly _jsSymbolType;
|
14
|
+
private readonly _originalPlatformJavaScriptPackage;
|
11
15
|
get integerTypeEntity(): TypeOrExtensionEntity;
|
16
|
+
get originalPlatformJavaScriptPackage(): analyzerEntities.PackageEntity;
|
17
|
+
get jsObjectType(): TypeOrExtensionEntity;
|
18
|
+
get jsSymbolType(): TypeOrExtensionEntity;
|
12
19
|
constructor(analyzer: Analyzer, entityMap: EntityMap);
|
13
20
|
createIdentitySubstitutedType(entity: TypeOrExtensionEntity): Type;
|
14
21
|
unaliasTypeEntity(typeEntity: TypeOrExtensionEntity): Type;
|
22
|
+
unaliasType(type: Type): Type;
|
23
|
+
isTypeEmittedAsClass(entity: TypeOrExtensionEntity): boolean;
|
24
|
+
isRefOrPlainObjectTypeEntity(entity: TypeOrExtensionEntity): boolean;
|
25
|
+
isAspectTypeEntity(entity: TypeOrExtensionEntity): boolean;
|
26
|
+
enumerateAllOverriddenMembers<T extends TypeMemberEntity>(entity: T): Iterable<T>;
|
15
27
|
}
|
16
28
|
declare class TypeUtils {
|
17
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,43 +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;
|
30
|
+
hasComputedName: ComputedNameInfo | undefined;
|
31
|
+
isRedefinable: boolean;
|
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;
|
31
49
|
}
|
32
50
|
export interface VariableEntity {
|
33
51
|
readonly kind: 'variable';
|
34
52
|
name: string;
|
35
53
|
type: Type;
|
36
|
-
|
54
|
+
ifTypeMemberThenContainingType: TypeOrExtensionEntity | undefined;
|
37
55
|
isPackageMember: boolean;
|
38
56
|
containingPackage: PackageEntity;
|
39
57
|
getter: MethodEntity | undefined;
|
40
58
|
setter: MethodEntity | undefined;
|
41
59
|
details: VariableEntityDetails;
|
42
60
|
}
|
43
|
-
export declare class VariableEntityDetails {
|
61
|
+
export declare class VariableEntityDetails implements TypeMemberEntityDetails {
|
44
62
|
isVariadicParameter: boolean;
|
45
|
-
|
63
|
+
overriddenMembers: readonly VariableEntity[];
|
46
64
|
isProxiedTypeVariable: ProxiedTypeVariableInfo | undefined;
|
47
65
|
isDefaultExport: boolean;
|
66
|
+
hasComputedName: ComputedNameInfo | undefined;
|
67
|
+
isRedefinable: boolean;
|
68
|
+
isAbstract: boolean;
|
69
|
+
isTypeExtensionMemberAddedToPrototype: boolean;
|
70
|
+
isStatic: boolean;
|
48
71
|
}
|
49
72
|
export interface ProxiedTypeVariableInfo {
|
50
73
|
readonly tagType: TypeOrExtensionEntity;
|
51
74
|
readonly constructor: MethodEntity;
|
52
75
|
}
|
53
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
|
+
}
|
54
85
|
export interface TypeOrExtensionEntity {
|
55
86
|
readonly kind: 'type-or-extension';
|
56
87
|
name: string;
|
57
|
-
|
88
|
+
/**
|
89
|
+
* Базовый объектный тип, не являющийся псевдонимом.
|
90
|
+
*/
|
91
|
+
baseObjectType: TypeOrExtensionEntity | undefined;
|
92
|
+
/**
|
93
|
+
* Базовые аспектные типы, не являющиеся псевдонимами.
|
94
|
+
*/
|
95
|
+
baseAspectTypes: readonly TypeOrExtensionEntity[];
|
58
96
|
typeOrExtensionKind: TypeOrExtensionEntityKind;
|
59
97
|
members: readonly TypeMemberEntity[];
|
60
98
|
containingPackage: PackageEntity;
|
@@ -65,6 +103,12 @@ export declare class TypeOrExtensionEntityDetails {
|
|
65
103
|
aliasedType: Type | undefined;
|
66
104
|
isDefaultExport: boolean;
|
67
105
|
extendedType: TypeOrExtensionEntity | undefined;
|
106
|
+
/**
|
107
|
+
* Является ли имя члена типа вычисляемым (`details.hasComputedName`) может зависеть от заменённых членов типа.
|
108
|
+
* Если `areOwnComputedNamesOfMembersResolved` === `true`, поля `details.hasComputedName` членов типа хранят
|
109
|
+
* актуальную для них самих информацию, и анализ заменённых членов типа не требуется.
|
110
|
+
*/
|
111
|
+
areOwnComputedNamesOfMembersResolved: boolean;
|
68
112
|
}
|
69
113
|
export declare enum TypeOrExtensionEntityKind {
|
70
114
|
StructuredType = 0,
|
@@ -92,21 +136,19 @@ export declare class PackageEntityDetails {
|
|
92
136
|
isSource: boolean;
|
93
137
|
isPackageWithMainMethod: boolean;
|
94
138
|
}
|
95
|
-
export interface TypeMemberEntityInfo {
|
96
|
-
containingType: TypeOrExtensionEntity;
|
97
|
-
isStatic: boolean;
|
98
|
-
}
|
99
139
|
export type Type = SimpleType | UnionType;
|
100
140
|
export declare class SimpleType {
|
101
141
|
readonly entity: TypeOrExtensionEntity;
|
102
142
|
readonly typeArguments: readonly Type[];
|
103
143
|
readonly kind = "simple";
|
104
144
|
constructor(entity: TypeOrExtensionEntity, typeArguments: readonly Type[]);
|
145
|
+
equals(other: Type): boolean;
|
105
146
|
}
|
106
147
|
export declare class UnionType {
|
107
148
|
readonly types: readonly Type[];
|
108
149
|
readonly kind = "union";
|
109
150
|
constructor(types: readonly Type[]);
|
151
|
+
equals(other: Type): boolean;
|
110
152
|
}
|
111
153
|
export type Entity = VariableEntity | MethodEntity | TypeOrExtensionEntity | PackageEntity;
|
112
154
|
export type NamedEntity = VariableEntity | MethodEntity | TypeOrExtensionEntity;
|
@@ -116,8 +158,7 @@ export declare class IntrinsicVariableEntity implements VariableEntity {
|
|
116
158
|
type: Type;
|
117
159
|
containingPackage: PackageEntity;
|
118
160
|
readonly kind = "variable";
|
119
|
-
|
120
|
-
isTypeMember: TypeMemberEntityInfo | undefined;
|
161
|
+
ifTypeMemberThenContainingType: TypeOrExtensionEntity | undefined;
|
121
162
|
isPackageMember: boolean;
|
122
163
|
getter: MethodEntity | undefined;
|
123
164
|
setter: MethodEntity | undefined;
|
@@ -131,7 +172,7 @@ export declare class IntrinsicMethodEntity implements MethodEntity {
|
|
131
172
|
returnType: Type;
|
132
173
|
containingPackage: PackageEntity;
|
133
174
|
readonly kind = "method";
|
134
|
-
|
175
|
+
ifTypeMemberThenContainingType: TypeOrExtensionEntity | undefined;
|
135
176
|
isPackageMember: boolean;
|
136
177
|
details: MethodEntityDetails;
|
137
178
|
constructor(methodEntityKind: MethodEntityKind, name: string, parameters: readonly VariableEntity[], returnType: Type, containingPackage: PackageEntity);
|
@@ -144,3 +185,4 @@ export declare class IntrinsicPackageEntity implements PackageEntity {
|
|
144
185
|
details: PackageEntityDetails;
|
145
186
|
constructor(name: string, locale: PackageLocale);
|
146
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;
|
@@ -56,7 +56,6 @@ export declare class IrToJs {
|
|
56
56
|
private convertCharLiteral;
|
57
57
|
private convertNoneLiteral;
|
58
58
|
private convertIndexedAccessExpression;
|
59
|
-
private convertHelperMethodCallExpression;
|
60
59
|
private convertIntegerLiteral;
|
61
60
|
private convertNumericLiteral;
|
62
61
|
private convertMethodLiteral;
|
@@ -66,6 +65,7 @@ export declare class IrToJs {
|
|
66
65
|
private convertJsIdentifierExpression;
|
67
66
|
private convertPrefixUnaryExpression;
|
68
67
|
private convertTextLiteral;
|
68
|
+
private convertTextWithEntityName;
|
69
69
|
private convertTextTemplateLiteral;
|
70
70
|
private convertTernaryExpression;
|
71
71
|
private convertThisExpression;
|
@@ -76,11 +76,10 @@ export declare class IrToJs {
|
|
76
76
|
private convertTypeAccessExpression;
|
77
77
|
private convertVariableAccessExpression;
|
78
78
|
private convertMethodAccessExpression;
|
79
|
-
private convertVariantAccessExpression;
|
80
79
|
private convertTypeVariableAccessExpression;
|
81
80
|
private convertTypeMethodAccessExpression;
|
82
81
|
private convertConstructorCallExpression;
|
83
|
-
private
|
82
|
+
private convertArguments;
|
84
83
|
private convertInlineJsExpression;
|
85
84
|
private convertAssignmentExpression;
|
86
85
|
private convertCommaExpression;
|
@@ -110,9 +109,10 @@ export declare class IrToJs {
|
|
110
109
|
private convertTypeConstructorDeclaration;
|
111
110
|
private convertTypeMethodDeclaration;
|
112
111
|
private convertTypeVariableDeclaration;
|
113
|
-
private
|
114
|
-
private
|
112
|
+
private convertComputedTypeVariableDeclaration;
|
113
|
+
private convertDecorator;
|
115
114
|
private addNodeLocation;
|
116
115
|
private getEntityName;
|
117
116
|
private convertArrayWithErrorBoundary;
|
117
|
+
private isLValue;
|
118
118
|
}
|