@artel/artc 0.6.25245 → 0.6.25247
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 -2
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +223 -212
- package/build/{chunk-FVBS6MPY.js → chunk-3MYTPUJZ.js} +1 -1
- package/build/{chunk-T7WG4Z7I.js → chunk-3PVSYUJV.js} +3584 -2718
- package/build/{chunk-TVZEHLXD.js → chunk-TTNFYVNF.js} +2 -2
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +0 -1
- package/build/types/analysis/Analyzer.d.ts +30 -23
- package/build/types/analysis/BaseExpressionMeaning.d.ts +9 -4
- package/build/types/analysis/BaseMemberConflictsValidator.d.ts +3 -5
- package/build/types/analysis/CallExpressionMeaning.d.ts +1 -0
- package/build/types/analysis/DiagnosticArgumentFactory.d.ts +18 -0
- package/build/types/analysis/DiagnosticCollector.d.ts +2 -3
- package/build/types/analysis/DisplayableEntity.d.ts +46 -0
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +3 -3
- package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +3 -3
- package/build/types/analysis/InstanceFieldsInitializationValidator.d.ts +18 -0
- package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +3 -3
- package/build/types/analysis/NamedTypeResolver.d.ts +2 -3
- package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +2 -3
- package/build/types/analysis/NodeTypeUtils.d.ts +1 -0
- package/build/types/analysis/ObjectExpressionMeaning.d.ts +9 -4
- package/build/types/analysis/OwnAndBaseConstructorCallsChecker.d.ts +23 -0
- package/build/types/analysis/PackageAndStaticVariablesInitializationValidator.d.ts +17 -0
- package/build/types/analysis/TagMeaning.d.ts +2 -3
- package/build/types/analysis/control-flow/NarrowableReference.d.ts +7 -8
- package/build/types/analysis/semantic-context/SemanticContext.d.ts +2 -1
- package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +2 -0
- package/build/types/analysis/semantic-context/SemanticContextBuilder.d.ts +3 -0
- package/build/types/analysis/semantic-context/SemanticContextValidatingNameConflicts.d.ts +6 -7
- package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +3 -1
- package/build/types/analysis/semantic-context/SubprogramSemanticContext.d.ts +1 -1
- package/build/types/analysis/semantic-context/TranslationTextTemplateSemanticContext.d.ts +13 -0
- package/build/types/common/Displayable.d.ts +13 -0
- package/build/types/common/FormatString.d.ts +2 -1
- package/build/types/common/HelperPhrases.d.ts +2 -1
- package/build/types/common/TreeQuery.d.ts +4 -4
- package/build/types/common/WithDiagnostics.d.ts +3 -4
- package/build/types/common/index.d.ts +1 -0
- package/build/types/diagnostic/DiagnosticCode.d.ts +129 -125
- package/build/types/diagnostic/DiagnosticData.d.ts +7 -3
- package/build/types/emitter/Transformer.d.ts +4 -2
- package/build/types/emitter/ir/EmitOptions.d.ts +14 -0
- package/build/types/emitter/ir/Nodes.d.ts +41 -25
- package/build/types/emitter/ir/types.d.ts +1 -1
- package/build/types/entities/BaseEntityHidingMatcher.d.ts +1 -1
- package/build/types/entities/EntityHiding.d.ts +1 -1
- package/build/types/entities/VariableEntity.d.ts +35 -3
- package/build/types/project/FileSystemTree.d.ts +2 -2
- 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/NodeKind.d.ts +20 -21
- package/build/types/tree/green/Nodes.d.ts +12 -26
- package/build/types/tree/red/Nodes.d.ts +15 -29
- package/package.json +2 -2
@@ -2,6 +2,7 @@ import { FieldWithInitializerSemanticContext } from './FieldWithInitializerSeman
|
|
2
2
|
import { SourceFileSemanticContext } from './SourceFileSemanticContext.js';
|
3
3
|
import { CatchClauseSemanticContext, ForStatementSemanticContext, FunctionBlockSemanticContext, SpecialLocalDeclarationSemanticContext, StatementBlockSemanticContext, SubprogramParameterSemanticContext, SubprogramTypeParameterSemanticContext } from './SubprogramBodyAndParametersSemanticContext.js';
|
4
4
|
import { OutermostSemanticContextOfSubprogram } from './SubprogramSemanticContext.js';
|
5
|
+
import { TranslationTextTemplateSemanticContext } from './TranslationTextTemplateSemanticContext.js';
|
5
6
|
import { OutermostSemanticContextOfType, ParametersOfFunctionTypeSemanticContext, TypeBodySemanticContext, TypeExtensionBodySemanticContext, TypeParametersOfTypeSemanticContext } from './TypeSemanticContext.js';
|
6
7
|
/**
|
7
8
|
* Позволяет получить информацию, общую для определённой области
|
@@ -10,4 +11,4 @@ import { OutermostSemanticContextOfType, ParametersOfFunctionTypeSemanticContext
|
|
10
11
|
* Чтобы получить семантический контекст, в котором находится определённый узел,
|
11
12
|
* используйте `analyzer.semanticContext.containing(node)`.
|
12
13
|
*/
|
13
|
-
export type SemanticContext = SourceFileSemanticContext | OutermostSemanticContextOfType | TypeParametersOfTypeSemanticContext | TypeBodySemanticContext | TypeExtensionBodySemanticContext | ParametersOfFunctionTypeSemanticContext | OutermostSemanticContextOfSubprogram | SubprogramTypeParameterSemanticContext | SubprogramParameterSemanticContext | SpecialLocalDeclarationSemanticContext | StatementBlockSemanticContext | FunctionBlockSemanticContext | FieldWithInitializerSemanticContext | ForStatementSemanticContext | CatchClauseSemanticContext;
|
14
|
+
export type SemanticContext = SourceFileSemanticContext | OutermostSemanticContextOfType | TypeParametersOfTypeSemanticContext | TypeBodySemanticContext | TypeExtensionBodySemanticContext | ParametersOfFunctionTypeSemanticContext | OutermostSemanticContextOfSubprogram | SubprogramTypeParameterSemanticContext | SubprogramParameterSemanticContext | SpecialLocalDeclarationSemanticContext | StatementBlockSemanticContext | FunctionBlockSemanticContext | FieldWithInitializerSemanticContext | ForStatementSemanticContext | CatchClauseSemanticContext | TranslationTextTemplateSemanticContext;
|
@@ -5,6 +5,7 @@ import { SourceFile } from '../../project/SourceFile.js';
|
|
5
5
|
import * as tree from '../../tree/index.js';
|
6
6
|
import * as types from '../../types/index.js';
|
7
7
|
import { Analyzer } from '../Analyzer.js';
|
8
|
+
import { DiagnosticArgumentFactory } from '../DiagnosticArgumentFactory.js';
|
8
9
|
import { FunctionDeclaration, GetterDeclaration, RegularOrBlockFunctionLiteral, SetterDeclaration, SubprogramDeclarationOrLiteral } from '../NodeTypeUtils.js';
|
9
10
|
import { NamedDeclaration, TypeOrContainerWithTypes } from './Declarations.js';
|
10
11
|
import { SemanticContext } from './SemanticContext.js';
|
@@ -22,6 +23,7 @@ export declare abstract class SemanticContextBase {
|
|
22
23
|
getContainingSourceFile(): SourceFile;
|
23
24
|
getContainingPackage(): PackageEntity;
|
24
25
|
getHidingMatcher(): IEntityHidingMatcher;
|
26
|
+
getDiagnosticArgumentFactory(): DiagnosticArgumentFactory;
|
25
27
|
getTypesOrContainersWithTypes(): readonly TypeOrContainerWithTypes[];
|
26
28
|
getTypesOrContainersWithTypesByName(name: Name): readonly TypeOrContainerWithTypes[];
|
27
29
|
getNamedDeclarations(noInstanceMembers?: boolean): readonly NamedDeclaration[];
|
@@ -2,6 +2,7 @@ import * as tree from '../../tree/index.js';
|
|
2
2
|
import { Analyzer } from '../Analyzer.js';
|
3
3
|
import { FunctionDeclaration, IndexedElementAccessorDeclaration, PackageTypeDeclaration, RegularOrBlockFunctionLiteral, SubprogramDeclarationOrLiteral } from '../NodeTypeUtils.js';
|
4
4
|
import { BlockSemanticContext, CatchClauseSemanticContext, ConstructorSemanticContext, DestructorSemanticContext, ForStatementSemanticContext, FunctionBlockSemanticContext, FunctionLiteralSemanticContext, FunctionSemanticContext, IndexedElementAccessorSemanticContext, OperatorSemanticContext, OutermostSemanticContextOfSubprogram, OutermostSemanticContextOfType, PackageConstructorSemanticContext, PackageEntryPointSemanticContext, ParametersOfFunctionTypeSemanticContext, SemanticContext, SemanticContextContainingTypeMember, SourceFileSemanticContext, SpecialLocalDeclarationSemanticContext, StatementBlockSemanticContext, SubprogramParameterSemanticContext, SubprogramTypeParameterSemanticContext, TypeBodySemanticContext, TypeDeclarationCreatingSemanticContext, TypeDeclarationWithMembersBody, TypeExtensionBodySemanticContext, TypeParametersOfTypeSemanticContext, VariableAccessorDeclaration, VariableAccessorSemanticContext } from '../semantic-context/index.js';
|
5
|
+
import { TranslationTextTemplateSemanticContext } from './TranslationTextTemplateSemanticContext.js';
|
5
6
|
export declare class SemanticContextBuilder {
|
6
7
|
private readonly _analyzer;
|
7
8
|
private readonly _sourceFileContexts;
|
@@ -27,6 +28,7 @@ export declare class SemanticContextBuilder {
|
|
27
28
|
private readonly _outermostContextsOfFunctionDeclaration;
|
28
29
|
private readonly _outermostContextsOfTypeDeclaration;
|
29
30
|
private readonly _typeExtensionDeclarationBodyContexts;
|
31
|
+
private readonly _translationTextTemplateContexts;
|
30
32
|
constructor(analyzer: Analyzer);
|
31
33
|
/**
|
32
34
|
* Возвращает контекст, содержащий узел. Если в качестве узла передан исходный файл,
|
@@ -66,6 +68,7 @@ export declare class SemanticContextBuilder {
|
|
66
68
|
ofSubprogram(node: SubprogramDeclarationOrLiteral): OutermostSemanticContextOfSubprogram;
|
67
69
|
containingTypeMember(node: tree.TypeMemberDeclaration): SemanticContextContainingTypeMember;
|
68
70
|
containingPackageMember(node: tree.PackageMemberDeclaration): SourceFileSemanticContext;
|
71
|
+
ofTranslationTextTemplate(node: tree.TranslationTextTemplate): TranslationTextTemplateSemanticContext;
|
69
72
|
private containingInternal;
|
70
73
|
private ofChildOfFunctionDeclaration;
|
71
74
|
private ofChildOfTypeDeclarationWithMemberBlock;
|
@@ -1,13 +1,16 @@
|
|
1
1
|
import { Name } from '../../common/index.js';
|
2
2
|
import { DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
|
3
3
|
import { IEntityHidingMatcher } from '../../entities/EntityHiding.js';
|
4
|
-
import { LocalVariableEntity, NestedFunctionEntity, ParameterVariableEntity, TypeParameterEntity } from '../../entities/index.js';
|
4
|
+
import { LocalVariableEntity, NestedFunctionEntity, ParameterVariableEntity, TextTemplateParameterVariableEntity, TypeParameterEntity } from '../../entities/index.js';
|
5
5
|
import * as tree from '../../tree/index.js';
|
6
6
|
import { Analyzer } from '../Analyzer.js';
|
7
7
|
import { NamedDeclaration, TypeOrContainerWithTypes } from './Declarations.js';
|
8
8
|
import { SemanticContext } from './SemanticContext.js';
|
9
9
|
import { SemanticContextWithParent } from './SemanticContextWithParent.js';
|
10
|
-
export
|
10
|
+
export interface NameConflictsValidator {
|
11
|
+
validateNameConflicts(diagnostics: DiagnosticAcceptor): void;
|
12
|
+
}
|
13
|
+
export declare abstract class SemanticContextValidatingNameConflictsBase extends SemanticContextWithParent implements NameConflictsValidator {
|
11
14
|
abstract readonly outer: SemanticContext;
|
12
15
|
abstract readonly node: tree.Node;
|
13
16
|
protected readonly _analyzer: Analyzer;
|
@@ -35,9 +38,5 @@ export declare abstract class SemanticContextValidatingNameConflictsBase extends
|
|
35
38
|
private createNamedDeclarations;
|
36
39
|
private createTypesOrContainerWithTypes;
|
37
40
|
}
|
38
|
-
|
39
|
-
validateNameConflicts(diagnostics: DiagnosticAcceptor): void;
|
40
|
-
}
|
41
|
-
export type MemberOfSemanticContextValidatingNameConflicts = LocalVariableEntity | ParameterVariableEntity | NestedFunctionEntity | TypeParameterEntity;
|
41
|
+
export type MemberOfSemanticContextValidatingNameConflicts = LocalVariableEntity | ParameterVariableEntity | TextTemplateParameterVariableEntity | NestedFunctionEntity | TypeParameterEntity;
|
42
42
|
export type MemberOfSemanticContextValidatingNameConflictsForTypeLookup = TypeParameterEntity;
|
43
|
-
export {};
|
@@ -4,6 +4,7 @@ import { PackageEntity, TypeEntity, TypeExtensionEntity } from '../../entities/i
|
|
4
4
|
import { SourceFile } from '../../project/SourceFile.js';
|
5
5
|
import * as tree from '../../tree/index.js';
|
6
6
|
import { Analyzer } from '../Analyzer.js';
|
7
|
+
import { DiagnosticArgumentFactory } from '../DiagnosticArgumentFactory.js';
|
7
8
|
import { NamedDeclaration, TypeOrContainerWithTypes } from './Declarations.js';
|
8
9
|
import { SemanticContext } from './SemanticContext.js';
|
9
10
|
import { SemanticContextBase, SubprogramInfo, TryStatementContextKind, TypeOrTypeExtension } from './SemanticContextBase.js';
|
@@ -18,7 +19,7 @@ export declare class SourceFileSemanticContext extends SemanticContextBase {
|
|
18
19
|
private readonly _importedPackageMemberLookups;
|
19
20
|
private readonly _packageNameSegments;
|
20
21
|
private readonly _packageNameSegmentsByKey;
|
21
|
-
private readonly
|
22
|
+
private readonly _diagnosticArgumentFactory;
|
22
23
|
private get packageNameSegmentsByKey();
|
23
24
|
constructor(analyzer: Analyzer, node: tree.SourceFile);
|
24
25
|
getContainingSubprogram(): SubprogramInfo | undefined;
|
@@ -27,6 +28,7 @@ export declare class SourceFileSemanticContext extends SemanticContextBase {
|
|
27
28
|
getPackage(): PackageEntity;
|
28
29
|
getTryStatementContext(): TryStatementContextKind | undefined;
|
29
30
|
isStatic(): boolean;
|
31
|
+
getDiagnosticArgumentFactory(): DiagnosticArgumentFactory;
|
30
32
|
getOwnTypesOrContainersWithTypes(hidingMatcher?: IEntityHidingMatcher): readonly TypeOrContainerWithTypes[];
|
31
33
|
getOwnTypesOrContainersWithTypesByName(name: Name, hidingMatcher?: IEntityHidingMatcher): readonly TypeOrContainerWithTypes[];
|
32
34
|
getOwnNamedDeclarations(_noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): NamedDeclaration[];
|
@@ -13,7 +13,7 @@ export type LastSemanticContextOfSubprogramParent = SemanticContext;
|
|
13
13
|
/**
|
14
14
|
* Завершающий семантический контекст подпрограммы.
|
15
15
|
* Данный контекст располагается после контекста с параметрами (или параметрами типа) и переопределяет метод
|
16
|
-
* {@link
|
16
|
+
* {@link SemanticContext.getContainingSubprogram}.
|
17
17
|
*/
|
18
18
|
export declare abstract class OutermostSemanticContextOfSubprogram extends SemanticContextWithParent {
|
19
19
|
readonly kind = "outermost-of-subprogram";
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import * as tree from '../../tree/index.js';
|
2
|
+
import { Analyzer } from '../Analyzer.js';
|
3
|
+
import { SemanticContext } from './SemanticContext.js';
|
4
|
+
import { MemberOfSemanticContextValidatingNameConflicts, MemberOfSemanticContextValidatingNameConflictsForTypeLookup, SemanticContextValidatingNameConflictsBase } from './SemanticContextValidatingNameConflicts.js';
|
5
|
+
export declare class TranslationTextTemplateSemanticContext extends SemanticContextValidatingNameConflictsBase {
|
6
|
+
readonly kind = "translation-text-template";
|
7
|
+
readonly node: tree.TranslationTextTemplate;
|
8
|
+
readonly outer: SemanticContext;
|
9
|
+
protected readonly asContext: SemanticContext;
|
10
|
+
constructor(analyzer: Analyzer, node: tree.TranslationTextTemplate, outer: SemanticContext);
|
11
|
+
protected createMemberEntities(): readonly MemberOfSemanticContextValidatingNameConflicts[];
|
12
|
+
protected createMemberEntitiesForTypeLookup(): readonly MemberOfSemanticContextValidatingNameConflictsForTypeLookup[];
|
13
|
+
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
export interface Displayable {
|
2
|
+
getDisplayText(): string;
|
3
|
+
}
|
4
|
+
export declare class DisplayableArray implements Displayable {
|
5
|
+
private readonly _array;
|
6
|
+
private readonly _separator;
|
7
|
+
constructor(_array: readonly DisplayableOrPrimitive[], _separator: string);
|
8
|
+
getDisplayText(): string;
|
9
|
+
}
|
10
|
+
export type DisplayableOrPrimitive = Displayable | string | number | boolean;
|
11
|
+
export declare namespace DisplayableOrPrimitive {
|
12
|
+
function getDisplayText(value: DisplayableOrPrimitive): string;
|
13
|
+
}
|
@@ -1,5 +1,6 @@
|
|
1
|
+
import { DisplayableOrPrimitive } from './Displayable.js';
|
1
2
|
/**
|
2
3
|
* @example
|
3
4
|
* "Сообщение: {0} Экранирование: \{0}", ["Привет!"] -> "Сообщение: Привет! Экранирование: {0}"
|
4
5
|
*/
|
5
|
-
export declare function formatString(text: string, ...formatArguments: readonly
|
6
|
+
export declare function formatString(text: string, ...formatArguments: readonly DisplayableOrPrimitive[]): string;
|
@@ -7,6 +7,7 @@ export declare const enum HelperPhraseKind {
|
|
7
7
|
PackageAlias = 4,
|
8
8
|
PackageNameSegment = 5,
|
9
9
|
Variable = 6,
|
10
|
-
Overloads = 7
|
10
|
+
Overloads = 7,
|
11
|
+
EnumeratorMethodName = 8
|
11
12
|
}
|
12
13
|
export declare function getHelperPhrase(kind: HelperPhraseKind, locale: PackageLocale): string;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Analyzer } from '../analysis/index.js';
|
2
|
-
import { StructuredTypeDeclaration, VariantTypeDeclaration } from '../analysis/NodeTypeUtils.js';
|
2
|
+
import { StructuredTypeDeclaration, TypeWithMembersDeclaration, VariantTypeDeclaration } from '../analysis/NodeTypeUtils.js';
|
3
3
|
import { Entity, PackageEntity, TypeEntity, TypeEntityWithMembers } from '../entities/index.js';
|
4
4
|
import { SourceFile } from '../project/index.js';
|
5
5
|
import * as tree from '../tree/index.js';
|
@@ -27,11 +27,11 @@ declare class TypeMemberDeclarationQuery extends TreeQuery {
|
|
27
27
|
}
|
28
28
|
export type TypeMemberDeclarationContainer = TypeMemberDeclarationContainer_type | TypeMemberDeclarationContainer_typeExtension;
|
29
29
|
declare class TypeMemberDeclarationContainer_type implements ITypeMemberDeclarationContainer {
|
30
|
-
readonly declaration:
|
30
|
+
readonly declaration: TypeWithMembersDeclaration;
|
31
31
|
readonly memberBlock: tree.TypeMemberDeclarationBlock;
|
32
32
|
readonly kind = "type";
|
33
|
-
constructor(declaration:
|
34
|
-
getNode():
|
33
|
+
constructor(declaration: TypeWithMembersDeclaration, memberBlock: tree.TypeMemberDeclarationBlock);
|
34
|
+
getNode(): TypeWithMembersDeclaration;
|
35
35
|
getMemberBlock(): tree.TypeMemberDeclarationBlock;
|
36
36
|
getTypeEntity(analyzer: Analyzer): TypeEntityWithMembers;
|
37
37
|
getContextualTypeEntity(analyzer: Analyzer): TypeEntity | undefined;
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { Diagnostic } from '../diagnostic/Diagnostic.js';
|
2
|
-
import { MaybeLazy } from './Lazy.js';
|
3
2
|
export type WithDiagnostics<T> = WithDiagnostics_ok<T> | WithDiagnostics_error<T>;
|
4
3
|
export declare class WithDiagnostics_ok<T> implements IWithDiagnostics<T> {
|
5
4
|
readonly value: T;
|
@@ -9,9 +8,9 @@ export declare class WithDiagnostics_ok<T> implements IWithDiagnostics<T> {
|
|
9
8
|
}
|
10
9
|
export declare class WithDiagnostics_error<T> implements IWithDiagnostics<T> {
|
11
10
|
readonly kind = "error";
|
12
|
-
readonly value: readonly
|
13
|
-
constructor(diagnostic:
|
14
|
-
constructor(diagnostics: readonly
|
11
|
+
readonly value: readonly Diagnostic[];
|
12
|
+
constructor(diagnostic: Diagnostic);
|
13
|
+
constructor(diagnostics: readonly Diagnostic[]);
|
15
14
|
toNullable(): T | undefined;
|
16
15
|
}
|
17
16
|
interface IWithDiagnostics<T> {
|
@@ -6,6 +6,7 @@ export * from './CancellationToken.js';
|
|
6
6
|
export * from './Constants.js';
|
7
7
|
export * from './Debug.js';
|
8
8
|
export * from './Delayed.js';
|
9
|
+
export * from './Displayable.js';
|
9
10
|
export * from './Errors.js';
|
10
11
|
export * from './FormatString.js';
|
11
12
|
export * from './Interner.js';
|
@@ -74,131 +74,135 @@ export declare enum DiagnosticCode {
|
|
74
74
|
TypeExpected = 235,
|
75
75
|
NameOfTypeOrPackageNotFound = 236,
|
76
76
|
TypeIsNotATag = 237,
|
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
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
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
|
-
|
77
|
+
Operator0IsNotDefinedForTypes1And2 = 238,
|
78
|
+
Operator0IsNotDefinedForType1 = 239,
|
79
|
+
VariantMustHaveAssociatedValue = 240,
|
80
|
+
TranslationsCanOnlyBeDeclaredInTranslationPackage = 241,
|
81
|
+
UnknownTranslatedPackage0 = 242,
|
82
|
+
BaseCannotBeUsedInThisContext = 243,
|
83
|
+
OverriddenMethodNotFound = 244,
|
84
|
+
ObjectCannotBeUsedInThisContext = 245,
|
85
|
+
BaseCannotBeUsedAsAnExpressionInItself = 246,
|
86
|
+
InterfacePackageMustNotContainImplementation = 247,
|
87
|
+
InterfacePackageVariablesMustNotHaveInitializers = 248,
|
88
|
+
BodyIsMissing = 249,
|
89
|
+
AbstractTypeMembersMustNotHaveBody = 250,
|
90
|
+
MembersOfAspectTypeMustNotHaveBody = 251,
|
91
|
+
AspectTypeFieldsMustBeAbstract = 252,
|
92
|
+
DeclarationsMarkedWithBuiltIntoPlatformTagMustNotHaveBody = 253,
|
93
|
+
AbstractFieldsMustNotHaveInitializers = 254,
|
94
|
+
PackageIsAlreadyImported = 255,
|
95
|
+
OnlySubprogramsWithReturnTypeCanReturnValue = 256,
|
96
|
+
FunctionsUsingYieldStatementCannotReturnValue = 257,
|
97
|
+
YieldStatementCannotBeUsedInAnonymousFunctions = 258,
|
98
|
+
YieldStatementCannotBeUsedHere = 259,
|
99
|
+
FunctionsUsingYieldStatementMustHaveEnumerableAsReturnType = 260,
|
100
|
+
YieldStatementCannotBeUsedInTryStatementThatHasCatchClause = 261,
|
101
|
+
YieldStatementCannotBeUsedInFinallyClause = 262,
|
102
|
+
SubprogramMustReturnValue = 263,
|
103
|
+
ResultVariableCannotBeUsedInFunctionsUsingYieldStatement = 264,
|
104
|
+
TypeAliasReferencesItself = 265,
|
105
|
+
TypeParameterHasCircularConstraint = 266,
|
106
|
+
BaseTypeCausesInheritanceCycle = 267,
|
107
|
+
OnlyGenericTypesAndFunctionsCanBeSpecialized = 268,
|
108
|
+
Expected0TypeArguments = 269,
|
109
|
+
ExpectedFrom0To1TypeArguments = 270,
|
110
|
+
Type0IsNotAssignableToConstraint1 = 271,
|
111
|
+
VariableIsDeclaredButItsValueIsNeverRead = 272,
|
112
|
+
FunctionIsDeclaredButNotUsed = 273,
|
113
|
+
TypeParameterIsDeclaredButNotUsed = 274,
|
114
|
+
DefaultConstructorArgumentsMustBeNamed = 275,
|
115
|
+
IncorrectBodyOfBasicAliasTypeMethod = 276,
|
116
|
+
TheFollowingDeclarationsAreNotTranslated0 = 277,
|
117
|
+
TheFollowingDeclarationAreNotTranslated0And1More = 278,
|
118
|
+
OperatorFunction0MustNotHaveParameters = 279,
|
119
|
+
OperatorFunction0MustHaveOneParameter = 280,
|
120
|
+
OperatorFunction0MustHaveNoMoreThanOneParameter = 281,
|
121
|
+
CorrespondingBasicTypeMemberNotFound = 282,
|
122
|
+
AsyncFunctionCanOnlyBeCalledFromFunctionMarkedWithAsyncModifier = 283,
|
123
|
+
TagNotFound = 284,
|
124
|
+
TypeOrFunctionNameExpected = 285,
|
125
|
+
PackageNameOrAliasExpected = 286,
|
126
|
+
ExpressionCanBeNone = 287,
|
127
|
+
TargetVariableExpressionInTheAssignmentStatementCannotContainQuestionOperator = 288,
|
128
|
+
UnreachableCode = 289,
|
129
|
+
RecursionOccurredWhileCalculatingTheTypeOfTheExpression = 290,
|
130
|
+
RecursionOccurredWhileInferringTheTypeOfTheVariable = 291,
|
131
|
+
ScopeAlreadyContainsDeclarationWithTheSameName = 292,
|
132
|
+
ScopeAlreadyContainsFunctionWithTheSameNameAndParameterTypes = 293,
|
133
|
+
ParameterName0ConflictsWithAutomaticallyGeneratedVariableName = 294,
|
134
|
+
PackageAlreadyContainsDeclarationWithTheSameName = 295,
|
135
|
+
PackageAlreadyContainsFunctionWithTheSameNameAndParameterTypes = 296,
|
136
|
+
PackageAlreadyContainsTypeWithTheSameNameAndSameOrIntersectingTypeParameterCount = 297,
|
137
|
+
PackageAliasWithTheSameNameAlreadyExits = 298,
|
138
|
+
TypeAlreadyContainsDeclarationWithTheSameName = 299,
|
139
|
+
TypeAlreadyContainsMethodWithTheSameNameAndParameterTypes = 300,
|
140
|
+
TypeAlreadyContainsConstructorWithTheSameParameterTypes = 301,
|
141
|
+
TypeAlreadyContainsOperatorFunctionWithTheSameParameterTypes = 302,
|
142
|
+
TypeAlreadyContainsIndexerWithTheSameParameterTypes = 303,
|
143
|
+
TypeCanHaveOnlyOneDestructor = 304,
|
144
|
+
TypeCanHaveOnlyOneDereferenceOperator = 305,
|
145
|
+
VariableIsUsedBeforeItsDeclaration = 306,
|
146
|
+
VariableMayNotHasBeenAssignedBeforeUsage = 307,
|
147
|
+
NotAllCodePathsReturnAValueAndResultLocalVariableMayNotHasBeenAssigned = 308,
|
148
|
+
WriteFunctionHasNoCorrespondingReadFunction = 309,
|
149
|
+
TypeCannotHaveMultipleBaseObjectTypes = 310,
|
150
|
+
TypeThatIsNotMarkedAsBasicCannotBeUsedAsBaseType = 311,
|
151
|
+
PlainObjectTypeCannotBeUsedAsBaseType = 312,
|
152
|
+
ThisTypeIsAlreadyListedInBaseTypeList = 313,
|
153
|
+
OnlyObjectAndAspectTypesCanBeUsedAsBaseTypes = 314,
|
154
|
+
PlainObjectTypeCanHaveOnlyAspectsAsBaseTypes = 315,
|
155
|
+
AspectTypeCanHaveOnlyAspectsAsBaseTypes = 316,
|
156
|
+
ModifierListAlreadyContains0Modifier = 317,
|
157
|
+
ModifierListOfOuterDeclarationGroupAlreadyContains0Modifier = 318,
|
158
|
+
_0ModifierIsNotAllowedHere = 319,
|
159
|
+
DeclarationCannotBePlacedInGroupHaving0Modifier = 320,
|
160
|
+
PackageConstructorDeclarationCannotHaveModifiers = 321,
|
161
|
+
PackageEntryPointDeclarationCannotHaveModifiers = 322,
|
162
|
+
TranslationsCannotHaveModifiers = 323,
|
163
|
+
AbstractModifierCanOnlyBeUsedInAbstractObjectTypes = 324,
|
164
|
+
BasicModifierCanOnlyBeUsedInObjectTypesAspectTypesAndTypeAliases = 325,
|
165
|
+
OverrideModifierCanOnlyBeUsedInObjectAndAspectTypes = 326,
|
166
|
+
_0ModifierCannotBeUsedWith1Modifier = 327,
|
167
|
+
VariantDeclarationCannotHaveHiddenModifier = 328,
|
168
|
+
BasicModifierCanOnlyBeAppliedToObjectTypes = 329,
|
169
|
+
AbstractModifierCanOnlyBeAppliedToObjectTypes = 330,
|
170
|
+
NotBasicObjectTypesCannotHaveBasicMembers = 331,
|
171
|
+
BasicModifierCannotBeAppliedToAspectTypeFields = 332,
|
172
|
+
WriteFunctionMustHaveTheSameModifiersAsReadFunction = 333,
|
173
|
+
WriteFunctionMustHaveTheSameOrMoreRestrictiveHidingLevelThenReadFunction = 334,
|
174
|
+
DeclarationConflictsWithBaseTypeMember0 = 335,
|
175
|
+
DeclarationConflictsWithBaseTypeMember0AddOverrideModifier = 336,
|
176
|
+
DeclarationConflictsWithBaseTypeMember0ThisMemberCannotBeOverridden = 337,
|
177
|
+
DeclarationConflictsWithBaseTypeMember0ToOverrideTypeMustBeAssignableTo1 = 338,
|
178
|
+
DeclarationConflictsWithBaseTypeMember0ToOverrideReturnTypeMustBeAssignableTo1 = 339,
|
179
|
+
OverridingMemberMustHaveTheSameHidingLevelAsBaseMember0 = 340,
|
180
|
+
OverridingMethodMustBeAsyncBecauseBaseMethod0IsAsync = 341,
|
181
|
+
OverridingMethodMustNotBeAsyncBecauseBaseMethod0IsNotAsync = 342,
|
182
|
+
OverridingFieldMustNotBeConstOrHaveWriteFunctionToMatchBaseField0 = 343,
|
183
|
+
OverridingMemberMustHaveWriteFunctionToMatchBaseMember0 = 344,
|
184
|
+
TypeDoesNotImplementMember0 = 345,
|
185
|
+
TypeDoesNotImplementMember0ImplicitImplementationTypeMismatch1 = 346,
|
186
|
+
TypeDoesNotImplementMember0ImplicitImplementation1IsAsync = 347,
|
187
|
+
TypeDoesNotImplementMember0ImplicitImplementation1IsNotAsync = 348,
|
188
|
+
TypeDoesNotImplementMember0ImplicitImplementation1IsNotWriteable = 349,
|
189
|
+
TypeDoesNotImplementMember0ImplicitImplementation1WriteFunctionIsHidden = 350,
|
190
|
+
CannotAccessAbstractMemberOfBaseType = 351,
|
191
|
+
TheFollowingBaseTypeMembersConflictAndMustBeOverridden0 = 352,
|
192
|
+
TheFollowingBaseTypeMembersConflictBecauseTheyHaveTheSameOriginalName0AndMustBeOverridden1 = 353,
|
193
|
+
EitherIdentifiersOrIntegerIndexesAreAllowedAsParametersOfTextTemplateLiteral = 354,
|
194
|
+
OnlyIndex0IsAllowedHereAsParameterOfTextTemplateLiteral = 355,
|
195
|
+
OnlyIdentifierIsAllowedHereAsParameterOfTextTemplateLiteral = 356,
|
196
|
+
UnknownParameterOfTextTemplateTranslation = 357,
|
197
|
+
TheFirstStatementOfConstructorBlockMustBeEitherBaseOrOwnConstructorCall = 358,
|
198
|
+
ThisCallCausesOwnConstructorCallCycle = 359,
|
199
|
+
OwnConstructorCallMustBeTheFirstStatementOfConstructorBlock = 360,
|
200
|
+
BaseConstructorCallMustBeTheFirstStatementOfConstructorBlock = 361,
|
201
|
+
Field0HasNoInitializerAndMayNotBeAssignedInConstructor = 362,
|
202
|
+
Field0HasNoInitializerAndMayNotBeAssignedInPackageConstructor = 363,
|
203
|
+
Variable0HasNoInitializerAndMayNotBeAssignedInPackageConstructor = 364,
|
204
|
+
ExpressionOfType0CanNotBeUsedInForLoopBecauseNotEnumerableAndNoMethod1 = 365,
|
205
|
+
ForExpressionToBeUsedInForLoopMethod0MustReturnEnumeratorType = 366,
|
202
206
|
CannotFindTsLibDirectoryBaseSearchPaths0 = 401,
|
203
207
|
SourceFile0IsNotPartOfThePackageAndWontBeLoaded = 402,
|
204
208
|
ProgramWithoutMainPackageCannotBeCompiled = 403,
|
@@ -1,11 +1,15 @@
|
|
1
|
+
import { DisplayableOrPrimitive } from '../common/index.js';
|
1
2
|
import { DiagnosticCode } from './DiagnosticCode.js';
|
2
3
|
export declare class DiagnosticData {
|
3
4
|
readonly code: DiagnosticCode;
|
4
|
-
readonly message: string;
|
5
5
|
readonly kind: DiagnosticKind;
|
6
6
|
readonly flags: DiagnosticFlags;
|
7
|
-
|
8
|
-
|
7
|
+
private _messageFormat;
|
8
|
+
private _formatArguments;
|
9
|
+
private _message;
|
10
|
+
get message(): string;
|
11
|
+
constructor(code: DiagnosticCode, formatMessage: string | undefined, formatArguments: readonly DisplayableOrPrimitive[] | undefined, kind: DiagnosticKind, flags: DiagnosticFlags);
|
12
|
+
static withCode(code: DiagnosticCode, formatArguments?: readonly DisplayableOrPrimitive[], kind?: DiagnosticKind, flags?: DiagnosticFlags): DiagnosticData;
|
9
13
|
}
|
10
14
|
export declare const enum DiagnosticKind {
|
11
15
|
Error = 0,
|
@@ -111,7 +111,8 @@ export declare class Transformer {
|
|
111
111
|
transformJsInstanceOfExpressionChildren(expression: ir.JsInstanceOfExpression): void;
|
112
112
|
transformJsIdentifierExpressionChildren(_expression: ir.JsIdentifierExpression): void;
|
113
113
|
transformDereferenceExpressionChildren(expression: ir.DereferenceExpression): void;
|
114
|
-
|
114
|
+
transformValueJsObjectLiteralProperty(property: ir.ValueJsObjectLiteralProperty): ir.ValueJsObjectLiteralProperty;
|
115
|
+
transformFunctionJsObjectLiteralProperty(property: ir.FunctionJsObjectLiteralProperty): ir.FunctionJsObjectLiteralProperty;
|
115
116
|
transformSpreadJsObjectLiteralProperty(property: ir.SpreadJsObjectLiteralProperty): ir.SpreadJsObjectLiteralProperty;
|
116
117
|
transformDecorator(node: ir.Decorator): ir.Decorator;
|
117
118
|
private transformStatementsAndAddHoistedLocalVariables;
|
@@ -209,7 +210,8 @@ export interface TransformationConfig {
|
|
209
210
|
transformArguments?(declaration: ir.Arguments): NodeTransformationResult<ir.Arguments>;
|
210
211
|
transformCatchClause?(clause: ir.CatchClause): NodeTransformationResult<ir.CatchClause>;
|
211
212
|
transformFinallyClause?(clause: ir.FinallyClause): NodeTransformationResult<ir.FinallyClause>;
|
212
|
-
|
213
|
+
transformValueJsObjectLiteralProperty?(clause: ir.ValueJsObjectLiteralProperty): NodeTransformationResult<ir.ValueJsObjectLiteralProperty>;
|
214
|
+
transformFunctionJsObjectLiteralProperty?(clause: ir.FunctionJsObjectLiteralProperty): NodeTransformationResult<ir.FunctionJsObjectLiteralProperty>;
|
213
215
|
transformSpreadJsObjectLiteralProperty?(clause: ir.SpreadJsObjectLiteralProperty): NodeTransformationResult<ir.SpreadJsObjectLiteralProperty>;
|
214
216
|
transformDecorator?(node: ir.Decorator): NodeTransformationResult<ir.Decorator>;
|
215
217
|
}
|
@@ -174,4 +174,18 @@ declare const enum ErrorStatementEmitOptionsFlags {
|
|
174
174
|
None = 0,
|
175
175
|
WrapExpressionInError = 1
|
176
176
|
}
|
177
|
+
export declare class ForStatementEmitOptions {
|
178
|
+
private _flags;
|
179
|
+
constructor(flags?: ForStatementEmitOptionsFlags);
|
180
|
+
constructor(addExplicitCallOfEnumeratorMethodIfRequired: boolean);
|
181
|
+
static default(): ForStatementEmitOptions;
|
182
|
+
get addExplicitCallOfEnumeratorMethodIfRequired(): boolean;
|
183
|
+
set addExplicitCallOfEnumeratorMethodIfRequired(value: boolean);
|
184
|
+
setAddExplicitCallOfEnumeratorMethodIfRequired(value: boolean): this;
|
185
|
+
clone(): ForStatementEmitOptions;
|
186
|
+
}
|
187
|
+
declare const enum ForStatementEmitOptionsFlags {
|
188
|
+
None = 0,
|
189
|
+
AddExplicitCallOfEnumeratorMethodIfRequired = 1
|
190
|
+
}
|
177
191
|
export {};
|