@artel/artc 0.6.25272 → 0.6.25273
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 +2 -2
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +188 -238
- package/build/{chunk-2SRNQ3Z6.js → chunk-7EXJHYWX.js} +1934 -1335
- package/build/{chunk-IVVTDCLH.js → chunk-GOQZ6DP3.js} +1 -1
- package/build/{chunk-6SPB6XSH.js → chunk-W3SQYLD5.js} +2 -2
- package/build/types/analysis/AnalyzedTextTranslationPackage.d.ts +3 -2
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +1 -1
- package/build/types/analysis/Analyzer.d.ts +14 -4
- package/build/types/analysis/DiagnosticCollector.d.ts +7 -0
- package/build/types/analysis/TextIdentity.d.ts +9 -0
- package/build/types/common/Constants.d.ts +1 -1
- package/build/types/common/PackageDialect.d.ts +2 -3
- package/build/types/common/Query.d.ts +4 -0
- package/build/types/diagnostic/DiagnosticCode.d.ts +98 -92
- package/build/types/emitter/EmitterContext.d.ts +2 -2
- package/build/types/emitter/IrBuilder.d.ts +0 -1
- package/build/types/emitter/IrToJs.d.ts +4 -0
- package/build/types/emitter/Transformer.d.ts +35 -15
- package/build/types/emitter/ir/types.d.ts +1 -1
- package/build/types/entities/interfaces/TextTranslationEntity.d.ts +2 -2
- package/build/types/entities/source/SourceTextTranslationEntity.d.ts +3 -2
- package/build/types/project/configuration/types/PackageConfigurationEn.d.ts +0 -1
- package/build/types/project/configuration/types/PackageConfigurationRu.d.ts +0 -1
- package/build/types/tree/NodeKind.d.ts +58 -60
- package/build/types/tree/Nodes.d.ts +4 -30
- package/build/types/tree/SyntaxToCode.d.ts +0 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Compiler
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GOQZ6DP3.js";
|
|
4
4
|
import {
|
|
5
5
|
ArtelVersion,
|
|
6
6
|
Cached,
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
__async,
|
|
15
15
|
performanceMeasurementStageNames,
|
|
16
16
|
performanceMeasurementStages
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-7EXJHYWX.js";
|
|
18
18
|
|
|
19
19
|
// source/executor/FileSystemUri.ts
|
|
20
20
|
import { platform } from "os";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { PackageLocale } from '../common/index.js';
|
|
2
|
-
import { PackageEntity, TextTranslationEntity
|
|
2
|
+
import { PackageEntity, TextTranslationEntity } from '../entities/index.js';
|
|
3
3
|
import { PackageName, TextTranslationPackage } from '../project/index.js';
|
|
4
4
|
import { Analyzer } from './Analyzer.js';
|
|
5
|
+
import { TextKey } from './TextIdentity.js';
|
|
5
6
|
export declare class AnalyzedTextTranslationPackage {
|
|
6
7
|
private readonly analyzer;
|
|
7
8
|
private readonly package_;
|
|
@@ -13,7 +14,7 @@ export declare class AnalyzedTextTranslationPackage {
|
|
|
13
14
|
getDefinition(): TextTranslationPackage;
|
|
14
15
|
getTargetPackageName(): PackageName;
|
|
15
16
|
getTranslationLocale(): PackageLocale;
|
|
16
|
-
getEntitiesByTextKey(textKey:
|
|
17
|
+
getEntitiesByTextKey(textKey: TextKey): readonly TextTranslationEntity[] | undefined;
|
|
17
18
|
private createEntitiesByTextKey;
|
|
18
19
|
private enumerableTextTranslationDeclarations;
|
|
19
20
|
private enumerableTranslationsDeclarations;
|
|
@@ -23,7 +23,7 @@ export declare class AnalyzedTranslationPackage {
|
|
|
23
23
|
private readonly typeTranslationByEntity;
|
|
24
24
|
constructor(analyzer: Analyzer, package_: TranslationPackage, targetPackage: PackageEntity);
|
|
25
25
|
getTargetPackage(): PackageEntity;
|
|
26
|
-
|
|
26
|
+
getTranslatedTargetPackage(): PackageEntity;
|
|
27
27
|
getDefinition(): TranslationPackage;
|
|
28
28
|
getTranslatedName(): PackageName;
|
|
29
29
|
getTranslationLocale(): PackageLocale;
|
|
@@ -13,8 +13,8 @@ import { TsInteropContext, TsProgramState } from '../ts-interop/TsInteropContext
|
|
|
13
13
|
import * as types from '../types/index.js';
|
|
14
14
|
import { TypeFactory } from '../types/index.js';
|
|
15
15
|
import { AccessedFunction } from './AccessedFunction.js';
|
|
16
|
-
import { AnalyzedTranslationPackage } from './AnalyzedTranslationPackage.js';
|
|
17
16
|
import { AnalyzedTextTranslationPackage } from './AnalyzedTextTranslationPackage.js';
|
|
17
|
+
import { AnalyzedTranslationPackage } from './AnalyzedTranslationPackage.js';
|
|
18
18
|
import { ArgumentToParameterMatchResult, MatchResultParameter } from './ArgumentToParameterMatchResult.js';
|
|
19
19
|
import * as autotypeCallExpressionMeaning from './AutotypeCallExpressionMeaning.js';
|
|
20
20
|
import * as baseExpressionMeaning from './BaseExpressionMeaning.js';
|
|
@@ -32,8 +32,8 @@ import { DereferencedVariableAccessorDeclaration, FieldAccessorDeclaration, Func
|
|
|
32
32
|
import * as objectExpressionMeaning from './ObjectExpressionMeaning.js';
|
|
33
33
|
import { OwnAndBaseConstructorCallsCheckResult } from './OwnAndBaseConstructorCallsChecker.js';
|
|
34
34
|
import { SourceFileMembers } from './SourceFileMembers.js';
|
|
35
|
-
import * as tagMeaning from './TagMeaning.js';
|
|
36
35
|
import * as tags from './Tag.js';
|
|
36
|
+
import * as tagMeaning from './TagMeaning.js';
|
|
37
37
|
import { TypeMemberImplementationCheckResult } from './TypeMemberImplementationChecker.js';
|
|
38
38
|
import * as controlFlow from './control-flow/index.js';
|
|
39
39
|
import { WellKnownDeclarations } from './index.js';
|
|
@@ -117,6 +117,7 @@ export declare class Analyzer {
|
|
|
117
117
|
constructor(compilation: project.Compilation, tsInteropInputs: TsInteropInputs);
|
|
118
118
|
getProjectSourceFile(node: tree.SourceFile): project.SourceFile;
|
|
119
119
|
checkExpressionCanBeUsedInForLoop(node: tree.Expression): WithDiagnostics<ExpressionCanBeUsedInForLoopCheckResult>;
|
|
120
|
+
expressionCanBeReferenced(node: tree.Expression): boolean;
|
|
120
121
|
isEnumeratorMethodSignature(entity: e.MethodEntity): boolean;
|
|
121
122
|
ifTypeEnumerableThenElementType(type: types.Type): types.Type | undefined;
|
|
122
123
|
ifTypeEnumeratorThenElementType(type: types.Type): types.Type | undefined;
|
|
@@ -263,7 +264,7 @@ export declare class Analyzer {
|
|
|
263
264
|
findAnalyzedTranslationPackageForLocale(entity: e.PackageEntity, locale: PackageLocale): AnalyzedTranslationPackage | undefined;
|
|
264
265
|
getLocalizedPackageWithLocale(originalPackageEntity: e.PackageEntity, locale: PackageLocale): e.PackageEntity | undefined;
|
|
265
266
|
enumerateAnalyzedTranslationPackages(): Query<AnalyzedTranslationPackage>;
|
|
266
|
-
enumerateAnalyzedTextTranslationPackages():
|
|
267
|
+
enumerateAnalyzedTextTranslationPackages(): Query<AnalyzedTextTranslationPackage>;
|
|
267
268
|
getLinkedMultiPlatformPackagesByPlatform(entity: e.PackageEntity): ReadonlyMap<PlatformKind, LinkedMultiPlatformPackage> | undefined;
|
|
268
269
|
getLinkedMultiPlatformPackage(entity: e.PackageEntity, platform: PlatformKind): LinkedMultiPlatformPackage | undefined;
|
|
269
270
|
getTextTranslationPackagesMap(): ReadonlyMap<e.PackageEntity, ReadonlyMap<PackageLocale, AnalyzedTextTranslationPackage>>;
|
|
@@ -875,9 +876,18 @@ export declare class DeclaredTypeMemberEntities {
|
|
|
875
876
|
}
|
|
876
877
|
export declare class ExpressionAnalysisOptions {
|
|
877
878
|
readonly targetType: types.Type | undefined;
|
|
879
|
+
/**
|
|
880
|
+
* Определяет, можно ли кэшировать результат анализа выражений, если результат зависит от целевого типа. Результат
|
|
881
|
+
* анализа, который не зависит от целевого типа, можно кэшировать всегда.
|
|
882
|
+
*/
|
|
878
883
|
readonly allowCaching: boolean;
|
|
879
884
|
readonly isResolvingOverload: boolean;
|
|
880
|
-
constructor(targetType: types.Type | undefined,
|
|
885
|
+
constructor(targetType: types.Type | undefined,
|
|
886
|
+
/**
|
|
887
|
+
* Определяет, можно ли кэшировать результат анализа выражений, если результат зависит от целевого типа. Результат
|
|
888
|
+
* анализа, который не зависит от целевого типа, можно кэшировать всегда.
|
|
889
|
+
*/
|
|
890
|
+
allowCaching: boolean, isResolvingOverload: boolean);
|
|
881
891
|
static withTargetType(options: ExpressionAnalysisOptions | undefined, targetType: types.Type | undefined): ExpressionAnalysisOptions;
|
|
882
892
|
withTargetType(targetType: types.Type | undefined): ExpressionAnalysisOptions;
|
|
883
893
|
withAllowCaching(allowCaching: boolean): ExpressionAnalysisOptions;
|
|
@@ -9,6 +9,7 @@ export declare class DiagnosticCollector {
|
|
|
9
9
|
private readonly diagnosticArgumentFactory;
|
|
10
10
|
private readonly translationPackage_;
|
|
11
11
|
private readonly textTranslationPackage_;
|
|
12
|
+
private readonly primaryTextTranslationPackage_;
|
|
12
13
|
private readonly diagnostics;
|
|
13
14
|
private readonly diagnosticAcceptor;
|
|
14
15
|
private namedDeclarationsUsageMap;
|
|
@@ -16,6 +17,7 @@ export declare class DiagnosticCollector {
|
|
|
16
17
|
private readonly standardTypes_;
|
|
17
18
|
private get translationPackage();
|
|
18
19
|
private get textTranslationPackage();
|
|
20
|
+
private get primaryTextTranslationPackage();
|
|
19
21
|
private get isInterfacePackageFile();
|
|
20
22
|
private get standardTypes();
|
|
21
23
|
constructor(analyzer: Analyzer, sourceFile: project.SourceFile);
|
|
@@ -34,6 +36,9 @@ export declare class DiagnosticCollector {
|
|
|
34
36
|
private collectNotTranslatedTypeMembers;
|
|
35
37
|
private isNotTranslatedEntity;
|
|
36
38
|
private createNotTranslatedEntitiesDiagnostic;
|
|
39
|
+
private addNotTranslatedTextsDiagnostics;
|
|
40
|
+
private collectNotTranslatedTexts;
|
|
41
|
+
private createNotTranslatedTextsDiagnostic;
|
|
37
42
|
private checkAllDefaultConstructorArgumentsAreNamed;
|
|
38
43
|
private checkPackageVariableDeclaration;
|
|
39
44
|
private checkPackageFunctionDeclaration;
|
|
@@ -73,6 +78,7 @@ export declare class DiagnosticCollector {
|
|
|
73
78
|
private checkOptionalChainingIsUsedOnTheLeftSideOfAssignment;
|
|
74
79
|
private checkGenericSpecializationExpression;
|
|
75
80
|
private checkTypeArgumentTypesAreAssignableToConstraints;
|
|
81
|
+
private checkParameterList;
|
|
76
82
|
private checkParameterDeclaration;
|
|
77
83
|
private checkIfVariableIsUnused;
|
|
78
84
|
private checkIfNestedFunctionIsUnused;
|
|
@@ -81,6 +87,7 @@ export declare class DiagnosticCollector {
|
|
|
81
87
|
private checkTypeMemberCorrectlyOverridesBaseMember;
|
|
82
88
|
private isReceiverBaseAutoVariableAccess;
|
|
83
89
|
private overridingMemberHasCorrectHiding;
|
|
90
|
+
private checkTextTranslationDeclaration;
|
|
84
91
|
private attachNodeLocationAndAddDiagnostics;
|
|
85
92
|
private addDiagnostic;
|
|
86
93
|
private addDiagnostics;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as tree from '../tree/index.js';
|
|
2
|
+
export type TextKey = string | number;
|
|
3
|
+
export declare class TextIdentity {
|
|
4
|
+
static keyFromTextFragments(fragments: readonly string[]): TextKey;
|
|
5
|
+
static keyFromTextToken(token: tree.Token<tree.TokenKind.TextLiteral>): TextKey;
|
|
6
|
+
static keyFromLocalizableTextLiteral(node: tree.LocalizableTextLiteral): TextKey;
|
|
7
|
+
static keyFromLocalizableTextTemplateLiteral(node: tree.LocalizableTextTemplateLiteral): TextKey;
|
|
8
|
+
static keyFromTextTranslationSource(node: tree.TextTranslationSource): TextKey;
|
|
9
|
+
}
|
|
@@ -14,6 +14,6 @@ export declare const InMemoryPackageScheme = "artel-in-memory";
|
|
|
14
14
|
export declare const GeneratedSourceFileScheme = "artel-gen";
|
|
15
15
|
export declare const DefaultTsLibDeclarationsFileName = "lib.es2023.d.ts";
|
|
16
16
|
export declare const DefaultLocale = PackageLocale.Ru;
|
|
17
|
-
export declare const DefaultDialect = PackageDialect.
|
|
17
|
+
export declare const DefaultDialect = PackageDialect.ArtelA;
|
|
18
18
|
export declare const DefaultNamesOfDirectoriesToIgnore: string[];
|
|
19
19
|
export declare const NodeModulesDirectoryName = "node_modules";
|
|
@@ -4,6 +4,9 @@ export declare abstract class Query<T> implements Iterable<T> {
|
|
|
4
4
|
static fromNullable<T>(source: Iterable<T> | undefined): Query<T>;
|
|
5
5
|
static empty<T>(): Query<T>;
|
|
6
6
|
static ofSuccessors<T>(first: T, next: (t: T) => T | undefined): Query<T>;
|
|
7
|
+
static first<T>(source: Iterable<T>): T | undefined;
|
|
8
|
+
static first<T, K extends T>(source: Iterable<T>, fn: (t: T) => t is K): K | undefined;
|
|
9
|
+
static first<T>(source: Iterable<T>, fn: (t: T) => boolean): T | undefined;
|
|
7
10
|
static map<T, K>(source: Iterable<T>, fn: (t: T, i: number) => K): Query<K>;
|
|
8
11
|
static toMap<T, K, V>(source: Iterable<T>, keySelector: (t: T) => K, valueSelector: (t: T) => V): Map<K, V>;
|
|
9
12
|
static toMap<T>(source: Iterable<T>): T extends readonly [infer K, infer V] ? Map<K, V> : never;
|
|
@@ -53,6 +56,7 @@ export declare abstract class Query<T> implements Iterable<T> {
|
|
|
53
56
|
unique(keySelector?: (t: T) => any): Query<T>;
|
|
54
57
|
uniqueWithComparator(comparator: (t1: T, t2: T) => boolean): Query<T>;
|
|
55
58
|
uniqueToSet(): Set<T>;
|
|
59
|
+
uniqueToArray(): Array<T>;
|
|
56
60
|
maxByValue(valueSelector: (t: T) => number): T | undefined;
|
|
57
61
|
minByValue(valueSelector: (t: T) => number): T | undefined;
|
|
58
62
|
single(): T | undefined;
|
|
@@ -118,98 +118,104 @@ export declare enum DiagnosticCode {
|
|
|
118
118
|
DefaultConstructorArgumentsMustBeNamed = 280,
|
|
119
119
|
IncorrectBodyOfBasicAliasTypeMethod = 281,
|
|
120
120
|
TheFollowingDeclarationsAreNotTranslated0 = 282,
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
121
|
+
TheFollowingDeclarationsAreNotTranslated0And1More = 283,
|
|
122
|
+
TheFollowingTextsAreNotTranslated0 = 284,
|
|
123
|
+
TheFollowingTextsAreNotTranslated0And1More = 285,
|
|
124
|
+
OperatorFunction0MustNotHaveParameters = 286,
|
|
125
|
+
OperatorFunction0MustHaveOneParameter = 287,
|
|
126
|
+
OperatorFunction0MustHaveNoMoreThanOneParameter = 288,
|
|
127
|
+
CorrespondingBasicTypeMemberNotFound = 289,
|
|
128
|
+
AsyncFunctionCanOnlyBeCalledFromFunctionMarkedWithAsyncModifier = 290,
|
|
129
|
+
TagNotFound = 291,
|
|
130
|
+
TypeOrFunctionNameExpected = 292,
|
|
131
|
+
PackageNameOrAliasExpected = 293,
|
|
132
|
+
ExpressionCanBeNull = 294,
|
|
133
|
+
TargetVariableExpressionInTheAssignmentStatementCannotContainQuestionOperator = 295,
|
|
134
|
+
UnreachableCode = 296,
|
|
135
|
+
RecursionOccurredWhileCalculatingTheTypeOfTheExpression = 297,
|
|
136
|
+
RecursionOccurredWhileInferringTheTypeOfTheVariable = 298,
|
|
137
|
+
ScopeAlreadyContainsDeclarationWithTheSameName = 299,
|
|
138
|
+
ScopeAlreadyContainsFunctionWithTheSameNameAndParameterTypes = 300,
|
|
139
|
+
ParameterName0ConflictsWithAutomaticallyGeneratedVariableName = 301,
|
|
140
|
+
PackageAlreadyContainsDeclarationWithTheSameName = 302,
|
|
141
|
+
PackageAlreadyContainsFunctionWithTheSameNameAndParameterTypes = 303,
|
|
142
|
+
PackageAlreadyContainsTypeWithTheSameNameAndSameOrIntersectingTypeParameterCount = 304,
|
|
143
|
+
PackageAliasWithTheSameNameAlreadyExits = 305,
|
|
144
|
+
TypeAlreadyContainsDeclarationWithTheSameName = 306,
|
|
145
|
+
TypeAlreadyContainsMethodWithTheSameNameAndParameterTypes = 307,
|
|
146
|
+
TypeAlreadyContainsConstructorWithTheSameParameterTypes = 308,
|
|
147
|
+
TypeAlreadyContainsOperatorFunctionWithTheSameParameterTypes = 309,
|
|
148
|
+
TypeAlreadyContainsIndexerWithTheSameParameterTypes = 310,
|
|
149
|
+
TypeCanHaveOnlyOneDestructor = 311,
|
|
150
|
+
TypeCanHaveOnlyOneDereferenceOperator = 312,
|
|
151
|
+
VariableIsUsedBeforeItsDeclaration = 313,
|
|
152
|
+
VariableMayNotHasBeenAssignedBeforeUsage = 314,
|
|
153
|
+
NotAllCodePathsReturnAValueAndResultLocalVariableMayNotHasBeenAssigned = 315,
|
|
154
|
+
WriteFunctionHasNoCorrespondingReadFunction = 316,
|
|
155
|
+
TypeCannotHaveMultipleBaseObjectTypes = 317,
|
|
156
|
+
TypeThatIsNotMarkedAsBasicCannotBeUsedAsBaseType = 318,
|
|
157
|
+
PlainObjectTypeCannotBeUsedAsBaseType = 319,
|
|
158
|
+
ThisTypeIsAlreadyListedInBaseTypeList = 320,
|
|
159
|
+
OnlyObjectAndAspectTypesCanBeUsedAsBaseTypes = 321,
|
|
160
|
+
PlainObjectTypeCanHaveOnlyAspectsAsBaseTypes = 322,
|
|
161
|
+
AspectTypeCanHaveOnlyAspectsAsBaseTypes = 323,
|
|
162
|
+
ModifierListAlreadyContains0Modifier = 324,
|
|
163
|
+
ModifierListOfOuterDeclarationGroupAlreadyContains0Modifier = 325,
|
|
164
|
+
_0ModifierIsNotAllowedHere = 326,
|
|
165
|
+
DeclarationCannotBePlacedInGroupHaving0Modifier = 327,
|
|
166
|
+
PackageConstructorDeclarationCannotHaveModifiers = 328,
|
|
167
|
+
PackageEntryPointDeclarationCannotHaveModifiers = 329,
|
|
168
|
+
TranslationsCannotHaveModifiers = 330,
|
|
169
|
+
AbstractModifierCanOnlyBeUsedInAbstractObjectTypes = 331,
|
|
170
|
+
BasicModifierCanOnlyBeUsedInObjectTypesAspectTypesAndTypeAliases = 332,
|
|
171
|
+
OverrideModifierCanOnlyBeUsedInObjectAndAspectTypes = 333,
|
|
172
|
+
_0ModifierCannotBeUsedWith1Modifier = 334,
|
|
173
|
+
VariantDeclarationCannotHaveHiddenModifier = 335,
|
|
174
|
+
BasicModifierCanOnlyBeAppliedToObjectTypes = 336,
|
|
175
|
+
AbstractModifierCanOnlyBeAppliedToObjectTypes = 337,
|
|
176
|
+
NotBasicObjectTypesCannotHaveBasicMembers = 338,
|
|
177
|
+
BasicModifierCannotBeAppliedToAspectTypeFields = 339,
|
|
178
|
+
WriteFunctionMustHaveTheSameModifiersAsReadFunction = 340,
|
|
179
|
+
WriteFunctionMustHaveTheSameOrMoreRestrictiveHidingLevelThenReadFunction = 341,
|
|
180
|
+
DeclarationConflictsWithBaseTypeMember0 = 342,
|
|
181
|
+
DeclarationConflictsWithBaseTypeMember0AddOverrideModifier = 343,
|
|
182
|
+
DeclarationConflictsWithBaseTypeMember0ThisMemberCannotBeOverridden = 344,
|
|
183
|
+
DeclarationConflictsWithBaseTypeMember0ToOverrideTypeMustBeAssignableTo1 = 345,
|
|
184
|
+
DeclarationConflictsWithBaseTypeMember0ToOverrideReturnTypeMustBeAssignableTo1 = 346,
|
|
185
|
+
OverridingMemberMustHaveTheSameHidingLevelAsBaseMember0 = 347,
|
|
186
|
+
OverridingMethodMustBeAsyncBecauseBaseMethod0IsAsync = 348,
|
|
187
|
+
OverridingMethodMustNotBeAsyncBecauseBaseMethod0IsNotAsync = 349,
|
|
188
|
+
OverridingFieldMustNotBeConstOrHaveWriteFunctionToMatchBaseField0 = 350,
|
|
189
|
+
OverridingMemberMustHaveWriteFunctionToMatchBaseMember0 = 351,
|
|
190
|
+
TypeDoesNotImplementMember0 = 352,
|
|
191
|
+
TypeDoesNotImplementMember0ImplicitImplementationTypeMismatch1 = 353,
|
|
192
|
+
TypeDoesNotImplementMember0ImplicitImplementation1IsAsync = 354,
|
|
193
|
+
TypeDoesNotImplementMember0ImplicitImplementation1IsNotAsync = 355,
|
|
194
|
+
TypeDoesNotImplementMember0ImplicitImplementation1IsNotWriteable = 356,
|
|
195
|
+
TypeDoesNotImplementMember0ImplicitImplementation1WriteFunctionIsHidden = 357,
|
|
196
|
+
CannotAccessAbstractMemberOfBaseType = 358,
|
|
197
|
+
TheFollowingBaseTypeMembersConflictAndMustBeOverridden0 = 359,
|
|
198
|
+
TheFollowingBaseTypeMembersConflictBecauseTheyHaveTheSameOriginalName0AndMustBeOverridden1 = 360,
|
|
199
|
+
TheFirstStatementOfConstructorBlockMustBeEitherBaseOrOwnConstructorCall = 361,
|
|
200
|
+
ThisCallCausesOwnConstructorCallCycle = 362,
|
|
201
|
+
OwnConstructorCallMustBeTheFirstStatementOfConstructorBlock = 363,
|
|
202
|
+
BaseConstructorCallMustBeTheFirstStatementOfConstructorBlock = 364,
|
|
203
|
+
Field0HasNoInitializerAndMayNotBeAssignedInConstructor = 365,
|
|
204
|
+
Field0HasNoInitializerAndMayNotBeAssignedInPackageConstructor = 366,
|
|
205
|
+
Variable0HasNoInitializerAndMayNotBeAssignedInPackageConstructor = 367,
|
|
206
|
+
ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1 = 368,
|
|
207
|
+
ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType = 369,
|
|
208
|
+
CannotInferTypeArguments = 370,
|
|
209
|
+
CanNotInferReturnTypeAddExplicitReturnTypeSpecifier = 371,
|
|
210
|
+
ConstantVariablesBustBeInitialized = 372,
|
|
211
|
+
VariableTypeIsNotSpecified = 373,
|
|
212
|
+
CannotInferTypeOfFunctionLiteralAddTypeSpecifierForParameter = 374,
|
|
213
|
+
TypeParameterDefaultCanReferenceOnlyPreviouslyDeclaredTypeParameters = 375,
|
|
214
|
+
RequiredTypeParametersCannotFollowTypeParametersWithDefaults = 376,
|
|
215
|
+
RequiredParametersCannotFollowOptionalParameters = 377,
|
|
216
|
+
ExpressionCannotBeReferenced = 378,
|
|
217
|
+
TextIsMissingInPrimaryTextTranslationPackage = 379,
|
|
218
|
+
TextTemplateIsMissingInPrimaryTextTranslationPackage = 380,
|
|
213
219
|
CannotFindTsLibDirectoryBaseSearchPaths0 = 401,
|
|
214
220
|
SourceFile0IsNotPartOfThePackageAndWontBeLoaded = 402,
|
|
215
221
|
ProgramWithoutMainPackageCannotBeCompiled = 403,
|
|
@@ -32,6 +32,8 @@ export declare class WellKnownDeclarationKeys {
|
|
|
32
32
|
static readonly referenceConstructor = "\u0410\u0440\u0442\u0435\u043B\u044C.\u0420\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F.\u0414\u0436\u0430\u0432\u0430\u0421\u043A\u0440\u0438\u043F\u0442.\u0421\u0441\u044B\u043B\u043A\u0430";
|
|
33
33
|
static readonly textTemplateConstructor = "\u0410\u0440\u0442\u0435\u043B\u044C.\u0428\u0430\u0431\u043B\u043E\u043D\u0422\u0435\u043A\u0441\u0442\u0430";
|
|
34
34
|
static readonly textTemplateToTextMethod = "\u0410\u0440\u0442\u0435\u043B\u044C.\u0428\u0430\u0431\u043B\u043E\u043D\u0422\u0435\u043A\u0441\u0442\u0430.\u0432-\u0442\u0435\u043A\u0441\u0442";
|
|
35
|
+
static readonly localizableTextTemplateConstructor = "\u0410\u0440\u0442\u0435\u043B\u044C.\u0428\u0430\u0431\u043B\u043E\u043D\u0422\u0435\u043A\u0441\u0442\u0430\u041F\u0435\u0440\u0435\u0432\u043E\u0434\u0438\u043C\u044B\u0439";
|
|
36
|
+
static readonly localizableTextTemplateToTextMethod = "\u0410\u0440\u0442\u0435\u043B\u044C.\u0428\u0430\u0431\u043B\u043E\u043D\u0422\u0435\u043A\u0441\u0442\u0430\u041F\u0435\u0440\u0435\u0432\u043E\u0434\u0438\u043C\u044B\u0439.\u0432-\u0442\u0435\u043A\u0441\u0442";
|
|
35
37
|
static readonly symbolIteratorField = "\u0432\u0441\u0435\u043E\u0431\u0449\u0435\u0435 Platform.JavaScript.Symbol.iterator";
|
|
36
38
|
static readonly inlineJsFunction = "\u0410\u0440\u0442\u0435\u043B\u044C.\u0412\u0437\u0430\u0438\u043C\u043E\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435.\u043F\u043E\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044C-\u0440\u043E\u0434\u043D\u043E\u0439-\u043A\u043E\u0434";
|
|
37
39
|
static readonly numberIsIntegerFunction = "\u0410\u0440\u0442\u0435\u043B\u044C.\u0420\u0435\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F.\u0414\u0436\u0430\u0432\u0430\u0421\u043A\u0440\u0438\u043F\u0442.\u0447\u0438\u0441\u043B\u043E-\u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F-\u0446\u0435\u043B\u044B\u043C";
|
|
@@ -44,8 +46,6 @@ export declare class WellKnownDeclarationKeys {
|
|
|
44
46
|
static readonly packageMainPackageField = "\u0432\u0441\u0435\u043E\u0431\u0449\u0435\u0435 \u0410\u0440\u0442\u0435\u043B\u044C.\u041F\u0430\u043A\u0435\u0442.\u0433\u043B\u0430\u0432\u043D\u044B\u0439-\u043F\u0430\u043A\u0435\u0442";
|
|
45
47
|
static readonly errorConstructor = "\u0410\u0440\u0442\u0435\u043B\u044C.\u041E\u0448\u0438\u0431\u043A\u0430";
|
|
46
48
|
static readonly translatorAddTranslationToLocaleMethod = "\u0432\u0441\u0435\u043E\u0431\u0449\u0435\u0435 \u0410\u0440\u0442\u0435\u043B\u044C.\u041F\u0435\u0440\u0435\u0432\u043E\u0434\u0447\u0438\u043A.\u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C-\u043F\u0435\u0440\u0435\u0432\u043E\u0434-\u043D\u0430-\u044F\u0437\u044B\u043A";
|
|
47
|
-
static readonly translatorTranslateTextMethod = "\u0432\u0441\u0435\u043E\u0431\u0449\u0435\u0435 \u0410\u0440\u0442\u0435\u043B\u044C.\u041F\u0435\u0440\u0435\u0432\u043E\u0434\u0447\u0438\u043A.\u043F\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438(\u043F\u0430\u043A\u0435\u0442, \u0442\u0435\u043A\u0441\u0442, \u043A\u043B\u044E\u0447)";
|
|
48
|
-
static readonly translatorTranslateTemplateMethod = "\u0432\u0441\u0435\u043E\u0431\u0449\u0435\u0435 \u0410\u0440\u0442\u0435\u043B\u044C.\u041F\u0435\u0440\u0435\u0432\u043E\u0434\u0447\u0438\u043A.\u043F\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438(\u043F\u0430\u043A\u0435\u0442, \u0448\u0430\u0431\u043B\u043E\u043D, \u043A\u043B\u044E\u0447)";
|
|
49
49
|
}
|
|
50
50
|
declare class TypeUtils {
|
|
51
51
|
private readonly ectx;
|
|
@@ -58,7 +58,6 @@ export declare class IrBuilder {
|
|
|
58
58
|
private buildDisposeStatement;
|
|
59
59
|
private buildRunStatement;
|
|
60
60
|
private buildTryStatement;
|
|
61
|
-
private buildEmptyStatement;
|
|
62
61
|
private buildErrorStatement;
|
|
63
62
|
private buildImportantStatement;
|
|
64
63
|
private buildExpressionStatement;
|
|
@@ -111,6 +111,10 @@ export declare class IrToJs {
|
|
|
111
111
|
private convertFieldDeclaration;
|
|
112
112
|
private convertComputedFieldDeclaration;
|
|
113
113
|
private convertDecorator;
|
|
114
|
+
/**
|
|
115
|
+
* Пытается преобразовать выражение вида `[a, ...[b, c]]` в `[a, b, c]`.
|
|
116
|
+
*/
|
|
117
|
+
private tryFlattenSpreadingExpression;
|
|
114
118
|
private addNodeLocation;
|
|
115
119
|
private getEntityName;
|
|
116
120
|
private convertArrayWithErrorBoundary;
|
|
@@ -8,14 +8,18 @@ export declare class Transformer {
|
|
|
8
8
|
private transformedDeclaration_;
|
|
9
9
|
get transformedDeclaration(): ir.Declaration | undefined;
|
|
10
10
|
constructor(config: TransformationConfig);
|
|
11
|
-
|
|
11
|
+
transformChildren(node: ir.Node): void;
|
|
12
|
+
transformPackage(pkg: ir.Package): void;
|
|
13
|
+
transformPackageChildren(pkg: ir.Package): void;
|
|
12
14
|
transformPackageMemberDeclaration(declaration: ir.PackageMemberDeclaration): readonly ir.PackageMemberDeclaration[];
|
|
13
15
|
transformBlockStatement(statement: ir.BlockStatement): ir.BlockStatement;
|
|
14
16
|
transformStatement(statement: ir.Statement): readonly ir.Statement[];
|
|
15
17
|
transformAssignmentStatementChildren(statement: ir.AssignmentStatement): void;
|
|
16
18
|
transformBlockStatementChildren(statement: ir.BlockStatement): void;
|
|
17
19
|
transformCatchClause(node: ir.CatchClause): ir.CatchClause;
|
|
20
|
+
transformCatchClauseChildren(catchClause: ir.CatchClause): void;
|
|
18
21
|
transformFinallyClause(node: ir.FinallyClause): ir.FinallyClause;
|
|
22
|
+
transformFinallyClauseChildren(finallyClause: ir.FinallyClause): void;
|
|
19
23
|
transformBreakLoopStatementChildren(_statement: ir.BreakLoopStatement): void;
|
|
20
24
|
transformContinueLoopStatementChildren(_statement: ir.ContinueLoopStatement): void;
|
|
21
25
|
transformDisposeStatementChildren(statement: ir.DisposeStatement): void;
|
|
@@ -28,18 +32,22 @@ export declare class Transformer {
|
|
|
28
32
|
transformForStatementChildren(statement: ir.ForStatement): void;
|
|
29
33
|
transformIfStatementChildren(statement: ir.IfStatement): void;
|
|
30
34
|
transformNestedFunctionDeclarationStatementChildren(statement: ir.NestedFunctionDeclarationStatement): void;
|
|
31
|
-
transformNestedFunctionDeclaration(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
transformNestedFunctionDeclaration(node: ir.NestedFunctionDeclaration): ir.NestedFunctionDeclaration;
|
|
36
|
+
transformNestedFunctionDeclarationChildren(declaration: ir.NestedFunctionDeclaration): void;
|
|
37
|
+
transformParameterDeclaration(node: ir.ParameterDeclaration): ir.ParameterDeclaration;
|
|
38
|
+
transformParameterDeclarationChildren(declaration: ir.ParameterDeclaration): void;
|
|
39
|
+
transformNodeWithGeneralTransformationResult<T>(node: T, notBoundTransformationConfigMethod: (node: T) => NodeTransformationResult<T>): {
|
|
40
|
+
node: T;
|
|
35
41
|
action: TransformationContinuationAction;
|
|
36
42
|
};
|
|
37
43
|
transformLocalVariableDeclarationStatementChildren(statement: ir.LocalVariableDeclarationStatement): void;
|
|
38
|
-
transformLocalVariableDeclaration(
|
|
44
|
+
transformLocalVariableDeclaration(node: ir.LocalVariableDeclaration): ir.LocalVariableDeclaration;
|
|
45
|
+
transformLocalVariableDeclarationChildren(declaration: ir.LocalVariableDeclaration): void;
|
|
39
46
|
transformLoopStatementChildren(statement: ir.LoopStatement): void;
|
|
40
47
|
transformReturnStatementChildren(statement: ir.ReturnStatement): void;
|
|
41
48
|
transformSwitchStatementChildren(statement: ir.SwitchStatement): void;
|
|
42
|
-
transformCaseClause(
|
|
49
|
+
transformCaseClause(node: ir.CaseClause): ir.CaseClause;
|
|
50
|
+
transformCaseClauseChildren(caseClause: ir.CaseClause): void;
|
|
43
51
|
transformWhileStatementChildren(statement: ir.WhileStatement): void;
|
|
44
52
|
transformYieldStatementChildren(statement: ir.YieldStatement): void;
|
|
45
53
|
transformEsModuleImportDirectiveStatementChildren(_statement: ir.EsModuleImportDirectiveStatement): void;
|
|
@@ -53,8 +61,8 @@ export declare class Transformer {
|
|
|
53
61
|
transformMethodDeclarationChildren(declaration: ir.MethodDeclaration): void;
|
|
54
62
|
transformFieldDeclarationChildren(declaration: ir.FieldDeclaration): void;
|
|
55
63
|
transformComputedFieldDeclarationChildren(declaration: ir.ComputedFieldDeclaration): void;
|
|
56
|
-
transformFieldGetterDeclaration(
|
|
57
|
-
transformFieldSetterDeclaration(
|
|
64
|
+
transformFieldGetterDeclaration(node: ir.FieldGetterDeclaration): ir.FieldGetterDeclaration;
|
|
65
|
+
transformFieldSetterDeclaration(node: ir.FieldSetterDeclaration): ir.FieldSetterDeclaration;
|
|
58
66
|
transformIndexedElementGetterDeclarationChildren(declaration: ir.IndexedElementGetterDeclaration): void;
|
|
59
67
|
transformIndexedElementSetterDeclarationChildren(declaration: ir.IndexedElementSetterDeclaration): void;
|
|
60
68
|
transformFieldGetterDeclarationChildren(declaration: ir.FieldGetterDeclaration): void;
|
|
@@ -63,7 +71,8 @@ export declare class Transformer {
|
|
|
63
71
|
transformDereferencedVariableSetterDeclarationChildren(declaration: ir.DereferencedVariableSetterDeclaration): void;
|
|
64
72
|
transformPackageVariableDeclarationChildren(declaration: ir.PackageVariableDeclaration): void;
|
|
65
73
|
transformPackageVariantTypeDeclarationChildren(declaration: ir.PackageVariantTypeDeclaration): void;
|
|
66
|
-
transformVariantDeclaration(
|
|
74
|
+
transformVariantDeclaration(node: ir.VariantDeclaration): ir.VariantDeclaration;
|
|
75
|
+
transformVariantDeclarationChildren(declaration: ir.VariantDeclaration): void;
|
|
67
76
|
transformPackageVariableGetterDeclarationChildren(declaration: ir.PackageVariableGetterDeclaration): void;
|
|
68
77
|
transformPackageVariableSetterDeclarationChildren(declaration: ir.PackageVariableSetterDeclaration): void;
|
|
69
78
|
transformExpression(expression: ir.Expression): ir.Expression;
|
|
@@ -72,7 +81,9 @@ export declare class Transformer {
|
|
|
72
81
|
transformBinaryExpressionChildren(expression: ir.BinaryExpression): void;
|
|
73
82
|
transformBooleanLiteralChildren(_expression: ir.BooleanLiteral): void;
|
|
74
83
|
transformCallExpressionChildren(expression: ir.CallExpression): void;
|
|
75
|
-
transformArguments(
|
|
84
|
+
transformArguments(node: ir.Arguments): ir.Arguments;
|
|
85
|
+
transformArgumentsChildren(args: ir.Arguments): void;
|
|
86
|
+
transformArgumentChildren(argument: ir.Argument): void;
|
|
76
87
|
transformCharLiteralChildren(_expression: ir.CharLiteral): void;
|
|
77
88
|
transformNullLiteralChildren(_expression: ir.NullLiteral): void;
|
|
78
89
|
transformIndexedAccessExpressionChildren(expression: ir.IndexedAccessExpression): void;
|
|
@@ -111,10 +122,18 @@ export declare class Transformer {
|
|
|
111
122
|
transformJsInstanceOfExpressionChildren(expression: ir.JsInstanceOfExpression): void;
|
|
112
123
|
transformJsIdentifierExpressionChildren(_expression: ir.JsIdentifierExpression): void;
|
|
113
124
|
transformDereferenceExpressionChildren(expression: ir.DereferenceExpression): void;
|
|
114
|
-
transformValueJsObjectLiteralProperty(
|
|
115
|
-
|
|
116
|
-
|
|
125
|
+
transformValueJsObjectLiteralProperty(node: ir.ValueJsObjectLiteralProperty): ir.ValueJsObjectLiteralProperty;
|
|
126
|
+
transformValueJsObjectLiteralPropertyChildren(property: ir.ValueJsObjectLiteralProperty): void;
|
|
127
|
+
transformFunctionJsObjectLiteralProperty(node: ir.FunctionJsObjectLiteralProperty): ir.FunctionJsObjectLiteralProperty;
|
|
128
|
+
transformFunctionJsObjectLiteralPropertyChildren(property: ir.FunctionJsObjectLiteralProperty): void;
|
|
129
|
+
transformSpreadJsObjectLiteralProperty(node: ir.SpreadJsObjectLiteralProperty): ir.SpreadJsObjectLiteralProperty;
|
|
130
|
+
transformSpreadJsObjectLiteralPropertyChildren(property: ir.SpreadJsObjectLiteralProperty): void;
|
|
117
131
|
transformDecorator(node: ir.Decorator): ir.Decorator;
|
|
132
|
+
transformDecoratorChildren(node: ir.Decorator): void;
|
|
133
|
+
transformTextTranslationDeclaration(node: ir.TextTranslationDeclaration): ir.TextTranslationDeclaration;
|
|
134
|
+
transformTextTranslationDeclarationChildren(declaration: ir.TextTranslationDeclaration): void;
|
|
135
|
+
transformTranslationTextTemplate(node: ir.TranslationTextTemplate): ir.TranslationTextTemplate;
|
|
136
|
+
transformTranslationTextTemplateChildren(_node: ir.TranslationTextTemplate): void;
|
|
118
137
|
private transformStatementsAndAddHoistedLocalVariables;
|
|
119
138
|
private createLocalVariableDeclarations;
|
|
120
139
|
private transformArrayWithErrorBoundary;
|
|
@@ -214,7 +233,8 @@ export interface TransformationConfig {
|
|
|
214
233
|
transformFunctionJsObjectLiteralProperty?(clause: ir.FunctionJsObjectLiteralProperty): NodeTransformationResult<ir.FunctionJsObjectLiteralProperty>;
|
|
215
234
|
transformSpreadJsObjectLiteralProperty?(clause: ir.SpreadJsObjectLiteralProperty): NodeTransformationResult<ir.SpreadJsObjectLiteralProperty>;
|
|
216
235
|
transformDecorator?(node: ir.Decorator): NodeTransformationResult<ir.Decorator>;
|
|
217
|
-
transformTextTranslationDeclaration?(declaration: ir.TextTranslationDeclaration):
|
|
236
|
+
transformTextTranslationDeclaration?(declaration: ir.TextTranslationDeclaration): NodeTransformationResult<ir.TextTranslationDeclaration>;
|
|
237
|
+
transformTranslationTextTemplate?(declaration: ir.TranslationTextTemplate): NodeTransformationResult<ir.TranslationTextTemplate>;
|
|
218
238
|
}
|
|
219
239
|
export declare const enum TransformationContinuationAction {
|
|
220
240
|
Continue = 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as ir from './Nodes.js';
|
|
2
2
|
export type Node = ir.ArrayLiteral | ir.AsExpression | ir.AssertionExpression | ir.AssignmentExpression | ir.AssignmentStatement | ir.BaseConstructorCallExpression | ir.BinaryExpression | ir.BlockStatement | ir.BooleanLiteral | ir.BreakLoopStatement | ir.CallExpression | ir.CharLiteral | ir.CommaExpression | ir.ConstructorCallExpression | ir.ContinueLoopStatement | ir.DisposeStatement | ir.RunStatement | ir.TryStatement | ir.NullLiteral | ir.EmptyStatement | ir.ErrorStatement | ir.ImportantStatement | ir.ExpressionStatement | ir.FinallyClause | ir.ForStatement | ir.PackageFunctionDeclaration | ir.PackageTypeDeclaration | ir.PackageVariableDeclaration | ir.PackageVariableGetterDeclaration | ir.PackageVariableSetterDeclaration | ir.PackageVariantTypeDeclaration | ir.IfStatement | ir.IndexedAccessExpression | ir.InlineJsExpression | ir.MethodAccessExpression | ir.FieldAccessExpression | ir.IntegerLiteral | ir.IsExpression | ir.JsIndexedAccessExpression | ir.NestedFunctionDeclaration | ir.NestedFunctionDeclarationStatement | ir.LocalVariableDeclaration | ir.LocalVariableDeclarationStatement | ir.NumericLiteral | ir.CatchClause | ir.FunctionAccessExpression | ir.FunctionLiteral | ir.PrefixUnaryExpression | ir.MeasureLiteral | ir.ReferenceExpression | ir.LoopStatement | ir.Package | ir.ReturnStatement | ir.TextLiteral | ir.LocalizableTextLiteral | ir.TextTemplateLiteral | ir.LocalizableTextTemplateLiteral | ir.ConstructorDeclaration | ir.DestructorDeclaration | ir.IndexedElementGetterDeclaration | ir.IndexedElementSetterDeclaration | ir.MethodDeclaration | ir.FieldDeclaration | ir.ComputedFieldDeclaration | ir.FieldGetterDeclaration | ir.FieldSetterDeclaration | ir.SwitchStatement | ir.CaseClause | ir.TernaryExpression | ir.ThisExpression | ir.TypeAccessExpression | ir.ParameterDeclaration | ir.VariableAccessExpression | ir.VariantDeclaration | ir.WhileStatement | ir.YieldStatement | ir.JsObjectLiteral | ir.ValueJsObjectLiteralProperty | ir.FunctionJsObjectLiteralProperty | ir.SpreadJsObjectLiteralProperty | ir.JsPropertyAccessExpression | ir.JsTypeOfExpression | ir.JsInstanceOfExpression | ir.JsIdentifierExpression | ir.DereferenceExpression | ir.BaseExpression | ir.OwnConstructorCallExpression | ir.EsModuleImportDirectiveStatement | ir.CjsModuleImportDirectiveStatement | ir.JsNamespaceDestructuringStatement | ir.DereferencedVariableGetterDeclaration | ir.DereferencedVariableSetterDeclaration | ir.TextWithEntityName | ir.Argument | ir.Arguments | ir.Decorator | ir.TextTranslationDeclaration | ir.TranslationTextTemplate;
|
|
3
|
-
export type Declaration = ir.PackageFunctionDeclaration | ir.PackageTypeDeclaration | ir.PackageVariableDeclaration | ir.PackageVariableGetterDeclaration | ir.PackageVariableSetterDeclaration | ir.PackageVariantTypeDeclaration | ir.NestedFunctionDeclaration | ir.LocalVariableDeclaration | ir.ConstructorDeclaration | ir.DestructorDeclaration | ir.IndexedElementGetterDeclaration | ir.IndexedElementSetterDeclaration | ir.MethodDeclaration | ir.FieldDeclaration | ir.FieldGetterDeclaration | ir.FieldSetterDeclaration | ir.ParameterDeclaration | ir.VariantDeclaration | ir.DereferencedVariableGetterDeclaration | ir.DereferencedVariableSetterDeclaration | ir.TextTranslationDeclaration
|
|
3
|
+
export type Declaration = ir.PackageFunctionDeclaration | ir.PackageTypeDeclaration | ir.PackageVariableDeclaration | ir.PackageVariableGetterDeclaration | ir.PackageVariableSetterDeclaration | ir.PackageVariantTypeDeclaration | ir.NestedFunctionDeclaration | ir.LocalVariableDeclaration | ir.ConstructorDeclaration | ir.DestructorDeclaration | ir.IndexedElementGetterDeclaration | ir.IndexedElementSetterDeclaration | ir.MethodDeclaration | ir.FieldDeclaration | ir.FieldGetterDeclaration | ir.FieldSetterDeclaration | ir.ParameterDeclaration | ir.VariantDeclaration | ir.DereferencedVariableGetterDeclaration | ir.DereferencedVariableSetterDeclaration | ir.TextTranslationDeclaration;
|
|
4
4
|
export type Statement = ir.AssignmentStatement | ir.BlockStatement | ir.BreakLoopStatement | ir.ContinueLoopStatement | ir.DisposeStatement | ir.RunStatement | ir.TryStatement | ir.EmptyStatement | ir.ErrorStatement | ir.ImportantStatement | ir.ExpressionStatement | ir.ForStatement | ir.IfStatement | ir.NestedFunctionDeclarationStatement | ir.LocalVariableDeclarationStatement | ir.LoopStatement | ir.ReturnStatement | ir.SwitchStatement | ir.WhileStatement | ir.YieldStatement | ir.EsModuleImportDirectiveStatement | ir.CjsModuleImportDirectiveStatement | ir.JsNamespaceDestructuringStatement;
|
|
5
5
|
export type Expression = ir.ArrayLiteral | ir.AsExpression | ir.AssertionExpression | ir.AssignmentExpression | ir.BinaryExpression | ir.BooleanLiteral | ir.CallExpression | ir.CharLiteral | ir.CommaExpression | ir.ConstructorCallExpression | ir.NullLiteral | ir.IndexedAccessExpression | ir.InlineJsExpression | ir.MethodAccessExpression | ir.FieldAccessExpression | ir.IntegerLiteral | ir.IsExpression | ir.NumericLiteral | ir.FunctionAccessExpression | ir.FunctionLiteral | ir.PrefixUnaryExpression | ir.MeasureLiteral | ir.ReferenceExpression | ir.DereferenceExpression | ir.TextLiteral | ir.LocalizableTextLiteral | ir.TextWithEntityName | ir.TextTemplateLiteral | ir.LocalizableTextTemplateLiteral | ir.TernaryExpression | ir.ThisExpression | ir.TypeAccessExpression | ir.VariableAccessExpression | ir.BaseConstructorCallExpression | ir.JsIndexedAccessExpression | ir.JsObjectLiteral | ir.JsPropertyAccessExpression | ir.JsTypeOfExpression | ir.JsInstanceOfExpression | ir.JsIdentifierExpression | ir.BaseExpression | ir.OwnConstructorCallExpression;
|
|
6
6
|
export type TypeMemberDeclaration = ir.FieldDeclaration | ir.ComputedFieldDeclaration | ir.MethodDeclaration | ir.ConstructorDeclaration | ir.DestructorDeclaration | ir.IndexedElementGetterDeclaration | ir.IndexedElementSetterDeclaration | ir.DereferencedVariableGetterDeclaration | ir.DereferencedVariableSetterDeclaration;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { TextKey } from '../../analysis/TextIdentity.js';
|
|
1
2
|
import * as tree from '../../tree/index.js';
|
|
2
3
|
import { IEntity } from '../IEntity.js';
|
|
3
4
|
import { DefinitionKind, EntityKind, ParameterEntity } from '../index.js';
|
|
4
|
-
export type TextTranslationEntityKey = string | number;
|
|
5
5
|
export interface TextTranslationEntity extends IEntity {
|
|
6
6
|
readonly kind: EntityKind.TextTranslation;
|
|
7
7
|
isTextTemplate(): boolean;
|
|
8
|
-
getKey():
|
|
8
|
+
getKey(): TextKey;
|
|
9
9
|
getText(): string;
|
|
10
10
|
getTextFragments(): readonly string[];
|
|
11
11
|
getComment(): string | undefined;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Analyzer } from '../../analysis/index.js';
|
|
2
2
|
import { Tag } from '../../analysis/Tag.js';
|
|
3
|
+
import { TextKey } from '../../analysis/TextIdentity.js';
|
|
3
4
|
import { Translation } from '../../analysis/Translation.js';
|
|
4
5
|
import { PackageDialect, PackageLocale } from '../../common/index.js';
|
|
5
6
|
import * as tree from '../../tree/index.js';
|
|
6
|
-
import { EntityKind, PackageEntity, ParameterEntity, TextTranslationEntity, TextTranslationEntityDefinition
|
|
7
|
+
import { EntityKind, PackageEntity, ParameterEntity, TextTranslationEntity, TextTranslationEntityDefinition } from '../index.js';
|
|
7
8
|
export declare class TextTranslationDeclarationEntity implements TextTranslationEntity {
|
|
8
9
|
private readonly analyzer;
|
|
9
10
|
private readonly node;
|
|
@@ -15,7 +16,7 @@ export declare class TextTranslationDeclarationEntity implements TextTranslation
|
|
|
15
16
|
private readonly comment;
|
|
16
17
|
constructor(analyzer: Analyzer, node: tree.TextTranslationSource);
|
|
17
18
|
isTextTemplate(): boolean;
|
|
18
|
-
getKey():
|
|
19
|
+
getKey(): TextKey;
|
|
19
20
|
getText(): string;
|
|
20
21
|
getTextFragments(): readonly string[];
|
|
21
22
|
getParameters(): readonly ParameterEntity[];
|