@artel/artc 0.6.25214 → 0.6.25216

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.
Files changed (34) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +6 -4
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +318 -269
  5. package/build/{chunk-SKJMYOQR.js → chunk-6RYP5SET.js} +1 -1
  6. package/build/{chunk-YCHDDDYS.js → chunk-O7AXOZXA.js} +2 -2
  7. package/build/{chunk-ZFBZFTRR.js → chunk-TJG64G2K.js} +6079 -6321
  8. package/build/types/analysis/Analyzer.d.ts +1 -4
  9. package/build/types/analysis/{PrefixUnaryOperatorResolver.d.ts → UserDefinableUnaryOperatorResolver.d.ts} +3 -5
  10. package/build/types/analysis/Utils.d.ts +2 -2
  11. package/build/types/emitter/EmitterContext.d.ts +2 -0
  12. package/build/types/emitter/IrBuilder.d.ts +0 -1
  13. package/build/types/emitter/IrToJs.d.ts +0 -1
  14. package/build/types/emitter/Transformer.d.ts +158 -97
  15. package/build/types/emitter/ir/Nodes.d.ts +4 -11
  16. package/build/types/emitter/ir/types.d.ts +2 -2
  17. package/build/types/parser/UnescapeText.d.ts +1 -0
  18. package/build/types/services/NodeSemanticInfo.d.ts +0 -1
  19. package/build/types/services/workspace/CompilationController.d.ts +23 -1
  20. package/build/types/services/workspace/Workspace.d.ts +1 -0
  21. package/build/types/tree/NodeKind.d.ts +82 -83
  22. package/build/types/tree/TokenKind.d.ts +2 -2
  23. package/build/types/tree/green/Nodes.d.ts +3 -19
  24. package/build/types/tree/red/Nodes.d.ts +4 -18
  25. package/package.json +1 -1
  26. package/build/types/emitter/BlockStatementTransformationResult.d.ts +0 -10
  27. package/build/types/emitter/ExpressionTransformationResult.d.ts +0 -17
  28. package/build/types/emitter/Internal.d.ts +0 -9
  29. package/build/types/emitter/PackageMemberDeclarationTransformationResult.d.ts +0 -17
  30. package/build/types/emitter/SimpleTransformationResult.d.ts +0 -14
  31. package/build/types/emitter/StatementTransformationResult.d.ts +0 -21
  32. package/build/types/emitter/StructuredTypeMemberDeclarationTransformationResult.d.ts +0 -13
  33. package/build/types/emitter/TransformationContinuationAction.d.ts +0 -4
  34. package/build/types/emitter/TypeAccessExpressionTransformationResult.d.ts +0 -12
