@artel/artc 0.6.25253 → 0.6.25255
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 -6
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +568 -365
- package/build/{chunk-6WZERC3X.js → chunk-R2AFVF7W.js} +2 -2
- package/build/{chunk-NEFP5U65.js → chunk-SSG7MY2R.js} +1 -1
- package/build/{chunk-3VAVX3J5.js → chunk-Y23FSWAN.js} +13016 -14906
- package/build/types/analysis/AccessedFunction.d.ts +11 -5
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +2 -1
- package/build/types/analysis/Analyzer.d.ts +116 -40
- package/build/types/analysis/ArgumentToParameterMatchResult.d.ts +1 -4
- package/build/types/analysis/ArgumentsToParametersMatcher.d.ts +9 -15
- package/build/types/analysis/AutotypeCallExpressionMeaning.d.ts +12 -6
- package/build/types/analysis/BaseExpressionMeaning.d.ts +43 -15
- package/build/types/analysis/CallExpressionMeaning.d.ts +41 -22
- package/build/types/analysis/ConstructorCallResolver.d.ts +22 -0
- package/build/types/analysis/DiagnosticCollector.d.ts +5 -9
- package/build/types/analysis/FunctionAccessResolver.d.ts +15 -0
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +56 -22
- package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +3 -2
- package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +76 -27
- package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +0 -1
- package/build/types/analysis/NodeTypeUtils.d.ts +1 -0
- package/build/types/analysis/ObjectExpressionMeaning.d.ts +1 -0
- package/build/types/analysis/OperatorAccessResolver.d.ts +9 -0
- package/build/types/analysis/OverloadResolver.d.ts +91 -5
- package/build/types/analysis/ReturnTypeInferrer.d.ts +13 -0
- package/build/types/analysis/SubstitutedFunction.d.ts +10 -4
- package/build/types/analysis/TagMeaning.d.ts +16 -15
- package/build/types/analysis/TypeArgumentInferrer.d.ts +49 -0
- package/build/types/analysis/TypeNarrower.d.ts +6 -4
- package/build/types/analysis/TypeOverloadResolver.d.ts +4 -2
- package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +2 -6
- package/build/types/analysis/UserDefinableUnaryOperatorResolver.d.ts +2 -2
- package/build/types/analysis/Utils.d.ts +2 -0
- package/build/types/analysis/index.d.ts +0 -2
- package/build/types/analysis/semantic-context/Declarations.d.ts +4 -4
- package/build/types/analysis/semantic-context/SemanticContextBuilder.d.ts +1 -0
- package/build/types/api/Api.d.ts +0 -2
- package/build/types/common/ArrayUtils.d.ts +3 -2
- package/build/types/common/Cached.d.ts +2 -0
- package/build/types/common/Query.d.ts +1 -1
- package/build/types/common/TreeQuery.d.ts +1 -2
- package/build/types/diagnostic/Diagnostic.d.ts +7 -0
- package/build/types/diagnostic/DiagnosticCode.d.ts +180 -173
- package/build/types/entities/AliasTypeEntity.d.ts +1 -0
- package/build/types/entities/AliasedType.d.ts +2 -2
- package/build/types/entities/FunctionEntity.d.ts +6 -3
- package/build/types/entities/FunctionTypeEntity.d.ts +2 -1
- package/build/types/entities/PackageAliasEntity.d.ts +2 -2
- package/build/types/entities/StructuredTypeEntity.d.ts +1 -0
- package/build/types/entities/TypeParameterEntity.d.ts +1 -0
- package/build/types/entities/VariableEntity.d.ts +23 -11
- package/build/types/entities/VariantTypeEntity.d.ts +1 -0
- package/build/types/entities/index.d.ts +2 -1
- package/build/types/parser/CharacterCodes.d.ts +0 -8
- package/build/types/parser/Parser.d.ts +2 -2
- package/build/types/parser/TriviaInterner.d.ts +8 -0
- package/build/types/services/AddPropertyAssignmentService.d.ts +0 -7
- package/build/types/services/NodeSemanticInfo.d.ts +3 -1
- package/build/types/services/TreeUtils.d.ts +1 -1
- package/build/types/services/signature-help/SignatureWithValueParameters.d.ts +9 -1
- package/build/types/services/signature-help/TypeParameterSignatureHelpProvider.d.ts +1 -1
- package/build/types/services/source-generation/EntityToSyntax.d.ts +1 -1
- package/build/types/tree/BaseNode.d.ts +26 -0
- package/build/types/tree/{green/Nodes.d.ts → Nodes.d.ts} +408 -356
- package/build/types/tree/{green/SyntaxToCode.d.ts → SyntaxToCode.d.ts} +1 -1
- package/build/types/tree/{green/Token.d.ts → Token.d.ts} +26 -10
- package/build/types/tree/{red/Utils.d.ts → Utils.d.ts} +4 -3
- package/build/types/tree/index.d.ts +10 -1
- package/build/types/ts-interop/Entities.d.ts +14 -0
- package/build/types/types/AliasType.d.ts +2 -2
- package/build/types/types/FunctionType.d.ts +2 -2
- package/build/types/types/IntersectionType.d.ts +2 -2
- package/build/types/types/ParameterType.d.ts +2 -2
- package/build/types/types/StructuredType.d.ts +2 -2
- package/build/types/types/Substitutions.d.ts +2 -2
- package/build/types/types/Type.d.ts +3 -3
- package/build/types/types/TypeMembers.d.ts +1 -0
- package/build/types/types/UnionType.d.ts +2 -2
- package/build/types/types/UnresolvedType.d.ts +2 -2
- package/build/types/types/VariantType.d.ts +2 -2
- package/package.json +1 -1
- package/build/types/analysis/ConstructorOverloadResolver.d.ts +0 -31
- package/build/types/analysis/FunctionOverloadResolver.d.ts +0 -21
- package/build/types/analysis/TargetTypeHint.d.ts +0 -5
- package/build/types/tree/green/BaseNode.d.ts +0 -14
- package/build/types/tree/green/Utils.d.ts +0 -2
- package/build/types/tree/green/index.d.ts +0 -8
- package/build/types/tree/red/BaseNode.d.ts +0 -16
- package/build/types/tree/red/Internal.d.ts +0 -2
- package/build/types/tree/red/Nodes.d.ts +0 -2271
- package/build/types/tree/red/Token.d.ts +0 -30
- package/build/types/tree/red/index.d.ts +0 -10
- /package/build/types/tree/{red/NodePath.d.ts → NodePath.d.ts} +0 -0
- /package/build/types/tree/{green/SyntaxFactory.d.ts → SyntaxFactory.d.ts} +0 -0
|
@@ -5,8 +5,8 @@ import { Analyzer } from '../analysis/index.js';
|
|
|
5
5
|
import { Lazy, Name } from '../common/index.js';
|
|
6
6
|
import * as tree from '../tree/index.js';
|
|
7
7
|
import * as types from '../types/index.js';
|
|
8
|
-
import type {
|
|
9
|
-
import {
|
|
8
|
+
import type { IndexerEntity, PackageEntity } from './index.js';
|
|
9
|
+
import { ConstructorEntity, DefinitionKind, DestructorEntity, EntityHidingLevel, EntityKind, FunctionEntity, FunctionTypeEntity, GetterEntity, OperatorEntity, SetterEntity, TypeMemberEntityContainer } from './index.js';
|
|
10
10
|
export type VariableEntity = PackageVariableEntity | FieldEntity | ParameterVariableEntity | TextTemplateParameterVariableEntity | LocalVariableEntity;
|
|
11
11
|
export interface PackageVariableEntity extends IVariableEntity {
|
|
12
12
|
readonly subkind: 'package';
|
|
@@ -43,7 +43,7 @@ export interface TextTemplateParameterVariableEntity extends IVariableEntity {
|
|
|
43
43
|
export interface LocalVariableEntity extends IVariableEntity {
|
|
44
44
|
readonly subkind: 'local';
|
|
45
45
|
getLocalVariableKind(): LocalVariableKind;
|
|
46
|
-
|
|
46
|
+
getContainingPackage(): PackageEntity;
|
|
47
47
|
getLocalization(): Localization;
|
|
48
48
|
getOriginalEntity(): LocalVariableEntity;
|
|
49
49
|
}
|
|
@@ -73,9 +73,9 @@ export declare namespace ParameterVariableEntityContainer {
|
|
|
73
73
|
constructor(entity: EntityContainingValueParameter);
|
|
74
74
|
}
|
|
75
75
|
class FunctionLiteral {
|
|
76
|
-
readonly
|
|
76
|
+
readonly containingPackage: PackageEntity;
|
|
77
77
|
readonly kind = "function-literal";
|
|
78
|
-
constructor(
|
|
78
|
+
constructor(containingPackage: PackageEntity);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
export type EntityContainingValueParameter = FunctionEntity | IndexerEntity | ConstructorEntity | DestructorEntity | FunctionTypeEntity | OperatorEntity;
|
|
@@ -128,6 +128,7 @@ export declare class PackageVariableDeclarationEntity implements PackageVariable
|
|
|
128
128
|
private readonly _node;
|
|
129
129
|
readonly kind = EntityKind.Variable;
|
|
130
130
|
readonly subkind = "package";
|
|
131
|
+
private readonly _name;
|
|
131
132
|
private readonly _typeInferrer;
|
|
132
133
|
private _modifierFlags;
|
|
133
134
|
private _hasReportedAllDiagnostics;
|
|
@@ -154,6 +155,7 @@ export declare class ComputedPackageVariableDeclarationEntity implements Package
|
|
|
154
155
|
private readonly _getterDeclaration;
|
|
155
156
|
private readonly _setterDeclaration;
|
|
156
157
|
private readonly _getterOrSetterDeclaration;
|
|
158
|
+
private readonly _name;
|
|
157
159
|
private _modifierFlags;
|
|
158
160
|
private _hasReportedAllDiagnostics;
|
|
159
161
|
private get modifierFlags();
|
|
@@ -177,6 +179,7 @@ export declare class FieldDeclarationEntity implements FieldEntity {
|
|
|
177
179
|
readonly subkind = "field";
|
|
178
180
|
private readonly _analyzer;
|
|
179
181
|
private readonly _node;
|
|
182
|
+
private readonly _name;
|
|
180
183
|
private readonly _typeInferrer;
|
|
181
184
|
private _modifierFlags;
|
|
182
185
|
private _hasReportedAllDiagnostics;
|
|
@@ -209,6 +212,7 @@ export declare class ComputedFieldDeclarationEntity implements FieldEntity {
|
|
|
209
212
|
private readonly _getterDeclaration;
|
|
210
213
|
private readonly _setterDeclaration;
|
|
211
214
|
private readonly _getterOrSetterDeclaration;
|
|
215
|
+
private readonly _name;
|
|
212
216
|
private _modifierFlags;
|
|
213
217
|
private _hasReportedAllDiagnostics;
|
|
214
218
|
private get modifierFlags();
|
|
@@ -239,6 +243,7 @@ export declare class VariantDeclarationEntity implements FieldEntity {
|
|
|
239
243
|
private readonly _analyzer;
|
|
240
244
|
private readonly _node;
|
|
241
245
|
private readonly _variantTypeDeclaration;
|
|
246
|
+
private readonly _name;
|
|
242
247
|
private readonly _type;
|
|
243
248
|
constructor(analyzer: Analyzer, node: tree.VariantDeclaration);
|
|
244
249
|
getName(): Name;
|
|
@@ -265,6 +270,7 @@ export declare class LocalVariableDeclarationEntity implements LocalVariableEnti
|
|
|
265
270
|
private readonly _node;
|
|
266
271
|
readonly kind = EntityKind.Variable;
|
|
267
272
|
readonly subkind = "local";
|
|
273
|
+
private readonly _name;
|
|
268
274
|
private readonly _typeInferrer;
|
|
269
275
|
private _hasReportedAllDiagnostics;
|
|
270
276
|
constructor(_analyzer: Analyzer, _node: tree.LocalVariableDeclaration);
|
|
@@ -278,7 +284,7 @@ export declare class LocalVariableDeclarationEntity implements LocalVariableEnti
|
|
|
278
284
|
isSpecial(): SpecialVariableEntityInfo | undefined;
|
|
279
285
|
getTags(): readonly Tag[];
|
|
280
286
|
getLocalVariableKind(): LocalVariableKind;
|
|
281
|
-
|
|
287
|
+
getContainingPackage(): PackageEntity;
|
|
282
288
|
getLocalization(): Localization;
|
|
283
289
|
getOriginalEntity(): LocalVariableEntity;
|
|
284
290
|
ensureAllDiagnosticsReported(): void;
|
|
@@ -288,6 +294,7 @@ export declare class EnumerationVariableDeclarationEntity implements LocalVariab
|
|
|
288
294
|
private readonly _node;
|
|
289
295
|
readonly kind = EntityKind.Variable;
|
|
290
296
|
readonly subkind = "local";
|
|
297
|
+
private readonly _name;
|
|
291
298
|
private readonly _typeInferrer;
|
|
292
299
|
private _hasReportedAllDiagnostics;
|
|
293
300
|
constructor(_analyzer: Analyzer, _node: tree.EnumerationVariableDeclaration);
|
|
@@ -301,7 +308,7 @@ export declare class EnumerationVariableDeclarationEntity implements LocalVariab
|
|
|
301
308
|
isSpecial(): SpecialVariableEntityInfo | undefined;
|
|
302
309
|
getTags(): readonly Tag[];
|
|
303
310
|
getLocalVariableKind(): LocalVariableKind;
|
|
304
|
-
|
|
311
|
+
getContainingPackage(): PackageEntity;
|
|
305
312
|
getLocalization(): Localization;
|
|
306
313
|
getOriginalEntity(): LocalVariableEntity;
|
|
307
314
|
ensureAllDiagnosticsReported(): void;
|
|
@@ -311,6 +318,7 @@ export declare class ErrorVariableDeclarationEntity implements LocalVariableEnti
|
|
|
311
318
|
private readonly _node;
|
|
312
319
|
readonly kind = EntityKind.Variable;
|
|
313
320
|
readonly subkind = "local";
|
|
321
|
+
private readonly _name;
|
|
314
322
|
private readonly _type;
|
|
315
323
|
constructor(_analyzer: Analyzer, _node: tree.ErrorVariableDeclaration);
|
|
316
324
|
getName(): Name;
|
|
@@ -323,7 +331,7 @@ export declare class ErrorVariableDeclarationEntity implements LocalVariableEnti
|
|
|
323
331
|
isSpecial(): SpecialVariableEntityInfo | undefined;
|
|
324
332
|
getTags(): readonly Tag[];
|
|
325
333
|
getLocalVariableKind(): LocalVariableKind;
|
|
326
|
-
|
|
334
|
+
getContainingPackage(): PackageEntity;
|
|
327
335
|
getLocalization(): Localization;
|
|
328
336
|
getOriginalEntity(): LocalVariableEntity;
|
|
329
337
|
}
|
|
@@ -332,6 +340,7 @@ export declare class ParameterDeclarationEntity implements ParameterVariableEnti
|
|
|
332
340
|
private readonly _node;
|
|
333
341
|
readonly kind = EntityKind.Variable;
|
|
334
342
|
readonly subkind = "parameter";
|
|
343
|
+
private readonly _name;
|
|
335
344
|
private readonly _typeInferrer;
|
|
336
345
|
private _hasReportedAllDiagnostics;
|
|
337
346
|
constructor(_analyzer: Analyzer, _node: tree.ParameterDeclaration);
|
|
@@ -359,6 +368,7 @@ export declare class IndexParameterDeclarationEntity implements ParameterVariabl
|
|
|
359
368
|
readonly kind = EntityKind.Variable;
|
|
360
369
|
readonly subkind = "parameter";
|
|
361
370
|
private readonly _getterOrSetterParameterDeclaration;
|
|
371
|
+
private readonly _name;
|
|
362
372
|
private readonly _typeInferrer;
|
|
363
373
|
private _hasReportedAllDiagnostics;
|
|
364
374
|
constructor(_analyzer: Analyzer, _getterParameterDeclaration: tree.ParameterDeclaration | undefined, _setterParameterDeclaration: tree.ParameterDeclaration | undefined, _indexerEntity: IndexerEntity);
|
|
@@ -385,6 +395,7 @@ export declare class FunctionLiteralParameterDeclarationEntity implements Parame
|
|
|
385
395
|
readonly kind = EntityKind.Variable;
|
|
386
396
|
readonly subkind = "parameter";
|
|
387
397
|
private readonly _parameterIndex;
|
|
398
|
+
private readonly _name;
|
|
388
399
|
constructor(_analyzer: Analyzer, _node: tree.ParameterDeclaration, _functionLiteral: tree.FunctionLiteral);
|
|
389
400
|
getName(): Name;
|
|
390
401
|
getType(): types.Type;
|
|
@@ -489,11 +500,11 @@ export declare class IntrinsicLocalVariableEntity implements LocalVariableEntity
|
|
|
489
500
|
private readonly _name;
|
|
490
501
|
private readonly _type;
|
|
491
502
|
private readonly _isConstant;
|
|
492
|
-
private readonly
|
|
503
|
+
private readonly _containingPackage;
|
|
493
504
|
private readonly _isSpecial;
|
|
494
505
|
readonly kind = EntityKind.Variable;
|
|
495
506
|
readonly subkind = "local";
|
|
496
|
-
constructor(_name: Name, _type: types.Type, _isConstant: boolean,
|
|
507
|
+
constructor(_name: Name, _type: types.Type, _isConstant: boolean, _containingPackage: PackageEntity, _isSpecial: SpecialVariableEntityInfo | undefined);
|
|
497
508
|
getName(): Name;
|
|
498
509
|
getType(): types.Type;
|
|
499
510
|
getDefinition(): VariableEntityDefinition;
|
|
@@ -504,7 +515,7 @@ export declare class IntrinsicLocalVariableEntity implements LocalVariableEntity
|
|
|
504
515
|
isSpecial(): SpecialVariableEntityInfo | undefined;
|
|
505
516
|
getTags(): readonly Tag[];
|
|
506
517
|
getLocalVariableKind(): LocalVariableKind;
|
|
507
|
-
|
|
518
|
+
getContainingPackage(): PackageEntity;
|
|
508
519
|
getLocalization(): Localization;
|
|
509
520
|
getOriginalEntity(): LocalVariableEntity;
|
|
510
521
|
}
|
|
@@ -513,6 +524,7 @@ export declare class TranslationTextTemplateParameterEntity implements TextTempl
|
|
|
513
524
|
private readonly _node;
|
|
514
525
|
readonly kind = EntityKind.Variable;
|
|
515
526
|
readonly subkind = "text-template-parameter";
|
|
527
|
+
private readonly _name;
|
|
516
528
|
constructor(_analyzer: Analyzer, _node: tree.TranslationTextTemplateParameter);
|
|
517
529
|
getName(): Name;
|
|
518
530
|
getContainer(): PackageEntity;
|
|
@@ -50,6 +50,7 @@ export declare class PackageVariantTypeDeclarationEntity implements PackageVaria
|
|
|
50
50
|
readonly kind = EntityKind.Type;
|
|
51
51
|
readonly typeEntityKind = TypeEntityKind.Variant;
|
|
52
52
|
readonly subkind = "package";
|
|
53
|
+
private readonly _name;
|
|
53
54
|
private readonly _typeParameters;
|
|
54
55
|
private readonly _members;
|
|
55
56
|
private readonly _underlyingType;
|
|
@@ -7,7 +7,7 @@ import { ConstructorEntity } from './ConstructorEntity.js';
|
|
|
7
7
|
import { DereferenceOperatorEntity } from './DereferenceOperatorEntity.js';
|
|
8
8
|
import { DestructorEntity } from './DestructorEntity.js';
|
|
9
9
|
import { IEntityHidingMatcher } from './EntityHiding.js';
|
|
10
|
-
import { FunctionEntity, MethodEntity, PackageFunctionEntity } from './FunctionEntity.js';
|
|
10
|
+
import { FunctionEntity, MethodEntity, NestedFunctionEntity, PackageFunctionEntity } from './FunctionEntity.js';
|
|
11
11
|
import { FunctionTypeEntity, PackageFunctionTypeEntity } from './FunctionTypeEntity.js';
|
|
12
12
|
import { GetterEntity } from './GetterEntity.js';
|
|
13
13
|
import { IndexerEntity } from './IndexerEntity.js';
|
|
@@ -111,6 +111,7 @@ export declare namespace TypeMemberEntity {
|
|
|
111
111
|
}
|
|
112
112
|
export type NamedTypeMemberEntity = FieldEntity | MethodEntity;
|
|
113
113
|
export type NamedEntity = VariableEntity | PackageVariantTypeEntity | FunctionEntity | TypeParameterEntity | PackageFunctionTypeEntity | PackageStructuredTypeEntity | PackageAliasEntity | AliasTypeEntity;
|
|
114
|
+
export type PackageOrNestedFunctionEntity = PackageFunctionEntity | NestedFunctionEntity;
|
|
114
115
|
export declare class EntityContext {
|
|
115
116
|
readonly containingPackage: PackageEntity;
|
|
116
117
|
readonly hidingMatcher: IEntityHidingMatcher;
|
|
@@ -13,17 +13,9 @@ export declare const enum CharacterCodes {
|
|
|
13
13
|
Ё = 1025,
|
|
14
14
|
ё = 1105,
|
|
15
15
|
А = 1040,
|
|
16
|
-
Б = 1041,
|
|
17
|
-
Д = 1044,
|
|
18
16
|
Е = 1045,
|
|
19
|
-
Ф = 1060,
|
|
20
|
-
Ц = 1062,
|
|
21
17
|
Я = 1071,
|
|
22
18
|
а = 1072,
|
|
23
|
-
б = 1073,
|
|
24
|
-
д = 1076,
|
|
25
19
|
е = 1077,
|
|
26
|
-
ф = 1092,
|
|
27
|
-
ц = 1094,
|
|
28
20
|
я = 1103
|
|
29
21
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PackageDialect, PackageLocale } from '../common/index.js';
|
|
2
|
-
import * as tree from '../tree/
|
|
2
|
+
import * as tree from '../tree/index.js';
|
|
3
3
|
export declare class Parser {
|
|
4
|
-
private readonly
|
|
4
|
+
private readonly parser_;
|
|
5
5
|
constructor(text: string, locale?: PackageLocale, dialect?: PackageDialect);
|
|
6
6
|
parse(): tree.SourceFile;
|
|
7
7
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Trivia } from '../tree/index.js';
|
|
2
|
+
export declare class TriviaInterner {
|
|
3
|
+
private readonly triviaCache_;
|
|
4
|
+
private readonly triviaArrayCache_;
|
|
5
|
+
private readonly emptyTriviaArray_;
|
|
6
|
+
internTrivia(trivia: Trivia): Trivia;
|
|
7
|
+
internTriviaArray(trivia: readonly Trivia[] | undefined): readonly Trivia[];
|
|
8
|
+
}
|
|
@@ -3,13 +3,6 @@ import * as tree from '../tree/index.js';
|
|
|
3
3
|
import { SourceFileEdit } from './Types.js';
|
|
4
4
|
export declare class AddPropertyAssignmentService {
|
|
5
5
|
createEditWithAssignment(sourceFile: SourceFile, assignmentNode: tree.AssignmentStatement, value: string, propertyName: string | undefined): SourceFileEdit | undefined;
|
|
6
|
-
/**
|
|
7
|
-
* Метод определяет, где нужно расположить присваивание нового значение: сразу после присваивания предыдущего
|
|
8
|
-
* значения, или в конце подпрограммы.
|
|
9
|
-
* Если предыдущее присваивание не вложено ни в какие конструкции ветвления, присваивание нового значение можно
|
|
10
|
-
* расположить сразу после. Иначе присваивание необходимо расположить в конце подпрограммы (после всех ветвлений).
|
|
11
|
-
*/
|
|
12
|
-
private ifShouldBeAssignedAtTheEndOfSubprogramThenBody;
|
|
13
6
|
private getContainingSubprogram;
|
|
14
7
|
private detectNewLine;
|
|
15
8
|
}
|
|
@@ -30,10 +30,12 @@ export declare class NodeSemanticInfoService {
|
|
|
30
30
|
static ofObjectExpression(analyzer: Analyzer, node: tree.ObjectExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
|
|
31
31
|
static ofBaseExpression(analyzer: Analyzer, node: tree.BaseExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
|
|
32
32
|
private static ofPackageNameSegmentAccess;
|
|
33
|
-
private static
|
|
33
|
+
private static ofConstructorCallWithTypeAccess;
|
|
34
34
|
private static getBetterReferenceTargetsOrPreserve;
|
|
35
35
|
private static getBetterReferenceTarget;
|
|
36
36
|
private static getContainingTranslationPackage;
|
|
37
|
+
private static ofAccessedFunctions;
|
|
38
|
+
private static ofConstructors;
|
|
37
39
|
}
|
|
38
40
|
export type NodeSemanticInfoServiceOptions = {
|
|
39
41
|
readonly preferredTargetOfExplicitConstructorCall: 'type-declaration' | 'constructor-declaration';
|
|
@@ -54,5 +54,5 @@ interface ITokenOrKeywordsTouchingOffset {
|
|
|
54
54
|
/**
|
|
55
55
|
* Возвращает trivia, для которого `offset >= range.start` и `offset < range.end`.
|
|
56
56
|
*/
|
|
57
|
-
export declare function getTriviaAtOffset(sourceFile: tree.SourceFile, offset: number): tree.
|
|
57
|
+
export declare function getTriviaAtOffset(sourceFile: tree.SourceFile, offset: number): tree.TokenTrivia | undefined;
|
|
58
58
|
export {};
|
|
@@ -17,6 +17,7 @@ export declare class SignatureForNode {
|
|
|
17
17
|
static getSignaturesForAutotypeCallExpression(analyzer: Analyzer, node: tree.AutotypeCallExpression): SignaturesWithSingleSuitable | undefined;
|
|
18
18
|
static getSignaturesForIndexedAccessExpression(analyzer: Analyzer, node: tree.IndexedAccessExpression): SignaturesWithSingleSuitable | undefined;
|
|
19
19
|
static getSignaturesForTag(analyzer: Analyzer, node: tree.Tag): SignaturesWithSingleSuitable | undefined;
|
|
20
|
+
private static getSignaturesOfConstructors;
|
|
20
21
|
}
|
|
21
22
|
export declare class SimplifiedArgumentToParameterMatcher {
|
|
22
23
|
static match(analyzer: Analyzer, arguments_: readonly ValueArgument[], signature: Signature): SimplifiedArgumentToParameterMatchResult;
|
|
@@ -48,7 +49,7 @@ export declare class MatchedSignature {
|
|
|
48
49
|
readonly matchResult: SimplifiedArgumentToParameterMatchResult;
|
|
49
50
|
constructor(value: Signature, matchResult: SimplifiedArgumentToParameterMatchResult);
|
|
50
51
|
}
|
|
51
|
-
export type Signature = AccessedFunctionSignature | FunctionTypeSignature | ConstructorSignature | IndexerSignature;
|
|
52
|
+
export type Signature = AccessedFunctionSignature | OperatorSignature | FunctionTypeSignature | ConstructorSignature | IndexerSignature;
|
|
52
53
|
export declare class AccessedFunctionSignature implements ISignature {
|
|
53
54
|
readonly kind = "accessed-function";
|
|
54
55
|
readonly func: AccessedFunction;
|
|
@@ -56,6 +57,13 @@ export declare class AccessedFunctionSignature implements ISignature {
|
|
|
56
57
|
constructor(func: AccessedFunction);
|
|
57
58
|
getValueParameters(): readonly ValueParameter[];
|
|
58
59
|
}
|
|
60
|
+
export declare class OperatorSignature implements ISignature {
|
|
61
|
+
readonly kind = "operator";
|
|
62
|
+
readonly operator: types.Operator;
|
|
63
|
+
private readonly _valueParameters;
|
|
64
|
+
constructor(operator: types.Operator);
|
|
65
|
+
getValueParameters(): readonly ValueParameter[];
|
|
66
|
+
}
|
|
59
67
|
export declare class FunctionTypeSignature implements ISignature {
|
|
60
68
|
readonly kind = "function-type";
|
|
61
69
|
readonly functionType: types.FunctionType;
|
|
@@ -16,6 +16,6 @@ export declare class TypeParameterSignatureHelpProvider {
|
|
|
16
16
|
private getSignaturesForNamedTypeSpecifier;
|
|
17
17
|
private getSignaturesForTag;
|
|
18
18
|
private getSignaturesForGenericSpecializationExpression;
|
|
19
|
-
private
|
|
19
|
+
private getSignatureForAccessedFunction;
|
|
20
20
|
private getSignatureForNamedType;
|
|
21
21
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Analyzer } from '../../analysis/Analyzer.js';
|
|
2
2
|
import { PackageEntity } from '../../entities/PackageEntity.js';
|
|
3
|
-
import * as tree from '../../tree/
|
|
3
|
+
import * as tree from '../../tree/index.js';
|
|
4
4
|
export declare class EntityToSyntax {
|
|
5
5
|
private readonly _analyzer;
|
|
6
6
|
private readonly _entity;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Range } from '../common/index.js';
|
|
2
|
+
import { Node } from './Nodes.js';
|
|
3
|
+
import { Token } from './Token.js';
|
|
4
|
+
export declare abstract class BaseNode {
|
|
5
|
+
abstract readonly children: readonly (Node | undefined)[];
|
|
6
|
+
protected parent_: BaseNode | undefined;
|
|
7
|
+
protected rangeWithTrivia_: Range | undefined;
|
|
8
|
+
protected rangeWithoutTrivia_: Range | undefined;
|
|
9
|
+
protected abstract thisAsNode: Node;
|
|
10
|
+
constructor(rangeWithTrivia?: Range);
|
|
11
|
+
get parent(): Node | undefined;
|
|
12
|
+
get rangeWithTrivia(): Range;
|
|
13
|
+
get rangeWithoutTrivia(): Range;
|
|
14
|
+
get debuggerDisplay(): string;
|
|
15
|
+
/**
|
|
16
|
+
* Информация для оценки размера дерева при отладке.
|
|
17
|
+
*/
|
|
18
|
+
get descendantCount(): number;
|
|
19
|
+
findLeftmostToken(): Token | undefined;
|
|
20
|
+
findRightmostToken(): Token | undefined;
|
|
21
|
+
protected setParentForChildren(): void;
|
|
22
|
+
protected getLengthWithTrivia(): number;
|
|
23
|
+
protected getStartWithTrivia(): number;
|
|
24
|
+
private countDescendants;
|
|
25
|
+
}
|
|
26
|
+
export declare function toSourceCode(node: Node, lengthLimit?: number, excludeTrivia?: boolean): string;
|