@artel/artc 0.6.25250 → 0.6.25252
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 -4
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +261 -236
- package/build/{chunk-VYUD26HA.js → chunk-5HDVI2S5.js} +2 -2
- package/build/{chunk-ZZKHAAAX.js → chunk-5VCM4RHV.js} +8 -6
- package/build/{chunk-DJEEXP7U.js → chunk-CQLARM2U.js} +1861 -1454
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +4 -4
- package/build/types/analysis/Analyzer.d.ts +13 -5
- package/build/types/analysis/DeclarationsUsageCounter.d.ts +3 -4
- package/build/types/analysis/DiagnosticCollector.d.ts +3 -5
- package/build/types/analysis/InstanceFieldsInitializationValidator.d.ts +2 -2
- package/build/types/analysis/Localization.d.ts +1 -1
- package/build/types/analysis/PackageAndStaticVariablesInitializationValidator.d.ts +3 -3
- package/build/types/analysis/semantic-context/SemanticContextBuilder.d.ts +1 -1
- package/build/types/analysis/semantic-context/TranslationTextTemplateSemanticContext.d.ts +2 -2
- package/build/types/diagnostic/DiagnosticCode.d.ts +10 -12
- package/build/types/emitter/Emitter.d.ts +4 -8
- package/build/types/emitter/IrBuilder.d.ts +15 -10
- package/build/types/emitter/Transformer.d.ts +4 -1
- package/build/types/emitter/ir/EmitOptions.d.ts +5 -5
- package/build/types/emitter/ir/Nodes.d.ts +170 -153
- package/build/types/emitter/ir/types.d.ts +4 -4
- package/build/types/entities/LocalizableTextEntity.d.ts +75 -0
- package/build/types/entities/VariableEntity.d.ts +3 -3
- package/build/types/entities/index.d.ts +5 -2
- package/build/types/services/DisplayService.d.ts +1 -0
- package/build/types/tree/NodeKind.d.ts +88 -84
- package/build/types/tree/green/Nodes.d.ts +107 -66
- package/build/types/tree/green/SyntaxFactory.d.ts +5 -5
- package/build/types/tree/red/Nodes.d.ts +149 -104
- package/package.json +2 -2
|
@@ -31,10 +31,10 @@ export declare class AnalyzedTranslationPackage {
|
|
|
31
31
|
getLocalizedPackageByOriginalReferencedPackage(): ReadonlyMap<PackageEntity, PackageEntity>;
|
|
32
32
|
getMembers(): TranslatedPackageMembers;
|
|
33
33
|
getTypeEntityMembers(typeEntity: PackageTypeEntity): TranslatedTypeEntityMembers | undefined;
|
|
34
|
-
getPackageVariableTranslationTarget(node: tree.
|
|
35
|
-
getPackageFunctionTranslationTargets(node: tree.
|
|
36
|
-
getFunctionTypeTranslationTarget(node: tree.
|
|
37
|
-
getTypeTranslationTarget(node: tree.
|
|
34
|
+
getPackageVariableTranslationTarget(node: tree.PackageVariableTranslationDeclaration): GetSingleTranslationTargetResult<PackageVariableEntity>;
|
|
35
|
+
getPackageFunctionTranslationTargets(node: tree.PackageFunctionTranslationDeclaration): GetMultipleTranslationTargetsResult<PackageFunctionEntity>;
|
|
36
|
+
getFunctionTypeTranslationTarget(node: tree.FunctionTypeTranslationDeclaration): GetSingleTranslationTargetResult<PackageFunctionTypeEntity>;
|
|
37
|
+
getTypeTranslationTarget(node: tree.TypeTranslationDeclaration): GetSingleTranslationTargetResult<PackageTypeEntity>;
|
|
38
38
|
/**
|
|
39
39
|
* В случае, когда имя переменной экземпляра совпадает с именем статической переменной, перевод будет иметь две цели.
|
|
40
40
|
*/
|
|
@@ -20,7 +20,7 @@ import * as autotypeCallExpressionMeaning from './AutotypeCallExpressionMeaning.
|
|
|
20
20
|
import * as baseExpressionMeaning from './BaseExpressionMeaning.js';
|
|
21
21
|
import * as callExpressionMeaning from './CallExpressionMeaning.js';
|
|
22
22
|
import * as constructorOverloadResolver from './ConstructorOverloadResolver.js';
|
|
23
|
-
import {
|
|
23
|
+
import { DeclarationsUsageMap } from './DeclarationsUsageCounter.js';
|
|
24
24
|
import * as dereferenceExpressionMeaning from './DereferenceExpressionMeaning.js';
|
|
25
25
|
import { DiagnosticArgumentFactory } from './DiagnosticArgumentFactory.js';
|
|
26
26
|
import * as functionOverloadResolver from './FunctionOverloadResolver.js';
|
|
@@ -277,7 +277,8 @@ export declare class Analyzer {
|
|
|
277
277
|
instantiateTypeMemberByIdentitySubstitution(entity: e.TypeMemberEntity): types.TypeMember;
|
|
278
278
|
createPackageMemberHiding(node: tree.PackageMemberDeclaration, modifierFlags: ModifierFlags): e.EntityHidingLevel | undefined;
|
|
279
279
|
createTypeMemberHiding(node: tree.TypeMemberDeclaration, modifierFlags: ModifierFlags): e.EntityHidingLevel | undefined;
|
|
280
|
-
|
|
280
|
+
collectDeclarationsUsageOfPackages(targetPlatform: PlatformKind, cancellationToken?: CancellationToken | undefined): Promise<Map<tree.SourceFile, DeclarationsUsageMap>>;
|
|
281
|
+
getDeclarationsUsageOfSourceFile(sourceFile: tree.SourceFile, cancellationToken: CancellationToken | undefined): Promise<DeclarationsUsageMap>;
|
|
281
282
|
getPackageAndStaticVariablesInitializationDiagnostics(pkg: SourcePackage, cancellationToken: CancellationToken | undefined): Promise<readonly Diagnostic[]>;
|
|
282
283
|
createDefaultConstructors(typeEntity: e.StructuredTypeEntity, fields: readonly e.FieldEntity[]): readonly e.ConstructorEntity[];
|
|
283
284
|
createBackingPackageVariables(declaredMembers: readonly (e.NamedPackageMemberEntity | e.PackageAliasEntity)[], pkg: e.PackageEntity): e.PackageVariableEntity[];
|
|
@@ -363,7 +364,7 @@ declare class Type {
|
|
|
363
364
|
private ofCallExpression;
|
|
364
365
|
private ofAutotypeCallExpression;
|
|
365
366
|
private ofIndexedAccessExpression;
|
|
366
|
-
private
|
|
367
|
+
private ofMissingExpression;
|
|
367
368
|
private ofIsExpression;
|
|
368
369
|
private ofParenthesizedExpression;
|
|
369
370
|
private ofPrefixUnaryExpression;
|
|
@@ -371,6 +372,7 @@ declare class Type {
|
|
|
371
372
|
private ofReferenceExpression;
|
|
372
373
|
private ofDereferenceExpression;
|
|
373
374
|
private ofConditionalExpression;
|
|
375
|
+
private ofTextLiteral;
|
|
374
376
|
/**
|
|
375
377
|
* По умолчанию литерал шаблона текста имеет тип Текст.
|
|
376
378
|
*
|
|
@@ -442,7 +444,10 @@ declare class Entity {
|
|
|
442
444
|
private readonly _setterEntities;
|
|
443
445
|
private readonly _typeExtensionEntities;
|
|
444
446
|
private readonly _packageAliasEntities;
|
|
445
|
-
private readonly
|
|
447
|
+
private readonly _translationTextTemplateParameterEntities;
|
|
448
|
+
private readonly _localizableSimpleTextEntities;
|
|
449
|
+
private readonly _localizableTextTemplateEntities;
|
|
450
|
+
private readonly _localizableTextEntitiesByPackage;
|
|
446
451
|
constructor(_analyzer: Analyzer);
|
|
447
452
|
ofPackage(pkg: SourcePackage): e.PackageEntity;
|
|
448
453
|
ofPackageVariableDeclaration(node: tree.PackageVariableDeclaration): e.PackageVariableEntity;
|
|
@@ -486,7 +491,10 @@ declare class Entity {
|
|
|
486
491
|
ofTypeExtensionDeclaration(node: tree.TypeExtensionDeclaration): e.TypeExtensionEntity;
|
|
487
492
|
ofPackageImport(node: tree.PackageImport): e.PackageAliasEntity;
|
|
488
493
|
ofTypeWithMembersDeclaration(node: TypeWithMembersDeclaration): e.TypeEntityWithMembers;
|
|
489
|
-
|
|
494
|
+
ofTranslationTextTemplateParameter(node: tree.TranslationTextTemplateParameter): e.TranslationTextTemplateParameterEntity;
|
|
495
|
+
ofTextLiteral(node: tree.TextLiteral): e.LocalizableSimpleTextEntity;
|
|
496
|
+
ofTextTemplateLiteral(node: tree.TextTemplateLiteral): e.LocalizableTextTemplateEntity;
|
|
497
|
+
private ensureLocalizableTextEntitiesCreated;
|
|
490
498
|
private getContainingPackageLoadedFromDts;
|
|
491
499
|
private createComputedFieldEntities;
|
|
492
500
|
private createDereferenceOperatorEntities;
|
|
@@ -5,13 +5,12 @@ import { Analyzer } from './Analyzer.js';
|
|
|
5
5
|
export declare class DeclarationsUsageCounter {
|
|
6
6
|
private readonly _analyzer;
|
|
7
7
|
private readonly _sourceFile;
|
|
8
|
-
private readonly _cancellationToken;
|
|
9
8
|
private readonly _usageInfoByEntity;
|
|
10
|
-
constructor(analyzer: Analyzer, sourceFile: tree.SourceFile
|
|
11
|
-
count(): Promise<
|
|
9
|
+
constructor(analyzer: Analyzer, sourceFile: tree.SourceFile);
|
|
10
|
+
count(cancellationToken?: CancellationToken | undefined): Promise<DeclarationsUsageMap>;
|
|
12
11
|
private recordUsage;
|
|
13
12
|
}
|
|
14
|
-
export declare class
|
|
13
|
+
export declare class DeclarationsUsageMap {
|
|
15
14
|
private readonly _usageCountByEntity;
|
|
16
15
|
constructor(_usageCountByEntity: ReadonlyMap<Entity, DeclarationUsageInfo>);
|
|
17
16
|
getUsageInfo(entity: NamedEntity): DeclarationUsageInfo;
|
|
@@ -6,18 +6,16 @@ export declare class DiagnosticCollector {
|
|
|
6
6
|
static readonly CancellationTokenThrottleTime = 50;
|
|
7
7
|
private readonly _analyzer;
|
|
8
8
|
private readonly _sourceFile;
|
|
9
|
-
private readonly _cancellationToken;
|
|
10
9
|
private readonly _diagnosticArgumentFactory;
|
|
11
10
|
private readonly _translationPackage;
|
|
12
11
|
private readonly _diagnostics;
|
|
13
12
|
private readonly _diagnosticAcceptor;
|
|
14
|
-
private
|
|
13
|
+
private _namedDeclarationsUsageMap;
|
|
15
14
|
private readonly _modifierValidator;
|
|
16
|
-
private get node();
|
|
17
15
|
private get translationPackage();
|
|
18
16
|
private get isInterfacePackageFile();
|
|
19
|
-
constructor(analyzer: Analyzer, sourceFile: project.SourceFile
|
|
20
|
-
collect(): Promise<Diagnostic[]>;
|
|
17
|
+
constructor(analyzer: Analyzer, sourceFile: project.SourceFile);
|
|
18
|
+
collect(cancellationToken?: CancellationToken | undefined): Promise<Diagnostic[]>;
|
|
21
19
|
private collectNodeDiagnostics;
|
|
22
20
|
private checkFunctionLiteral;
|
|
23
21
|
private checkFunctionBlockLiteral;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
|
|
2
2
|
import { Analyzer } from './Analyzer.js';
|
|
3
|
-
import {
|
|
3
|
+
import { DeclarationsUsageMap } from './DeclarationsUsageCounter.js';
|
|
4
4
|
import { TypeWithMembersDeclaration } from './NodeTypeUtils.js';
|
|
5
5
|
export declare class InstanceFieldsInitializationValidator {
|
|
6
6
|
private readonly _analyzer;
|
|
@@ -9,7 +9,7 @@ export declare class InstanceFieldsInitializationValidator {
|
|
|
9
9
|
private readonly _diagnostics;
|
|
10
10
|
private readonly _semanticContext;
|
|
11
11
|
private get semanticContext();
|
|
12
|
-
constructor(_analyzer: Analyzer, _typeDeclaration: TypeWithMembersDeclaration, _declarationsUsageCountResult:
|
|
12
|
+
constructor(_analyzer: Analyzer, _typeDeclaration: TypeWithMembersDeclaration, _declarationsUsageCountResult: DeclarationsUsageMap, _diagnostics: DiagnosticAcceptor);
|
|
13
13
|
validate(): void;
|
|
14
14
|
private getFieldsThatNeedToBeInitializedInConstructor;
|
|
15
15
|
private checkDefaultConstructorInitializesAllFields;
|
|
@@ -39,7 +39,7 @@ export declare class SourceTranslationDefinition {
|
|
|
39
39
|
constructor(nodeOrPackage: TranslationPackage | SourceTranslationDefinitionNode, translatedNameIdentifier: tree.Identifier | undefined);
|
|
40
40
|
equals(other: TranslationDefinition): boolean;
|
|
41
41
|
}
|
|
42
|
-
export type SourceTranslationDefinitionNode = tree.
|
|
42
|
+
export type SourceTranslationDefinitionNode = tree.TranslationDeclaration | tree.TypeMemberTranslation;
|
|
43
43
|
export declare class IntrinsicTranslationDefinition {
|
|
44
44
|
readonly isMissingTranslationReplacement: boolean;
|
|
45
45
|
readonly kind = "intrinsic";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
|
|
2
2
|
import { SourcePackage } from '../project/SourcePackage.js';
|
|
3
3
|
import { Analyzer } from './Analyzer.js';
|
|
4
|
-
import {
|
|
4
|
+
import { DeclarationsUsageMap } from './DeclarationsUsageCounter.js';
|
|
5
5
|
export declare class PackageAndStaticVariablesInitializationValidator {
|
|
6
6
|
private readonly _analyzer;
|
|
7
7
|
private readonly _package;
|
|
8
|
-
private readonly
|
|
8
|
+
private readonly _declarationsUsageMapList;
|
|
9
9
|
private readonly _diagnostics;
|
|
10
|
-
constructor(_analyzer: Analyzer, _package: SourcePackage,
|
|
10
|
+
constructor(_analyzer: Analyzer, _package: SourcePackage, _declarationsUsageMapList: readonly DeclarationsUsageMap[], _diagnostics: DiagnosticAcceptor);
|
|
11
11
|
validate(): void;
|
|
12
12
|
private getVariablesThatNeedToBeInitializedInConstructor;
|
|
13
13
|
private collectStaticFieldsThatNeedToBeInitializedInConstructor;
|
|
@@ -68,7 +68,7 @@ export declare class SemanticContextBuilder {
|
|
|
68
68
|
ofSubprogram(node: SubprogramDeclarationOrLiteral): OutermostSemanticContextOfSubprogram;
|
|
69
69
|
containingTypeMember(node: tree.TypeMemberDeclaration): SemanticContextContainingTypeMember;
|
|
70
70
|
containingPackageMember(node: tree.PackageMemberDeclaration): SourceFileSemanticContext;
|
|
71
|
-
ofTranslationTextTemplate(node: tree.
|
|
71
|
+
ofTranslationTextTemplate(node: tree.TranslationTextTemplate): TranslationTextTemplateSemanticContext;
|
|
72
72
|
private containingInternal;
|
|
73
73
|
private ofChildOfFunctionDeclaration;
|
|
74
74
|
private ofChildOfTypeDeclarationWithMemberBlock;
|
|
@@ -4,10 +4,10 @@ import { SemanticContext } from './SemanticContext.js';
|
|
|
4
4
|
import { MemberOfSemanticContextValidatingNameConflicts, MemberOfSemanticContextValidatingNameConflictsForTypeLookup, SemanticContextValidatingNameConflictsBase } from './SemanticContextValidatingNameConflicts.js';
|
|
5
5
|
export declare class TranslationTextTemplateSemanticContext extends SemanticContextValidatingNameConflictsBase {
|
|
6
6
|
readonly kind = "translation-text-template";
|
|
7
|
-
readonly node: tree.
|
|
7
|
+
readonly node: tree.TranslationTextTemplate;
|
|
8
8
|
readonly outer: SemanticContext;
|
|
9
9
|
protected readonly asContext: SemanticContext;
|
|
10
|
-
constructor(analyzer: Analyzer, node: tree.
|
|
10
|
+
constructor(analyzer: Analyzer, node: tree.TranslationTextTemplate, outer: SemanticContext);
|
|
11
11
|
protected createMemberEntities(): readonly MemberOfSemanticContextValidatingNameConflicts[];
|
|
12
12
|
protected createMemberEntitiesForTypeLookup(): readonly MemberOfSemanticContextValidatingNameConflictsForTypeLookup[];
|
|
13
13
|
}
|
|
@@ -25,7 +25,7 @@ export declare enum DiagnosticCode {
|
|
|
25
25
|
PackageImportExpected = 119,
|
|
26
26
|
DeclarationOrPackageImportExpected = 120,
|
|
27
27
|
Expected0But1Found = 121,
|
|
28
|
-
|
|
28
|
+
InvalidTextTemplate = 122,
|
|
29
29
|
ModifierListExpected = 123,
|
|
30
30
|
RunKeywordCreationKeywordOrModifierListExpected = 124,
|
|
31
31
|
HidingLevelExpected = 125,
|
|
@@ -190,17 +190,15 @@ export declare enum DiagnosticCode {
|
|
|
190
190
|
CannotAccessAbstractMemberOfBaseType = 351,
|
|
191
191
|
TheFollowingBaseTypeMembersConflictAndMustBeOverridden0 = 352,
|
|
192
192
|
TheFollowingBaseTypeMembersConflictBecauseTheyHaveTheSameOriginalName0AndMustBeOverridden1 = 353,
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1 = 363,
|
|
203
|
-
ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType = 364,
|
|
193
|
+
TheFirstStatementOfConstructorBlockMustBeEitherBaseOrOwnConstructorCall = 354,
|
|
194
|
+
ThisCallCausesOwnConstructorCallCycle = 355,
|
|
195
|
+
OwnConstructorCallMustBeTheFirstStatementOfConstructorBlock = 356,
|
|
196
|
+
BaseConstructorCallMustBeTheFirstStatementOfConstructorBlock = 357,
|
|
197
|
+
Field0HasNoInitializerAndMayNotBeAssignedInConstructor = 358,
|
|
198
|
+
Field0HasNoInitializerAndMayNotBeAssignedInPackageConstructor = 359,
|
|
199
|
+
Variable0HasNoInitializerAndMayNotBeAssignedInPackageConstructor = 360,
|
|
200
|
+
ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1 = 361,
|
|
201
|
+
ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType = 362,
|
|
204
202
|
CannotFindTsLibDirectoryBaseSearchPaths0 = 401,
|
|
205
203
|
SourceFile0IsNotPartOfThePackageAndWontBeLoaded = 402,
|
|
206
204
|
ProgramWithoutMainPackageCannotBeCompiled = 403,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Analyzer
|
|
1
|
+
import { Analyzer } from '../analysis/index.js';
|
|
2
2
|
import { CancellationToken, Uri } from '../common/index.js';
|
|
3
3
|
import { JavaScriptImplementationConfig, PlatformKind } from '../project/index.js';
|
|
4
4
|
import { NamedEntity, PackageEntity, PackageMemberEntity } from './Entities.js';
|
|
@@ -8,16 +8,12 @@ export declare class Emitter {
|
|
|
8
8
|
static readonly IndexFileName = "index.mjs";
|
|
9
9
|
readonly targetPlatform = PlatformKind.JavaScript;
|
|
10
10
|
private readonly _analyzer;
|
|
11
|
-
private readonly _declarationsUsageCountResults;
|
|
12
11
|
private readonly _options;
|
|
13
12
|
private readonly _entityMap;
|
|
14
13
|
private readonly _ectx;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
static create(analyzer: Analyzer, options?: EmitOptions, cancellationToken?: CancellationToken): Promise<Emitter>;
|
|
19
|
-
emitToFileSystem(outputUri: Uri, outputAcceptor: OutputAcceptor): Promise<void>;
|
|
20
|
-
emitToString(): string;
|
|
14
|
+
constructor(analyzer: Analyzer, options: EmitOptions | undefined);
|
|
15
|
+
emitToFileSystem(outputUri: Uri, outputAcceptor: OutputAcceptor, cancellationToken?: CancellationToken | undefined): Promise<void>;
|
|
16
|
+
emitToString(cancellationToken?: CancellationToken | undefined): Promise<string>;
|
|
21
17
|
private createEmitterPackageFromSource;
|
|
22
18
|
private enumerateEmittingSourcePackages;
|
|
23
19
|
private createPackageWithMainFunction;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DeclarationsUsageMap } from '../analysis/DeclarationsUsageCounter.js';
|
|
2
2
|
import { Analyzer } from '../analysis/index.js';
|
|
3
|
-
import { SourceFile } from '../project/index.js';
|
|
3
|
+
import { SourceFile, SourcePackage } from '../project/index.js';
|
|
4
|
+
import * as tree from '../tree/index.js';
|
|
4
5
|
import { EntityMap } from './EntityMap.js';
|
|
5
6
|
import * as ir from './ir/index.js';
|
|
6
7
|
export declare class IrBuilder {
|
|
7
8
|
private readonly _analyzer;
|
|
8
|
-
private readonly _sourceFile;
|
|
9
|
-
private readonly _declarationsUsageCountResult;
|
|
10
|
-
private readonly _declarationsOfPackageSourceFilesUsageCountResults;
|
|
11
9
|
private readonly _entityMap;
|
|
10
|
+
private readonly _declarationUsageInfoOfAllPackages;
|
|
12
11
|
private readonly _typesCreatedFromAnonymousTypes;
|
|
13
12
|
private readonly _textTemplateToTextMethod;
|
|
13
|
+
private _sourceFile;
|
|
14
|
+
private _declarationsUsageInfoOfSourceFile;
|
|
15
|
+
private _declarationsUsageInfoOfPackageSourceFiles;
|
|
14
16
|
private _id;
|
|
15
17
|
private _currentLoopLabel;
|
|
16
18
|
private get textTemplateToTextMethod();
|
|
17
|
-
constructor(
|
|
18
|
-
build(): ir.
|
|
19
|
+
constructor(analyzer: Analyzer, entityMap: EntityMap, declarationUsageInfoOfAllPackages: ReadonlyMap<tree.SourceFile, DeclarationsUsageMap>);
|
|
20
|
+
build(pkg: SourcePackage): ir.Package;
|
|
19
21
|
private buildPackageMemberDeclarationList;
|
|
20
22
|
private buildPackageConstructorDeclaration;
|
|
21
23
|
private buildFunctionBlockOfFunction;
|
|
@@ -92,7 +94,10 @@ export declare class IrBuilder {
|
|
|
92
94
|
private convertDereferencedVariableAccess;
|
|
93
95
|
private buildReferenceExpression;
|
|
94
96
|
private buildConditionalExpression;
|
|
97
|
+
private buildTextLiteral;
|
|
98
|
+
private buildLocalizableTextLiteral;
|
|
95
99
|
private buildTextTemplateLiteral;
|
|
100
|
+
private buildLocalizableTextTemplateLiteral;
|
|
96
101
|
private buildTokenExpression;
|
|
97
102
|
private buildKeywordExpression;
|
|
98
103
|
private buildObjectExpression;
|
|
@@ -116,13 +121,13 @@ export declare class IrBuilder {
|
|
|
116
121
|
private generateLoopLabel;
|
|
117
122
|
private buildTextTranslationDeclarationList;
|
|
118
123
|
private buildTextTranslationDeclaration;
|
|
119
|
-
private
|
|
124
|
+
private createTranslationTextTemplate;
|
|
120
125
|
private getSourceLocation;
|
|
121
126
|
}
|
|
122
127
|
export interface IrBuilderParams {
|
|
123
128
|
analyzer: Analyzer;
|
|
124
129
|
sourceFile: SourceFile;
|
|
125
|
-
declarationsUsageCountResult:
|
|
126
|
-
declarationsOfPackageSourceFilesUsageCountResults: readonly
|
|
130
|
+
declarationsUsageCountResult: DeclarationsUsageMap;
|
|
131
|
+
declarationsOfPackageSourceFilesUsageCountResults: readonly DeclarationsUsageMap[];
|
|
127
132
|
entityMap: EntityMap;
|
|
128
133
|
}
|
|
@@ -85,8 +85,10 @@ export declare class Transformer {
|
|
|
85
85
|
transformMeasureLiteralChildren(_expression: ir.MeasureLiteral): void;
|
|
86
86
|
transformReferenceExpressionChildren(expression: ir.ReferenceExpression): void;
|
|
87
87
|
transformTextLiteralChildren(_expression: ir.TextLiteral): void;
|
|
88
|
+
transformLocalizableTextLiteralChildren(_expression: ir.LocalizableTextLiteral): void;
|
|
88
89
|
transformTextWithEntityNameChildren(_expression: ir.TextWithEntityName): void;
|
|
89
90
|
transformTextTemplateLiteralChildren(expression: ir.TextTemplateLiteral): void;
|
|
91
|
+
transformLocalizableTextTemplateLiteralChildren(expression: ir.LocalizableTextTemplateLiteral): void;
|
|
90
92
|
transformTernaryExpressionChildren(expression: ir.TernaryExpression): void;
|
|
91
93
|
transformThisExpressionChildren(_expression: ir.ThisExpression): void;
|
|
92
94
|
transformBaseExpressionChildren(_expression: ir.BaseExpression): void;
|
|
@@ -115,7 +117,6 @@ export declare class Transformer {
|
|
|
115
117
|
transformFunctionJsObjectLiteralProperty(property: ir.FunctionJsObjectLiteralProperty): ir.FunctionJsObjectLiteralProperty;
|
|
116
118
|
transformSpreadJsObjectLiteralProperty(property: ir.SpreadJsObjectLiteralProperty): ir.SpreadJsObjectLiteralProperty;
|
|
117
119
|
transformDecorator(node: ir.Decorator): ir.Decorator;
|
|
118
|
-
transformTextTranslationDeclarationChildren(declaration: ir.TextTranslationDeclaration): void;
|
|
119
120
|
private transformStatementsAndAddHoistedLocalVariables;
|
|
120
121
|
private createLocalVariableDeclarations;
|
|
121
122
|
private transformArrayWithErrorBoundary;
|
|
@@ -139,8 +140,10 @@ export interface TransformationConfig {
|
|
|
139
140
|
transformFieldAccessExpression?(expression: ir.FieldAccessExpression): ExpressionTransformationResult;
|
|
140
141
|
transformMethodAccessExpression?(expression: ir.MethodAccessExpression): ExpressionTransformationResult;
|
|
141
142
|
transformTextTemplateLiteral?(expression: ir.TextTemplateLiteral): ExpressionTransformationResult;
|
|
143
|
+
transformLocalizableTextTemplateLiteral?(expression: ir.LocalizableTextTemplateLiteral): ExpressionTransformationResult;
|
|
142
144
|
transformCharLiteral?(expression: ir.CharLiteral): ExpressionTransformationResult;
|
|
143
145
|
transformTextLiteral?(expression: ir.TextLiteral): ExpressionTransformationResult;
|
|
146
|
+
transformLocalizableTextLiteral?(expression: ir.LocalizableTextLiteral): ExpressionTransformationResult;
|
|
144
147
|
transformTextWithEntityName?(expression: ir.TextWithEntityName): ExpressionTransformationResult;
|
|
145
148
|
transformBooleanLiteral?(expression: ir.BooleanLiteral): ExpressionTransformationResult;
|
|
146
149
|
transformIntegerLiteral?(expression: ir.IntegerLiteral): ExpressionTransformationResult;
|
|
@@ -66,17 +66,17 @@ declare enum FieldAccessExpressionEmitOptionsFlags {
|
|
|
66
66
|
None = 0,
|
|
67
67
|
ForceUseNonComputedName = 1
|
|
68
68
|
}
|
|
69
|
-
export declare class
|
|
69
|
+
export declare class TextTemplateEmitOptions {
|
|
70
70
|
private _flags;
|
|
71
|
-
constructor(flags?:
|
|
71
|
+
constructor(flags?: TextTemplateEmitOptionsFlags);
|
|
72
72
|
constructor(createTextTemplateInstance: boolean);
|
|
73
|
-
static default():
|
|
73
|
+
static default(): TextTemplateEmitOptions;
|
|
74
74
|
get createTextTemplateInstance(): boolean;
|
|
75
75
|
set createTextTemplateInstance(value: boolean);
|
|
76
76
|
setCreateTextTemplateInstance(value: boolean): this;
|
|
77
|
-
clone():
|
|
77
|
+
clone(): TextTemplateEmitOptions;
|
|
78
78
|
}
|
|
79
|
-
declare enum
|
|
79
|
+
declare enum TextTemplateEmitOptionsFlags {
|
|
80
80
|
None = 0,
|
|
81
81
|
CreateTextTemplateInstance = 1
|
|
82
82
|
}
|