@@ -86,7 +86,6 @@ export declare class Analyzer {
86
86
  private readonly _baseExpressionMeanings;
87
87
  private readonly _namedTypeSpecifierResolutionResults;
88
88
  private readonly _prefixUnaryExpressionOperatorResolutionResults;
89
- private readonly _notExpressionOperatorResolutionResults;
90
89
  private readonly _binaryExpressionUserDefinableOperatorResolutionResults;
91
90
  private readonly _assignmentStatementOperatorResolutionResults;
92
91
  private readonly _methodEntitySignatureTypes;
@@ -159,8 +158,7 @@ export declare class Analyzer {
159
158
  checkMethodBodyUsesYieldStatement(node: tree.StatementBlock): boolean;
160
159
  enumerateAspects(type: types.Type): Iterable<types.StructuredType>;
161
160
  checkTypeIsBasedOnAspect(type: types.Type, aspectEntity: StructuredTypeEntity): boolean;
162
- resolvePrefixUnaryExpressionOperator(node: tree.PrefixUnaryExpression): WithDiagnostics<FoundAnonymousDeclaration<types.Operator>>;
163
- resolveNotExpressionOperator(node: tree.NotExpression): WithDiagnostics<FoundAnonymousDeclaration<types.Operator>>;
161
+ resolvePrefixUnaryExpressionUserDefinableOperator(node: tree.PrefixUnaryExpression): WithDiagnostics<FoundAnonymousDeclaration<types.Operator>>;
164
162
  resolveBinaryExpressionUserDefinableOperator(node: tree.BinaryExpression, operatorKind: BinaryOperatorKind): WithDiagnostics<FoundAnonymousDeclaration<types.Operator>>;
165
163
  resolveCompoundAssignmentStatementOperator(node: tree.AssignmentStatement, operatorKind: BinaryOperatorKind): WithDiagnostics<FoundAnonymousDeclaration<types.Operator>>;
166
164
  classifyBinaryExpressionOperator(operator: tree.BinaryExpressionOperator): BinaryExpressionOperatorClassificationResult;
@@ -281,7 +279,6 @@ declare class Type {
281
279
  private ofIndexedAccessExpression;
282
280
  private ofInvalidExpression;
283
281
  private ofIsExpression;
284
- private ofNotExpression;
285
282
  private ofParenthesizedExpression;
286
283
  private ofPrefixUnaryExpression;
287
284
  private ofPropertyAccessExpression;
@@ -1,5 +1,5 @@
1
1
  import { WithDiagnostics } from '../common/index.js';
2
- import { NotExpression, PrefixUnaryExpression } from '../tree/index.js';
2
+ import { PrefixUnaryExpression } from '../tree/index.js';
3
3
  import * as types from '../types/index.js';
4
4
  import { FoundAnonymousDeclaration } from './FoundDeclaration.js';
5
5
  import { Analyzer } from './index.js';
@@ -14,12 +14,10 @@ import { Analyzer } from './index.js';
14
14
  * Если подошло несколько операторов - ошибка неоднозначного доступа.
15
15
  * Если не подошёл ни один - алгоритм завершается с соответствующим сообщением об ошибке.
16
16
  */
17
- export declare class PrefixUnaryOperatorResolver {
17
+ export declare class UserDefinableUnaryOperatorResolver {
18
18
  private readonly _analyzer;
19
19
  private readonly _node;
20
- private get operand();
21
- private get operatorNode();
22
20
  private get operatorKind();
23
- constructor(_analyzer: Analyzer, _node: PrefixUnaryExpression | NotExpression);
21
+ constructor(_analyzer: Analyzer, _node: PrefixUnaryExpression);
24
22
  resolve(): WithDiagnostics<FoundAnonymousDeclaration<types.Operator>>;
25
23
  }
@@ -2,8 +2,8 @@ import { Entity, PackageEntity, StructuredTypeEntity, TypeParameterEntity, Varia
2
2
  import * as tree from '../tree/index.js';
3
3
  import * as types from '../types/index.js';
4
4
  import { Tag } from './Tags.js';
5
- type StringToken = tree.Token<tree.TokenKind.TextLiteral> | tree.Token<tree.TokenKind.TextTemplateHead> | tree.Token<tree.TokenKind.TextTemplatePart> | tree.Token<tree.TokenKind.TextTemplateTail>;
6
- export declare function getUnescapedTextFromStringToken(token: StringToken): string;
5
+ type TextToken = tree.Token<tree.TokenKind.TextLiteral> | tree.Token<tree.TokenKind.TextTemplateHead> | tree.Token<tree.TokenKind.TextTemplatePart> | tree.Token<tree.TokenKind.TextTemplateTail>;
6
+ export declare function getUnescapedTextFromTextToken(token: TextToken): string;
7
7
  export declare function unwrapParenthesizedExpressions(expression: tree.Expression): tree.Expression;
8
8
  export declare function getParentSkippingParenthesizedExpressions(expression: tree.Expression): tree.ExpressionParent;
9
9
  export declare function unaliasType(type: types.Type): types.Type;
@@ -7,6 +7,8 @@ export declare class EmitterContext {
7
7
  readonly entityMap: EntityMap;
8
8
  readonly type: TypeUtils;
9
9
  readonly standardTypes: StandardTypes;
10
+ private readonly _integerTypeEntity;
11
+ get integerTypeEntity(): TypeOrExtensionEntity;
10
12
  constructor(analyzer: Analyzer, entityMap: EntityMap);
11
13
  createIdentitySubstitutedType(entity: TypeOrExtensionEntity): Type;
12
14
  unaliasTypeEntity(typeEntity: TypeOrExtensionEntity): Type;
@@ -80,7 +80,6 @@ export declare class IrBuilder {
80
80
  private buildAutotypeCallExpression;
81
81
  private buildIndexedAccessExpression;
82
82
  private buildIsExpression;
83
- private buildNotExpression;
84
83
  private buildMethodLiteral;
85
84
  private buildParenthesizedExpression;
86
85
  private buildPrefixUnaryExpression;
@@ -57,7 +57,6 @@ export declare class IrToJs {
57
57
  private convertNoneLiteral;
58
58
  private convertIndexedAccessExpression;
59
59
  private convertHelperMethodCallExpression;
60
- private convertNotExpression;
61
60
  private convertIntegerLiteral;
62
61
  private convertNumericLiteral;
63
62
  private convertMethodLiteral;
@@ -1,7 +1,6 @@
1
1
  import { DebugStack } from './DebugStack.js';
2
- import { blockStatementTransformationResult, expressionTransformationResult, packageMemberDeclarationTransformationResult, simpleTransformationResult, statementTransformationResult, typeAccessExpressionTransformationResult, typeMemberDeclarationTransformationResult } from './Internal.js';
2
+ import { VariableEntity } from './Entities.js';
3
3
  import * as ir from './ir/index.js';
4
- import { TransformationContinuationAction } from './TransformationContinuationAction.js';
5
4
  export declare class Transformer {
6
5
  readonly config: TransformationConfig;
7
6
  protected readonly _debugStack: DebugStack;
@@ -29,7 +28,7 @@ export declare class Transformer {
29
28
  transformNestedMethodDeclarationStatementChildren(statement: ir.NestedMethodDeclarationStatement): void;
30
29
  transformNestedMethodDeclaration(declaration: ir.NestedMethodDeclaration): ir.NestedMethodDeclaration;
31
30
  transformValueParameterDeclaration(declaration: ir.ValueParameterDeclaration): ir.ValueParameterDeclaration;
32
- transformNodeWithSimpleTransformationResult<T>(node: T, transform: (node: T) => simpleTransformationResult.Type<T> | undefined): {
31
+ transformNodeWithGeneralTransformationResult<T>(node: T, transform: (node: T) => NodeTransformationResult<T> | undefined): {
33
32
  transformedNode: T;
34
33
  action: TransformationContinuationAction;
35
34
  };
@@ -77,7 +76,6 @@ export declare class Transformer {
77
76
  transformIntegerLiteralChildren(_expression: ir.IntegerLiteral): void;
78
77
  transformHelperMethodCallExpressionChildren(expression: ir.HelperMethodCallExpression): void;
79
78
  transformIsExpressionChildren(expression: ir.IsExpression): void;
80
- transformNotExpressionChildren(expression: ir.NotExpression): void;
81
79
  transformNumericLiteralChildren(_expression: ir.NumericLiteral): void;
82
80
  transformMethodLiteralChildren(expression: ir.MethodLiteral): void;
83
81
  transformPrefixUnaryExpressionChildren(expression: ir.PrefixUnaryExpression): void;
@@ -114,97 +112,160 @@ export declare class Transformer {
114
112
  private transformArrayWithErrorBoundary;
115
113
  private createLocalVariableDeclarations;
116
114
  }
117
- interface TransformationConfig {
118
- transformAssertionExpression?(expression: ir.AssertionExpression): expressionTransformationResult.Type;
119
- transformAssumptionExpression?(expression: ir.AssumptionExpression): expressionTransformationResult.Type;
120
- transformAsExpression?(expression: ir.AsExpression): expressionTransformationResult.Type;
121
- transformBinaryExpression?(expression: ir.BinaryExpression): expressionTransformationResult.Type;
122
- transformCallExpression?(expression: ir.CallExpression): expressionTransformationResult.Type;
123
- transformIndexedAccessExpression?(expression: ir.IndexedAccessExpression): expressionTransformationResult.Type;
124
- transformIsExpression?(expression: ir.IsExpression): expressionTransformationResult.Type;
125
- transformNotExpression?(expression: ir.NotExpression): expressionTransformationResult.Type;
126
- transformMethodLiteral?(expression: ir.MethodLiteral): expressionTransformationResult.Type;
127
- transformPrefixUnaryExpression?(expression: ir.PrefixUnaryExpression): expressionTransformationResult.Type;
128
- transformReferenceExpression?(expression: ir.ReferenceExpression): expressionTransformationResult.Type;
129
- transformTernaryExpression?(expression: ir.TernaryExpression): expressionTransformationResult.Type;
130
- transformArrayLiteral?(expression: ir.ArrayLiteral): expressionTransformationResult.Type;
131
- transformTypeAccessExpression?(expression: ir.TypeAccessExpression): typeAccessExpressionTransformationResult.TypeAccessExpressionTransformationResult;
132
- transformVariableAccessExpression?(expression: ir.VariableAccessExpression): expressionTransformationResult.Type;
133
- transformMethodAccessExpression?(expression: ir.MethodAccessExpression): expressionTransformationResult.Type;
134
- transformVariantAccessExpression?(expression: ir.VariantAccessExpression): expressionTransformationResult.Type;
135
- transformTypeVariableAccessExpression?(expression: ir.TypeVariableAccessExpression): expressionTransformationResult.Type;
136
- transformTypeMethodAccessExpression?(expression: ir.TypeMethodAccessExpression): expressionTransformationResult.Type;
137
- transformTextTemplateLiteral?(expression: ir.TextTemplateLiteral): expressionTransformationResult.Type;
138
- transformCharLiteral?(expression: ir.CharLiteral): expressionTransformationResult.Type;
139
- transformTextLiteral?(expression: ir.TextLiteral): expressionTransformationResult.Type;
140
- transformBooleanLiteral?(expression: ir.BooleanLiteral): expressionTransformationResult.Type;
141
- transformIntegerLiteral?(expression: ir.IntegerLiteral): expressionTransformationResult.Type;
142
- transformNumericLiteral?(expression: ir.NumericLiteral): expressionTransformationResult.Type;
143
- transformMeasureLiteral?(expression: ir.MeasureLiteral): expressionTransformationResult.Type;
144
- transformNoneLiteral?(expression: ir.NoneLiteral): expressionTransformationResult.Type;
145
- transformThisExpression?(expression: ir.ThisExpression): expressionTransformationResult.Type;
146
- transformBaseExpression?(expression: ir.BaseExpression): expressionTransformationResult.Type;
147
- transformHelperMethodCallExpression?(expression: ir.HelperMethodCallExpression): expressionTransformationResult.Type;
148
- transformConstructorCallExpression?(expression: ir.ConstructorCallExpression): expressionTransformationResult.Type;
149
- transformInlineJsExpression?(expression: ir.InlineJsExpression): expressionTransformationResult.Type;
150
- transformAssignmentExpression?(expression: ir.AssignmentExpression): expressionTransformationResult.Type;
151
- transformCommaExpression?(expression: ir.CommaExpression): expressionTransformationResult.Type;
152
- transformOwnConstructorCallExpression?(expression: ir.OwnConstructorCallExpression): expressionTransformationResult.Type;
153
- transformBaseConstructorCallExpression?(expression: ir.BaseConstructorCallExpression): expressionTransformationResult.Type;
154
- transformJsIndexedAccessExpression?(expression: ir.JsIndexedAccessExpression): expressionTransformationResult.Type;
155
- transformJsObjectLiteral?(expression: ir.JsObjectLiteral): expressionTransformationResult.Type;
156
- transformJsPropertyAccessExpression?(expression: ir.JsPropertyAccessExpression): expressionTransformationResult.Type;
157
- transformJsFunctionLiteral?(expression: ir.JsFunctionLiteral): expressionTransformationResult.Type;
158
- transformJsTypeOfExpression?(expression: ir.JsTypeOfExpression): expressionTransformationResult.Type;
159
- transformJsInstanceOfExpression?(expression: ir.JsInstanceOfExpression): expressionTransformationResult.Type;
160
- transformJsIdentifierExpression?(expression: ir.JsIdentifierExpression): expressionTransformationResult.Type;
161
- transformDereferenceExpression?(expression: ir.DereferenceExpression): expressionTransformationResult.Type;
162
- transformBlockStatement?(statement: ir.BlockStatement): blockStatementTransformationResult.Type;
163
- transformBreakLoopStatement?(statement: ir.BreakLoopStatement): statementTransformationResult.Type;
164
- transformContinueLoopStatement?(statement: ir.ContinueLoopStatement): statementTransformationResult.Type;
165
- transformDisposeStatement?(statement: ir.DisposeStatement): statementTransformationResult.Type;
166
- transformRunStatement?(statement: ir.RunStatement): statementTransformationResult.Type;
167
- transformEmptyStatement?(statement: ir.EmptyStatement): statementTransformationResult.Type;
168
- transformErrorStatement?(statement: ir.ErrorStatement): statementTransformationResult.Type;
169
- transformExpressionStatement?(statement: ir.ExpressionStatement): statementTransformationResult.Type;
170
- transformForStatement?(statement: ir.ForStatement): statementTransformationResult.Type;
171
- transformIfStatement?(statement: ir.IfStatement): statementTransformationResult.Type;
172
- transformNestedMethodDeclarationStatement?(statement: ir.NestedMethodDeclarationStatement): statementTransformationResult.Type;
173
- transformLocalVariableDeclarationStatement?(statement: ir.LocalVariableDeclarationStatement): statementTransformationResult.Type;
174
- transformLoopStatement?(statement: ir.LoopStatement): statementTransformationResult.Type;
175
- transformReturnStatement?(statement: ir.ReturnStatement): statementTransformationResult.Type;
176
- transformSwitchStatement?(statement: ir.SwitchStatement): statementTransformationResult.Type;
177
- transformWhileStatement?(statement: ir.WhileStatement): statementTransformationResult.Type;
178
- transformYieldStatement?(statement: ir.YieldStatement): statementTransformationResult.Type;
179
- transformAssignmentStatement?(statement: ir.AssignmentStatement): statementTransformationResult.Type;
180
- transformTryCatchFinallyStatement?(statement: ir.TryCatchFinallyStatement): statementTransformationResult.Type;
181
- transformEsModuleImportDirectiveStatement?(statement: ir.EsModuleImportDirectiveStatement): statementTransformationResult.Type;
182
- transformCjsModuleImportDirectiveStatement?(statement: ir.CjsModuleImportDirectiveStatement): statementTransformationResult.Type;
183
- transformJsNamespaceDestructuringStatement?(statement: ir.JsNamespaceDestructuringStatement): statementTransformationResult.Type;
184
- transformPackageMethodDeclaration?(declaration: ir.PackageMethodDeclaration): packageMemberDeclarationTransformationResult.PackageMemberDeclarationTransformationResult;
185
- transformPackageTypeDeclaration?(declaration: ir.PackageTypeDeclaration): packageMemberDeclarationTransformationResult.PackageMemberDeclarationTransformationResult;
186
- transformPackageVariableDeclaration?(declaration: ir.PackageVariableDeclaration): packageMemberDeclarationTransformationResult.PackageMemberDeclarationTransformationResult;
187
- transformPackageVariableGetterDeclaration?(declaration: ir.PackageVariableGetterDeclaration): packageMemberDeclarationTransformationResult.PackageMemberDeclarationTransformationResult;
188
- transformPackageVariableSetterDeclaration?(declaration: ir.PackageVariableSetterDeclaration): packageMemberDeclarationTransformationResult.PackageMemberDeclarationTransformationResult;
189
- transformPackageVariantTypeDeclaration?(declaration: ir.PackageVariantTypeDeclaration): packageMemberDeclarationTransformationResult.PackageMemberDeclarationTransformationResult;
190
- transformTypeVariableDeclaration?(declaration: ir.TypeVariableDeclaration): typeMemberDeclarationTransformationResult.Type;
191
- transformTypeMethodDeclaration?(declaration: ir.TypeMethodDeclaration): typeMemberDeclarationTransformationResult.Type;
192
- transformTypeConstructorDeclaration?(declaration: ir.TypeConstructorDeclaration): typeMemberDeclarationTransformationResult.Type;
193
- transformTypeDestructorDeclaration?(declaration: ir.TypeDestructorDeclaration): typeMemberDeclarationTransformationResult.Type;
194
- transformTypeIndexedGetterDeclaration?(declaration: ir.TypeIndexedGetterDeclaration): typeMemberDeclarationTransformationResult.Type;
195
- transformTypeIndexedSetterDeclaration?(declaration: ir.TypeIndexedSetterDeclaration): typeMemberDeclarationTransformationResult.Type;
196
- transformTypeDereferencedVariableGetterDeclaration?(declaration: ir.TypeDereferencedVariableGetterDeclaration): typeMemberDeclarationTransformationResult.Type;
197
- transformTypeDereferencedVariableSetterDeclaration?(declaration: ir.TypeDereferencedVariableSetterDeclaration): typeMemberDeclarationTransformationResult.Type;
198
- transformTypeVariableGetterDeclaration?(declaration: ir.TypeVariableGetterDeclaration): typeMemberDeclarationTransformationResult.Type;
199
- transformTypeVariableSetterDeclaration?(declaration: ir.TypeVariableSetterDeclaration): typeMemberDeclarationTransformationResult.Type;
200
- transformNestedMethodDeclaration?(declaration: ir.NestedMethodDeclaration): simpleTransformationResult.Type<ir.NestedMethodDeclaration>;
201
- transformLocalVariableDeclaration?(declaration: ir.LocalVariableDeclaration): simpleTransformationResult.Type<ir.LocalVariableDeclaration>;
202
- transformValueParameterDeclaration?(declaration: ir.ValueParameterDeclaration): simpleTransformationResult.Type<ir.ValueParameterDeclaration>;
203
- transformCaseClause?(declaration: ir.CaseClause): simpleTransformationResult.Type<ir.CaseClause>;
204
- transformVariantDeclaration?(declaration: ir.VariantDeclaration): simpleTransformationResult.Type<ir.VariantDeclaration>;
205
- transformCallArguments?(declaration: ir.CallArguments): simpleTransformationResult.Type<ir.CallArguments>;
206
- transformOnErrorClause?(clause: ir.OnErrorClause): simpleTransformationResult.Type<ir.OnErrorClause>;
207
- transformFinallyClause?(clause: ir.FinallyClause): simpleTransformationResult.Type<ir.FinallyClause>;
208
- transformJsObjectLiteralProperty?(clause: ir.JsObjectLiteralProperty): simpleTransformationResult.Type<ir.JsObjectLiteralProperty>;
115
+ export interface TransformationConfig {
116
+ transformAssertionExpression?(expression: ir.AssertionExpression): ExpressionTransformationResult;
117
+ transformAssumptionExpression?(expression: ir.AssumptionExpression): ExpressionTransformationResult;
118
+ transformAsExpression?(expression: ir.AsExpression): ExpressionTransformationResult;
119
+ transformBinaryExpression?(expression: ir.BinaryExpression): ExpressionTransformationResult;
120
+ transformCallExpression?(expression: ir.CallExpression): ExpressionTransformationResult;
121
+ transformIndexedAccessExpression?(expression: ir.IndexedAccessExpression): ExpressionTransformationResult;
122
+ transformIsExpression?(expression: ir.IsExpression): ExpressionTransformationResult;
123
+ transformMethodLiteral?(expression: ir.MethodLiteral): ExpressionTransformationResult;
124
+ transformPrefixUnaryExpression?(expression: ir.PrefixUnaryExpression): ExpressionTransformationResult;
125
+ transformReferenceExpression?(expression: ir.ReferenceExpression): ExpressionTransformationResult;
126
+ transformTernaryExpression?(expression: ir.TernaryExpression): ExpressionTransformationResult;
127
+ transformArrayLiteral?(expression: ir.ArrayLiteral): ExpressionTransformationResult;
128
+ transformTypeAccessExpression?(expression: ir.TypeAccessExpression): TypeAccessExpressionTransformationResult;
129
+ transformVariableAccessExpression?(expression: ir.VariableAccessExpression): ExpressionTransformationResult;
130
+ transformMethodAccessExpression?(expression: ir.MethodAccessExpression): ExpressionTransformationResult;
131
+ transformVariantAccessExpression?(expression: ir.VariantAccessExpression): ExpressionTransformationResult;
132
+ transformTypeVariableAccessExpression?(expression: ir.TypeVariableAccessExpression): ExpressionTransformationResult;
133
+ transformTypeMethodAccessExpression?(expression: ir.TypeMethodAccessExpression): ExpressionTransformationResult;
134
+ transformTextTemplateLiteral?(expression: ir.TextTemplateLiteral): ExpressionTransformationResult;
135
+ transformCharLiteral?(expression: ir.CharLiteral): ExpressionTransformationResult;
136
+ transformTextLiteral?(expression: ir.TextLiteral): ExpressionTransformationResult;
137
+ transformBooleanLiteral?(expression: ir.BooleanLiteral): ExpressionTransformationResult;
138
+ transformIntegerLiteral?(expression: ir.IntegerLiteral): ExpressionTransformationResult;
139
+ transformNumericLiteral?(expression: ir.NumericLiteral): ExpressionTransformationResult;
140
+ transformMeasureLiteral?(expression: ir.MeasureLiteral): ExpressionTransformationResult;
141
+ transformNoneLiteral?(expression: ir.NoneLiteral): ExpressionTransformationResult;
142
+ transformThisExpression?(expression: ir.ThisExpression): ExpressionTransformationResult;
143
+ transformBaseExpression?(expression: ir.BaseExpression): ExpressionTransformationResult;
144
+ transformHelperMethodCallExpression?(expression: ir.HelperMethodCallExpression): ExpressionTransformationResult;
145
+ transformConstructorCallExpression?(expression: ir.ConstructorCallExpression): ExpressionTransformationResult;
146
+ transformInlineJsExpression?(expression: ir.InlineJsExpression): ExpressionTransformationResult;
147
+ transformAssignmentExpression?(expression: ir.AssignmentExpression): ExpressionTransformationResult;
148
+ transformCommaExpression?(expression: ir.CommaExpression): ExpressionTransformationResult;
149
+ transformOwnConstructorCallExpression?(expression: ir.OwnConstructorCallExpression): ExpressionTransformationResult;
150
+ transformBaseConstructorCallExpression?(expression: ir.BaseConstructorCallExpression): ExpressionTransformationResult;
151
+ transformJsIndexedAccessExpression?(expression: ir.JsIndexedAccessExpression): ExpressionTransformationResult;
152
+ transformJsObjectLiteral?(expression: ir.JsObjectLiteral): ExpressionTransformationResult;
153
+ transformJsPropertyAccessExpression?(expression: ir.JsPropertyAccessExpression): ExpressionTransformationResult;
154
+ transformJsFunctionLiteral?(expression: ir.JsFunctionLiteral): ExpressionTransformationResult;
155
+ transformJsTypeOfExpression?(expression: ir.JsTypeOfExpression): ExpressionTransformationResult;
156
+ transformJsInstanceOfExpression?(expression: ir.JsInstanceOfExpression): ExpressionTransformationResult;
157
+ transformJsIdentifierExpression?(expression: ir.JsIdentifierExpression): ExpressionTransformationResult;
158
+ transformDereferenceExpression?(expression: ir.DereferenceExpression): ExpressionTransformationResult;
159
+ transformBlockStatement?(statement: ir.BlockStatement): StatementTransformationResult;
160
+ transformBreakLoopStatement?(statement: ir.BreakLoopStatement): StatementTransformationResult;
161
+ transformContinueLoopStatement?(statement: ir.ContinueLoopStatement): StatementTransformationResult;
162
+ transformDisposeStatement?(statement: ir.DisposeStatement): StatementTransformationResult;
163
+ transformRunStatement?(statement: ir.RunStatement): StatementTransformationResult;
164
+ transformEmptyStatement?(statement: ir.EmptyStatement): StatementTransformationResult;
165
+ transformErrorStatement?(statement: ir.ErrorStatement): StatementTransformationResult;
166
+ transformExpressionStatement?(statement: ir.ExpressionStatement): StatementTransformationResult;
167
+ transformForStatement?(statement: ir.ForStatement): StatementTransformationResult;
168
+ transformIfStatement?(statement: ir.IfStatement): StatementTransformationResult;
169
+ transformNestedMethodDeclarationStatement?(statement: ir.NestedMethodDeclarationStatement): StatementTransformationResult;
170
+ transformLocalVariableDeclarationStatement?(statement: ir.LocalVariableDeclarationStatement): StatementTransformationResult;
171
+ transformLoopStatement?(statement: ir.LoopStatement): StatementTransformationResult;
172
+ transformReturnStatement?(statement: ir.ReturnStatement): StatementTransformationResult;
173
+ transformSwitchStatement?(statement: ir.SwitchStatement): StatementTransformationResult;
174
+ transformWhileStatement?(statement: ir.WhileStatement): StatementTransformationResult;
175
+ transformYieldStatement?(statement: ir.YieldStatement): StatementTransformationResult;
176
+ transformAssignmentStatement?(statement: ir.AssignmentStatement): StatementTransformationResult;
177
+ transformTryCatchFinallyStatement?(statement: ir.TryCatchFinallyStatement): StatementTransformationResult;
178
+ transformEsModuleImportDirectiveStatement?(statement: ir.EsModuleImportDirectiveStatement): StatementTransformationResult;
179
+ transformCjsModuleImportDirectiveStatement?(statement: ir.CjsModuleImportDirectiveStatement): StatementTransformationResult;
180
+ transformJsNamespaceDestructuringStatement?(statement: ir.JsNamespaceDestructuringStatement): StatementTransformationResult;
181
+ transformPackageMethodDeclaration?(declaration: ir.PackageMethodDeclaration): PackageMemberDeclarationTransformationResult;
182
+ transformPackageTypeDeclaration?(declaration: ir.PackageTypeDeclaration): PackageMemberDeclarationTransformationResult;
183
+ transformPackageVariableDeclaration?(declaration: ir.PackageVariableDeclaration): PackageMemberDeclarationTransformationResult;
184
+ transformPackageVariableGetterDeclaration?(declaration: ir.PackageVariableGetterDeclaration): PackageMemberDeclarationTransformationResult;
185
+ transformPackageVariableSetterDeclaration?(declaration: ir.PackageVariableSetterDeclaration): PackageMemberDeclarationTransformationResult;
186
+ transformPackageVariantTypeDeclaration?(declaration: ir.PackageVariantTypeDeclaration): PackageMemberDeclarationTransformationResult;
187
+ transformTypeVariableDeclaration?(declaration: ir.TypeVariableDeclaration): TypeMemberDeclarationTransformationResult;
188
+ transformTypeMethodDeclaration?(declaration: ir.TypeMethodDeclaration): TypeMemberDeclarationTransformationResult;
189
+ transformTypeConstructorDeclaration?(declaration: ir.TypeConstructorDeclaration): TypeMemberDeclarationTransformationResult;
190
+ transformTypeDestructorDeclaration?(declaration: ir.TypeDestructorDeclaration): TypeMemberDeclarationTransformationResult;
191
+ transformTypeIndexedGetterDeclaration?(declaration: ir.TypeIndexedGetterDeclaration): TypeMemberDeclarationTransformationResult;
192
+ transformTypeIndexedSetterDeclaration?(declaration: ir.TypeIndexedSetterDeclaration): TypeMemberDeclarationTransformationResult;
193
+ transformTypeDereferencedVariableGetterDeclaration?(declaration: ir.TypeDereferencedVariableGetterDeclaration): TypeMemberDeclarationTransformationResult;
194
+ transformTypeDereferencedVariableSetterDeclaration?(declaration: ir.TypeDereferencedVariableSetterDeclaration): TypeMemberDeclarationTransformationResult;
195
+ transformTypeVariableGetterDeclaration?(declaration: ir.TypeVariableGetterDeclaration): TypeMemberDeclarationTransformationResult;
196
+ transformTypeVariableSetterDeclaration?(declaration: ir.TypeVariableSetterDeclaration): TypeMemberDeclarationTransformationResult;
197
+ transformNestedMethodDeclaration?(declaration: ir.NestedMethodDeclaration): NodeTransformationResult<ir.NestedMethodDeclaration>;
198
+ transformLocalVariableDeclaration?(declaration: ir.LocalVariableDeclaration): NodeTransformationResult<ir.LocalVariableDeclaration>;
199
+ transformValueParameterDeclaration?(declaration: ir.ValueParameterDeclaration): NodeTransformationResult<ir.ValueParameterDeclaration>;
200
+ transformCaseClause?(declaration: ir.CaseClause): NodeTransformationResult<ir.CaseClause>;
201
+ transformVariantDeclaration?(declaration: ir.VariantDeclaration): NodeTransformationResult<ir.VariantDeclaration>;
202
+ transformCallArguments?(declaration: ir.CallArguments): NodeTransformationResult<ir.CallArguments>;
203
+ transformOnErrorClause?(clause: ir.OnErrorClause): NodeTransformationResult<ir.OnErrorClause>;
204
+ transformFinallyClause?(clause: ir.FinallyClause): NodeTransformationResult<ir.FinallyClause>;
205
+ transformJsObjectLiteralProperty?(clause: ir.JsObjectLiteralProperty): NodeTransformationResult<ir.JsObjectLiteralProperty>;
209
206
  }
210
- export {};
207
+ export declare const enum TransformationContinuationAction {
208
+ Continue = 0,
209
+ DoNotTransformChildren = 1
210
+ }
211
+ export type ExpressionTransformationResult = {
212
+ kind: 'preserve';
213
+ action: TransformationContinuationAction;
214
+ } | {
215
+ kind: 'replace';
216
+ expression: ir.Expression;
217
+ hoistedLocalVariables?: readonly VariableEntity[];
218
+ };
219
+ export declare function preserveExpression(action?: TransformationContinuationAction): ExpressionTransformationResult;
220
+ export declare function replaceExpression(expression: ir.Expression, hoistedLocalVariables?: readonly VariableEntity[]): ExpressionTransformationResult;
221
+ export type TypeAccessExpressionTransformationResult = {
222
+ kind: 'preserve';
223
+ action: TransformationContinuationAction;
224
+ } | {
225
+ kind: 'replace';
226
+ expression: ir.TypeAccessExpression;
227
+ };
228
+ export declare function preserveTypeAccess(action?: TransformationContinuationAction): TypeAccessExpressionTransformationResult;
229
+ export declare function replaceTypeAccess(expression: ir.TypeAccessExpression): TypeAccessExpressionTransformationResult;
230
+ export type PackageMemberDeclarationTransformationResult = {
231
+ kind: 'preserve';
232
+ } | {
233
+ kind: 'replace';
234
+ declarations: readonly ir.PackageMemberDeclaration[];
235
+ } | {
236
+ kind: 'remove';
237
+ };
238
+ export declare function preservePackageMember(): PackageMemberDeclarationTransformationResult;
239
+ export declare function replacePackageMember(declarations: readonly ir.PackageMemberDeclaration[]): PackageMemberDeclarationTransformationResult;
240
+ export declare function removePackageMember(): PackageMemberDeclarationTransformationResult;
241
+ export type StatementTransformationResult = {
242
+ kind: 'preserve';
243
+ hoistedLocalVariables?: readonly VariableEntity[];
244
+ } | {
245
+ kind: 'replace';
246
+ statement: ir.Statement;
247
+ hoistedLocalVariables?: readonly VariableEntity[];
248
+ } | {
249
+ kind: 'remove';
250
+ hoistedLocalVariables: undefined;
251
+ };
252
+ export declare function preserveStatement(hoistedLocalVariables?: readonly VariableEntity[]): StatementTransformationResult;
253
+ export declare function replaceStatement(statement: ir.Statement, hoistedLocalVariables?: readonly VariableEntity[]): StatementTransformationResult;
254
+ export declare function removeStatement(): StatementTransformationResult;
255
+ export type TypeMemberDeclarationTransformationResult = {
256
+ kind: 'preserve';
257
+ } | {
258
+ kind: 'replace';
259
+ declarations: readonly ir.TypeMemberDeclaration[];
260
+ };
261
+ export declare function preserveTypeMember(): TypeMemberDeclarationTransformationResult;
262
+ export declare function replaceTypeMember(declarations: readonly ir.TypeMemberDeclaration[]): TypeMemberDeclarationTransformationResult;
263
+ export type NodeTransformationResult<T> = {
264
+ kind: 'preserve';
265
+ action: TransformationContinuationAction;
266
+ } | {
267
+ kind: 'replace';
268
+ node: T;
269
+ };
270
+ export declare function preserveNode<T>(action?: TransformationContinuationAction): NodeTransformationResult<T>;
271
+ export declare function replaceNode<T>(node: T): NodeTransformationResult<T>;
@@ -480,14 +480,6 @@ export declare class NoneLiteral {
480
480
  constructor(sourceLocation: SourceLocation | undefined);
481
481
  clone(): NoneLiteral;
482
482
  }
483
- export declare class NotExpression {
484
- expression: Expression;
485
- operator: AccessedMethod | undefined;
486
- sourceLocation: SourceLocation | undefined;
487
- readonly kind = NodeKind.NotExpression;
488
- constructor(expression: Expression, operator: AccessedMethod | undefined, sourceLocation: SourceLocation | undefined);
489
- clone(): NotExpression;
490
- }
491
483
  export declare class NumericLiteral {
492
484
  value: number;
493
485
  sourceLocation: SourceLocation | undefined;
@@ -986,7 +978,8 @@ export declare const enum AssignmentOperatorKind {
986
978
  export declare const enum PrefixUnaryExpressionOperatorKind {
987
979
  Plus = 0,
988
980
  Minus = 1,
989
- BitwiseNot = 2
981
+ Not = 2,
982
+ BitwiseNot = 3
990
983
  }
991
984
  export declare const enum BinaryExpressionOperatorKind {
992
985
  Add = 0,
@@ -998,8 +991,8 @@ export declare const enum BinaryExpressionOperatorKind {
998
991
  NotEquals = 6,
999
992
  LessThan = 7,
1000
993
  GreaterThan = 8,
1001
- LessThanEquals = 9,
1002
- GreaterThanEquals = 10,
994
+ LessThanOrEqual = 9,
995
+ GreaterThanOrEqual = 10,
1003
996
  Or = 11,
1004
997
  And = 12,
1005
998
  Xor = 13,
@@ -1,8 +1,8 @@
1
1
  import * as ir from './Nodes.js';
2
- export type Node = ir.ArrayLiteral | ir.AsExpression | ir.AssertionExpression | ir.AssumptionExpression | 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.NoneLiteral | ir.EmptyStatement | ir.ErrorStatement | ir.ExpressionStatement | ir.FinallyClause | ir.ForStatement | ir.PackageMethodDeclaration | ir.PackageTypeDeclaration | ir.PackageVariableDeclaration | ir.PackageVariableGetterDeclaration | ir.PackageVariableSetterDeclaration | ir.PackageVariantTypeDeclaration | ir.HelperMethodCallExpression | ir.IfStatement | ir.IndexedAccessExpression | ir.InlineJsExpression | ir.TypeMethodAccessExpression | ir.TypeVariableAccessExpression | ir.IntegerLiteral | ir.IsExpression | ir.JsIndexedAccessExpression | ir.NestedMethodDeclaration | ir.NestedMethodDeclarationStatement | ir.LocalVariableDeclaration | ir.LocalVariableDeclarationStatement | ir.NotExpression | ir.NumericLiteral | ir.OnErrorClause | ir.MethodAccessExpression | ir.MethodLiteral | ir.PrefixUnaryExpression | ir.MeasureLiteral | ir.ReferenceExpression | ir.LoopStatement | ir.Package | ir.ReturnStatement | ir.TextLiteral | ir.TextTemplateLiteral | ir.TypeConstructorDeclaration | ir.TypeDestructorDeclaration | ir.TypeIndexedGetterDeclaration | ir.TypeIndexedSetterDeclaration | ir.TypeMethodDeclaration | ir.TypeVariableDeclaration | ir.TypeVariableGetterDeclaration | ir.TypeVariableSetterDeclaration | ir.SwitchStatement | ir.TernaryExpression | ir.ThisExpression | ir.TryCatchFinallyStatement | ir.TypeAccessExpression | ir.ValueParameterDeclaration | ir.VariableAccessExpression | ir.VariantAccessExpression | ir.VariantDeclaration | ir.WhileStatement | ir.YieldStatement | ir.JsObjectLiteral | ir.JsObjectLiteralProperty | ir.JsPropertyAccessExpression | ir.JsFunctionLiteral | ir.JsTypeOfExpression | ir.JsInstanceOfExpression | ir.JsIdentifierExpression | ir.DereferenceExpression | ir.BaseExpression | ir.OwnConstructorCallExpression | ir.EsModuleImportDirectiveStatement | ir.CjsModuleImportDirectiveStatement | ir.JsNamespaceDestructuringStatement | ir.TypeDereferencedVariableGetterDeclaration | ir.TypeDereferencedVariableSetterDeclaration;
2
+ export type Node = ir.ArrayLiteral | ir.AsExpression | ir.AssertionExpression | ir.AssumptionExpression | 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.NoneLiteral | ir.EmptyStatement | ir.ErrorStatement | ir.ExpressionStatement | ir.FinallyClause | ir.ForStatement | ir.PackageMethodDeclaration | ir.PackageTypeDeclaration | ir.PackageVariableDeclaration | ir.PackageVariableGetterDeclaration | ir.PackageVariableSetterDeclaration | ir.PackageVariantTypeDeclaration | ir.HelperMethodCallExpression | ir.IfStatement | ir.IndexedAccessExpression | ir.InlineJsExpression | ir.TypeMethodAccessExpression | ir.TypeVariableAccessExpression | ir.IntegerLiteral | ir.IsExpression | ir.JsIndexedAccessExpression | ir.NestedMethodDeclaration | ir.NestedMethodDeclarationStatement | ir.LocalVariableDeclaration | ir.LocalVariableDeclarationStatement | ir.NumericLiteral | ir.OnErrorClause | ir.MethodAccessExpression | ir.MethodLiteral | ir.PrefixUnaryExpression | ir.MeasureLiteral | ir.ReferenceExpression | ir.LoopStatement | ir.Package | ir.ReturnStatement | ir.TextLiteral | ir.TextTemplateLiteral | ir.TypeConstructorDeclaration | ir.TypeDestructorDeclaration | ir.TypeIndexedGetterDeclaration | ir.TypeIndexedSetterDeclaration | ir.TypeMethodDeclaration | ir.TypeVariableDeclaration | ir.TypeVariableGetterDeclaration | ir.TypeVariableSetterDeclaration | ir.SwitchStatement | ir.TernaryExpression | ir.ThisExpression | ir.TryCatchFinallyStatement | ir.TypeAccessExpression | ir.ValueParameterDeclaration | ir.VariableAccessExpression | ir.VariantAccessExpression | ir.VariantDeclaration | ir.WhileStatement | ir.YieldStatement | ir.JsObjectLiteral | ir.JsObjectLiteralProperty | ir.JsPropertyAccessExpression | ir.JsFunctionLiteral | ir.JsTypeOfExpression | ir.JsInstanceOfExpression | ir.JsIdentifierExpression | ir.DereferenceExpression | ir.BaseExpression | ir.OwnConstructorCallExpression | ir.EsModuleImportDirectiveStatement | ir.CjsModuleImportDirectiveStatement | ir.JsNamespaceDestructuringStatement | ir.TypeDereferencedVariableGetterDeclaration | ir.TypeDereferencedVariableSetterDeclaration;
3
3
  export type Declaration = ir.PackageMethodDeclaration | ir.PackageTypeDeclaration | ir.PackageVariableDeclaration | ir.PackageVariableGetterDeclaration | ir.PackageVariableSetterDeclaration | ir.PackageVariantTypeDeclaration | ir.NestedMethodDeclaration | ir.LocalVariableDeclaration | ir.TypeConstructorDeclaration | ir.TypeDestructorDeclaration | ir.TypeIndexedGetterDeclaration | ir.TypeIndexedSetterDeclaration | ir.TypeMethodDeclaration | ir.TypeVariableDeclaration | ir.TypeVariableGetterDeclaration | ir.TypeVariableSetterDeclaration | ir.ValueParameterDeclaration | ir.VariantDeclaration | ir.TypeDereferencedVariableGetterDeclaration | ir.TypeDereferencedVariableSetterDeclaration;
4
4
  export type Statement = ir.AssignmentStatement | ir.BlockStatement | ir.BreakLoopStatement | ir.ContinueLoopStatement | ir.DisposeStatement | ir.RunStatement | ir.EmptyStatement | ir.ErrorStatement | ir.ExpressionStatement | ir.ForStatement | ir.IfStatement | ir.NestedMethodDeclarationStatement | ir.LocalVariableDeclarationStatement | ir.LoopStatement | ir.ReturnStatement | ir.SwitchStatement | ir.TryCatchFinallyStatement | ir.WhileStatement | ir.YieldStatement | ir.EsModuleImportDirectiveStatement | ir.CjsModuleImportDirectiveStatement | ir.JsNamespaceDestructuringStatement;
5
- export type Expression = ir.ArrayLiteral | ir.AsExpression | ir.AssertionExpression | ir.AssumptionExpression | ir.AssignmentExpression | ir.BinaryExpression | ir.BooleanLiteral | ir.CallExpression | ir.CharLiteral | ir.CommaExpression | ir.ConstructorCallExpression | ir.NoneLiteral | ir.HelperMethodCallExpression | ir.IndexedAccessExpression | ir.InlineJsExpression | ir.TypeMethodAccessExpression | ir.TypeVariableAccessExpression | ir.IntegerLiteral | ir.IsExpression | ir.NotExpression | ir.NumericLiteral | ir.MethodAccessExpression | ir.MethodLiteral | ir.PrefixUnaryExpression | ir.MeasureLiteral | ir.ReferenceExpression | ir.DereferenceExpression | ir.TextLiteral | ir.TextTemplateLiteral | ir.TernaryExpression | ir.ThisExpression | ir.TypeAccessExpression | ir.VariableAccessExpression | ir.VariantAccessExpression | ir.BaseConstructorCallExpression | ir.JsIndexedAccessExpression | ir.JsObjectLiteral | ir.JsPropertyAccessExpression | ir.JsFunctionLiteral | ir.JsTypeOfExpression | ir.JsInstanceOfExpression | ir.JsIdentifierExpression | ir.BaseExpression | ir.OwnConstructorCallExpression;
5
+ export type Expression = ir.ArrayLiteral | ir.AsExpression | ir.AssertionExpression | ir.AssumptionExpression | ir.AssignmentExpression | ir.BinaryExpression | ir.BooleanLiteral | ir.CallExpression | ir.CharLiteral | ir.CommaExpression | ir.ConstructorCallExpression | ir.NoneLiteral | ir.HelperMethodCallExpression | ir.IndexedAccessExpression | ir.InlineJsExpression | ir.TypeMethodAccessExpression | ir.TypeVariableAccessExpression | ir.IntegerLiteral | ir.IsExpression | ir.NumericLiteral | ir.MethodAccessExpression | ir.MethodLiteral | ir.PrefixUnaryExpression | ir.MeasureLiteral | ir.ReferenceExpression | ir.DereferenceExpression | ir.TextLiteral | ir.TextTemplateLiteral | ir.TernaryExpression | ir.ThisExpression | ir.TypeAccessExpression | ir.VariableAccessExpression | ir.VariantAccessExpression | ir.BaseConstructorCallExpression | ir.JsIndexedAccessExpression | ir.JsObjectLiteral | ir.JsPropertyAccessExpression | ir.JsFunctionLiteral | ir.JsTypeOfExpression | ir.JsInstanceOfExpression | ir.JsIdentifierExpression | ir.BaseExpression | ir.OwnConstructorCallExpression;
6
6
  export type TypeMemberDeclaration = ir.TypeVariableDeclaration | ir.TypeVariableGetterDeclaration | ir.TypeVariableSetterDeclaration | ir.TypeMethodDeclaration | ir.TypeConstructorDeclaration | ir.TypeDestructorDeclaration | ir.TypeIndexedGetterDeclaration | ir.TypeIndexedSetterDeclaration | ir.TypeDereferencedVariableGetterDeclaration | ir.TypeDereferencedVariableSetterDeclaration;
7
7
  export type PackageMemberDeclaration = ir.PackageMethodDeclaration | ir.PackageTypeDeclaration | ir.PackageVariableDeclaration | ir.PackageVariableGetterDeclaration | ir.PackageVariableSetterDeclaration | ir.PackageVariantTypeDeclaration;
8
8
  export type LValueExpression = ir.VariableAccessExpression | ir.TypeVariableAccessExpression | ir.IndexedAccessExpression | ir.JsIndexedAccessExpression | ir.JsPropertyAccessExpression | ir.ThisExpression | ir.DereferenceExpression;
@@ -1,2 +1,3 @@
1
1
  export declare function withoutQuotes(text: string): string;
2
+ export declare function withoutTextTemplateQuotes(text: string): string;
2
3
  export declare function unescapeText(text: string, normalizeCRLF?: boolean): string;
@@ -20,7 +20,6 @@ export declare class NodeSemanticInfoService {
20
20
  static ofIndexedAccessExpressionOperator(analyzer: Analyzer, node: tree.IndexedAccessExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
21
21
  static ofAssignmentStatementOperator(analyzer: Analyzer, node: tree.AssignmentStatement, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
22
22
  static ofBinaryExpressionOperator(analyzer: Analyzer, node: tree.BinaryExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
23
- static ofNotExpressionNotKeyword(analyzer: Analyzer, node: tree.NotExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
24
23
  static ofPrefixUnaryExpressionOperator(analyzer: Analyzer, node: tree.PrefixUnaryExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
25
24
  static ofDereferenceOperatorDeclaration(analyzer: Analyzer, node: tree.TypeDereferencedVariableGetterDeclaration | tree.TypeDereferencedVariableSetterDeclaration): NodeSemanticInfo | undefined;
26
25
  static ofDereferenceExpressionOperator(analyzer: Analyzer, node: tree.DereferenceExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
@@ -1,5 +1,5 @@
1
1
  import { Indicator, ObservableObject } from 'reactronic';
2
- import { Analyzer } from '../../analysis/index.js';
2
+ import { Analyzer, TsInteropInputs } from '../../analysis/index.js';
3
3
  import { CancellationToken, Uri } from '../../common/index.js';
4
4
  import { Diagnostic } from '../../diagnostic/Diagnostic.js';
5
5
  import { ConvertedConfiguration, ProgramPackageConfiguration, SourceFile, fsTree } from '../../project/index.js';
@@ -23,6 +23,7 @@ export declare class CompilationController extends ObservableObject {
23
23
  private _packageConfigurationsVersion;
24
24
  private _packageConfigurationsVersionDuringCompilationLoad;
25
25
  private _tsInteropInputs;
26
+ private _tsInteropInputsKey;
26
27
  private _tsProgramLoaderInputs;
27
28
  private _state;
28
29
  private _configurationsOfPackagesOutsideProject;
@@ -61,6 +62,7 @@ export interface CompilationControllerConfig {
61
62
  readonly showErrorMessage?: (message: string) => Promise<void>;
62
63
  readonly builtInStandardPackagesUri?: Uri;
63
64
  readonly additionalPackageContents?: readonly PackageContent[];
65
+ readonly tsInteropInputsCache?: TsInteropInputsCache;
64
66
  }
65
67
  export declare enum CompilationControllerState {
66
68
  Created = 0,
@@ -69,6 +71,13 @@ export declare enum CompilationControllerState {
69
71
  LoadedMainCompilation = 3,
70
72
  ErrorsCreatingAnalyzer = 4
71
73
  }
74
+ declare class TsProgramLoaderInputs {
75
+ readonly orderedStandardLibraryNames: readonly string[];
76
+ readonly orderedPackageNames: readonly string[];
77
+ readonly orderedModuleNames: readonly string[];
78
+ readonly tsProjectUri: Uri;
79
+ constructor(orderedStandardLibraryNames: readonly string[], orderedPackageNames: readonly string[], orderedModuleNames: readonly string[], tsProjectUri: Uri);
80
+ }
72
81
  export type DiagnosticsCollectedInBackgroundHandler = (sourceFile: SourceFile, trackedVersion: number | undefined, diagnostics: readonly Diagnostic[], compilationVersion: number, controller: CompilationController) => Promise<void>;
73
82
  export type RawPackageConfigurationsChangedHandler = (configurations: readonly ChangedPackageConfiguration[]) => Promise<void>;
74
83
  export declare class ChangedPackageConfiguration {
@@ -108,4 +117,17 @@ declare class ConfigurationController extends ObservableObject {
108
117
  protected updateJsonConfigurationFile(): void;
109
118
  protected processConfiguration(): Promise<void>;
110
119
  }
120
+ export declare class TsInteropInputsCache {
121
+ private readonly _inputsByKey;
122
+ getTsInteropInputs(tsProgramLoaderInputs: TsProgramLoaderInputs, librariesProvider: TypeScriptLibrariesProvider): {
123
+ inputs: TsInteropInputs;
124
+ key: string;
125
+ } | undefined;
126
+ getOrAddTsInteropInputs(tsProgramLoaderInputs: TsProgramLoaderInputs, librariesProvider: TypeScriptLibrariesProvider, inputs: TsInteropInputs): {
127
+ inputs: TsInteropInputs;
128
+ key: string;
129
+ };
130
+ removeTsInteropInputs(key: string): void;
131
+ private createKey;
132
+ }
111
133
  export {};
@@ -16,6 +16,7 @@ export declare class Workspace extends ObservableObject {
16
16
  private _atLeastOneFileOfCompilationHasBeenOpened;
17
17
  private readonly _files;
18
18
  private _standardPackageContents;
19
+ private readonly _tsInteropInputsCache;
19
20
  get compilationControllers(): readonly CompilationController[];
20
21
  get trackedSourceFiles(): ReadonlyClientTrackedSourceFiles;
21
22
  get loadedWorkspaceFolderByUri(): ObservableMap<string, fsTree.Directory>;