@artel/artc 0.6.25223 → 0.6.25225
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 +85 -79
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +797 -674
- package/build/{chunk-DZNNWICP.js → chunk-TFTCV5R5.js} +6604 -5875
- package/build/{chunk-AX3LQ2CF.js → chunk-UB6LHKS5.js} +3 -3
- package/build/{chunk-LG4Z4SWO.js → chunk-Z6TZA6SN.js} +3 -3
- package/build/types/analysis/AccessedFunction.d.ts +53 -0
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +16 -15
- package/build/types/analysis/Analyzer.d.ts +142 -127
- package/build/types/analysis/CallExpressionMeaning.d.ts +10 -10
- package/build/types/analysis/DiagnosticCollector.d.ts +17 -17
- package/build/types/analysis/EntityLocalizationHelper.d.ts +6 -6
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +10 -10
- package/build/types/analysis/ImportedPackageNameTree.d.ts +1 -0
- package/build/types/analysis/LocalizationContext.d.ts +2 -2
- package/build/types/analysis/{PropertyAccessExpressionMeaning.d.ts → MemberAccessExpressionMeaning.d.ts} +27 -21
- package/build/types/analysis/NamedTypeResolver.d.ts +5 -1
- package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +4 -1
- package/build/types/analysis/NodeTypeUtils.d.ts +13 -13
- package/build/types/analysis/OperationOverloadResolver.d.ts +1 -1
- package/build/types/analysis/Scope.d.ts +15 -15
- package/build/types/analysis/SemanticContext.d.ts +29 -29
- package/build/types/analysis/SemanticContextBuilder.d.ts +22 -22
- package/build/types/analysis/SourceFileMembers.d.ts +2 -2
- package/build/types/analysis/StatementBlockScopeBuilder.d.ts +12 -12
- package/build/types/analysis/{SubstitutedMethod.d.ts → SubstitutedFunction.d.ts} +14 -14
- package/build/types/analysis/TagMeaning.d.ts +23 -20
- package/build/types/analysis/Tags.d.ts +6 -6
- package/build/types/analysis/TypeNarrower.d.ts +21 -21
- package/build/types/analysis/Utils.d.ts +15 -3
- package/build/types/analysis/WellKnownDeclarations.d.ts +4 -4
- package/build/types/analysis/control-flow/GraphBuilder.d.ts +43 -0
- package/build/types/analysis/{ControlFlowGraphVisualizer.d.ts → control-flow/GraphVisualizer.d.ts} +3 -3
- package/build/types/analysis/control-flow/NarrowableExpression.d.ts +5 -0
- package/build/types/analysis/control-flow/Nodes.d.ts +91 -0
- package/build/types/analysis/control-flow/index.d.ts +4 -0
- package/build/types/api/Api.d.ts +3 -3
- package/build/types/common/HelperPhrases.d.ts +3 -2
- package/build/types/diagnostic/DiagnosticCode.d.ts +130 -131
- package/build/types/emitter/EmitPhaseName.d.ts +8 -8
- package/build/types/emitter/Emitter.d.ts +4 -4
- package/build/types/emitter/EmitterContext.d.ts +2 -2
- package/build/types/emitter/Entities.d.ts +31 -29
- package/build/types/emitter/EntityMap.d.ts +8 -8
- package/build/types/emitter/IrBuilder.d.ts +18 -18
- package/build/types/emitter/IrToJs.d.ts +9 -9
- package/build/types/emitter/Transformer.d.ts +37 -37
- package/build/types/emitter/ir/AccessedEntities.d.ts +5 -5
- package/build/types/emitter/ir/ComputedAccess.d.ts +5 -5
- package/build/types/emitter/ir/EmitOptions.d.ts +41 -27
- package/build/types/emitter/ir/Nodes.d.ts +141 -140
- package/build/types/emitter/ir/types.d.ts +8 -8
- package/build/types/entities/ConstructorEntity.d.ts +9 -9
- package/build/types/entities/DereferenceOperatorEntity.d.ts +4 -4
- package/build/types/entities/DestructorEntity.d.ts +4 -4
- package/build/types/entities/{MethodEntity.d.ts → FunctionEntity.d.ts} +36 -36
- package/build/types/entities/{MethodTypeEntity.d.ts → FunctionTypeEntity.d.ts} +23 -23
- package/build/types/entities/GetterEntity.d.ts +9 -9
- package/build/types/entities/IndexerEntity.d.ts +4 -4
- package/build/types/entities/SetterEntity.d.ts +9 -9
- package/build/types/entities/TypeEntity.d.ts +3 -3
- package/build/types/entities/TypeEntityMembers.d.ts +3 -3
- package/build/types/entities/TypeParameterEntity.d.ts +2 -2
- package/build/types/entities/VariableEntity.d.ts +32 -32
- package/build/types/entities/index.d.ts +14 -14
- package/build/types/services/CompletionService.d.ts +8 -9
- package/build/types/services/DisplayService.d.ts +72 -69
- package/build/types/services/HoverService.d.ts +1 -1
- package/build/types/services/NodeSemanticInfo.d.ts +26 -21
- package/build/types/services/SemanticTokensService.d.ts +6 -6
- package/build/types/services/SourceFileItemsService.d.ts +11 -11
- package/build/types/services/TypeDefinitionService.d.ts +2 -2
- package/build/types/services/signature-help/SignatureWithValueParameters.d.ts +10 -10
- package/build/types/services/signature-help/TypeParameterSignatureHelpProvider.d.ts +1 -1
- package/build/types/services/source-generation/EntityToSyntax.d.ts +10 -9
- package/build/types/tree/NodeKind.d.ts +27 -27
- package/build/types/tree/green/Nodes.d.ts +127 -128
- package/build/types/tree/green/SyntaxFactory.d.ts +20 -19
- package/build/types/tree/green/SyntaxToCode.d.ts +23 -21
- package/build/types/tree/red/Nodes.d.ts +173 -172
- package/build/types/ts-interop/Entities.d.ts +28 -28
- package/build/types/ts-interop/TsInteropContext.d.ts +2 -1
- package/build/types/ts-interop/TsPackageMembersCreator.d.ts +1 -1
- package/build/types/ts-interop/TsTypeMembersCreator.d.ts +1 -1
- package/build/types/types/{MethodType.d.ts → FunctionType.d.ts} +6 -6
- package/build/types/types/IntersectionType.d.ts +20 -0
- package/build/types/types/ParameterType.d.ts +6 -3
- package/build/types/types/StandardTypes.d.ts +2 -2
- package/build/types/types/Type.d.ts +3 -2
- package/build/types/types/TypeFactory.d.ts +8 -6
- package/build/types/types/TypeMembers.d.ts +8 -8
- package/build/types/types/index.d.ts +2 -1
- package/package.json +1 -1
- package/build/types/analysis/AccessedMethod.d.ts +0 -53
- package/build/types/analysis/ControlFlowGraphBuilder.d.ts +0 -129
@@ -1,7 +1,8 @@
|
|
1
|
-
import {
|
1
|
+
import { AccessedFunction } from '../analysis/AccessedFunction.js';
|
2
|
+
import { PackageNameTreeNode } from '../analysis/ImportedPackageNameTree.js';
|
2
3
|
import { Localization } from '../analysis/Localization.js';
|
3
4
|
import { LocalizationContext, NamedEntity } from '../analysis/LocalizationContext.js';
|
4
|
-
import {
|
5
|
+
import { SubstitutedFunction } from '../analysis/SubstitutedFunction.js';
|
5
6
|
import { Analyzer } from '../analysis/index.js';
|
6
7
|
import { HelperPhraseKind } from '../common/HelperPhrases.js';
|
7
8
|
import { PackageDialect, PackageLocale } from '../common/index.js';
|
@@ -15,14 +16,15 @@ export declare class DisplayService {
|
|
15
16
|
constructor(_analyzer: Analyzer | undefined, _lctxOrLocale: LocalizationContext | PackageLocale, _dialect?: PackageDialect | undefined);
|
16
17
|
displayVariableDeclaration(variable: VariableDeclaration): string;
|
17
18
|
displayType(type: types.Type): string;
|
18
|
-
|
19
|
+
getFunctionTypeBodyDisplayParts(type: types.FunctionType): FunctionTypeBodyDisplayParts;
|
19
20
|
getNamedTypeDisplayParts(type: NamedType): NamedTypeDisplayParts;
|
20
21
|
displayPackageAliasEntity(entity: e.PackageAliasEntity): string;
|
21
22
|
displayPackage(package_: e.PackageEntity): string;
|
23
|
+
displayPackageNameTreeNode(node: PackageNameTreeNode): string;
|
22
24
|
displayValueParameterDeclaration(parameter: ValueParameterDeclaration, typeDisplayOptions?: TypeDisplayOptions): string;
|
23
25
|
getValueParameterDeclarationDisplayParts(parameter: ValueParameterDeclaration, typeDisplayOptions?: TypeDisplayOptions): ValueParameterDeclarationDisplayParts;
|
24
|
-
|
25
|
-
|
26
|
+
displayFunctionDeclaration(func: FunctionDeclaration): string;
|
27
|
+
getFunctionDeclarationDisplayParts(func: FunctionDeclaration): FunctionDeclarationDisplayParts;
|
26
28
|
displayOperatorDeclaration(operator: OperatorDeclaration): string;
|
27
29
|
getOperatorDeclarationDisplayParts(operator: OperatorDeclaration): OperatorDeclarationDisplayParts;
|
28
30
|
displayOperatorKind(kind: e.OperatorKind, locale: PackageLocale): string;
|
@@ -49,20 +51,20 @@ export declare class DisplayService {
|
|
49
51
|
private displayTypeEntityAsUsage;
|
50
52
|
private displayStructuredTypeUsage;
|
51
53
|
private displayVariantTypeUsage;
|
52
|
-
private
|
54
|
+
private displayFunctionTypeUsage;
|
53
55
|
private displayParameterTypeUsage;
|
54
56
|
private displayAliasTypeUsage;
|
55
|
-
private
|
57
|
+
private displayUnionOrIntersectionTypeUsage;
|
56
58
|
private displayUnresolvedTypeUsage;
|
57
59
|
private displayTypeInternal;
|
58
60
|
private displayTypeUsageInternal;
|
59
|
-
private
|
61
|
+
private displayUnionOrIntersectionTypeTypes;
|
60
62
|
private displayDeclarationContainer;
|
61
63
|
private getEntityName;
|
62
64
|
}
|
63
65
|
interface TypeDisplayOptions {
|
64
66
|
readonly unionAndAliasTypeDisplayKind: UnionAndAliasTypeDisplayKind;
|
65
|
-
readonly
|
67
|
+
readonly displayFullVersionOfNamedFunctionType: boolean;
|
66
68
|
readonly displayContainer: boolean;
|
67
69
|
}
|
68
70
|
declare const enum UnionAndAliasTypeDisplayKind {
|
@@ -102,15 +104,15 @@ interface IVariableDeclaration {
|
|
102
104
|
isOptionalParameter(): boolean;
|
103
105
|
getContainer(analyzer: Analyzer | undefined): DeclarationContainer | undefined;
|
104
106
|
}
|
105
|
-
export type
|
106
|
-
export declare class
|
107
|
+
export type FunctionDeclaration = FunctionDeclaration_entity | FunctionDeclaration_typeMember | FunctionDeclaration_substitutedFunction | FunctionDeclaration_accessedFunction;
|
108
|
+
export declare class FunctionDeclaration_entity implements IFunctionDeclaration {
|
107
109
|
readonly kind = "entity";
|
108
110
|
private readonly _typeParameterValues;
|
109
111
|
private readonly _valueParameters;
|
110
|
-
readonly
|
112
|
+
readonly func: e.FunctionEntity;
|
111
113
|
readonly localization: Localization;
|
112
|
-
constructor(
|
113
|
-
getEntity(): e.
|
114
|
+
constructor(func: e.FunctionEntity, localization: Localization);
|
115
|
+
getEntity(): e.FunctionEntity;
|
114
116
|
getLocalization(): Localization;
|
115
117
|
getTypeParameterValues(): readonly TypeParameterValue[];
|
116
118
|
getValueParameters(): readonly ValueParameterDeclaration[];
|
@@ -118,14 +120,14 @@ export declare class MethodDeclaration_entity implements IMethodDeclaration {
|
|
118
120
|
isAsync(): boolean;
|
119
121
|
getContainer(): DeclarationContainer | undefined;
|
120
122
|
}
|
121
|
-
export declare class
|
123
|
+
export declare class FunctionDeclaration_typeMember implements IFunctionDeclaration {
|
122
124
|
readonly kind = "type-member";
|
123
125
|
private readonly _typeParameterValues;
|
124
126
|
private readonly _valueParameters;
|
125
|
-
readonly
|
127
|
+
readonly func: types.Method;
|
126
128
|
readonly localization: Localization;
|
127
|
-
constructor(
|
128
|
-
getEntity(): e.
|
129
|
+
constructor(func: types.Method, localization: Localization);
|
130
|
+
getEntity(): e.FunctionEntity;
|
129
131
|
getLocalization(): Localization;
|
130
132
|
getTypeParameterValues(): readonly TypeParameterValue[];
|
131
133
|
getValueParameters(): readonly ValueParameterDeclaration[];
|
@@ -133,14 +135,14 @@ export declare class MethodDeclaration_typeMember implements IMethodDeclaration
|
|
133
135
|
isAsync(): boolean;
|
134
136
|
getContainer(analyzer: Analyzer | undefined): DeclarationContainer | undefined;
|
135
137
|
}
|
136
|
-
export declare class
|
137
|
-
readonly
|
138
|
+
export declare class FunctionDeclaration_substitutedFunction implements IFunctionDeclaration {
|
139
|
+
readonly func: SubstitutedFunction;
|
138
140
|
readonly localization: Localization;
|
139
|
-
readonly kind = "substituted-
|
141
|
+
readonly kind = "substituted-function";
|
140
142
|
private readonly _typeParameterValues;
|
141
143
|
private readonly _valueParameters;
|
142
|
-
constructor(
|
143
|
-
getEntity(): e.
|
144
|
+
constructor(func: SubstitutedFunction, localization: Localization);
|
145
|
+
getEntity(): e.FunctionEntity;
|
144
146
|
getLocalization(): Localization;
|
145
147
|
getTypeParameterValues(): readonly TypeParameterValue[];
|
146
148
|
getValueParameters(): readonly ValueParameterDeclaration[];
|
@@ -148,14 +150,14 @@ export declare class MethodDeclaration_substitutedMethod implements IMethodDecla
|
|
148
150
|
isAsync(): boolean;
|
149
151
|
getContainer(analyzer: Analyzer | undefined): DeclarationContainer | undefined;
|
150
152
|
}
|
151
|
-
export declare class
|
152
|
-
readonly
|
153
|
+
export declare class FunctionDeclaration_accessedFunction implements IFunctionDeclaration {
|
154
|
+
readonly func: AccessedFunction;
|
153
155
|
readonly localization: Localization;
|
154
|
-
readonly kind = "accessed-
|
156
|
+
readonly kind = "accessed-function";
|
155
157
|
private readonly _typeParameterValues;
|
156
158
|
private readonly _valueParameters;
|
157
|
-
constructor(
|
158
|
-
getEntity(): e.
|
159
|
+
constructor(func: AccessedFunction, localization: Localization);
|
160
|
+
getEntity(): e.FunctionEntity;
|
159
161
|
getLocalization(): Localization;
|
160
162
|
getTypeParameterValues(): readonly TypeParameterValue[];
|
161
163
|
getValueParameters(): readonly ValueParameterDeclaration[];
|
@@ -163,8 +165,8 @@ export declare class MethodDeclaration_accessedMethod implements IMethodDeclarat
|
|
163
165
|
isAsync(): boolean;
|
164
166
|
getContainer(analyzer: Analyzer | undefined): DeclarationContainer | undefined;
|
165
167
|
}
|
166
|
-
interface
|
167
|
-
getEntity(): e.
|
168
|
+
interface IFunctionDeclaration {
|
169
|
+
getEntity(): e.FunctionEntity;
|
168
170
|
getLocalization(): Localization;
|
169
171
|
getTypeParameterValues(): readonly TypeParameterValue[];
|
170
172
|
getValueParameters(): readonly ValueParameterDeclaration[];
|
@@ -260,7 +262,7 @@ interface IIndexerDeclaration {
|
|
260
262
|
getType(): types.Type;
|
261
263
|
getContainer(analyzer: Analyzer | undefined): DeclarationContainer | undefined;
|
262
264
|
}
|
263
|
-
export type ValueParameterDeclaration = ValueParameterDeclaration_entity | ValueParameterDeclaration_typeMember |
|
265
|
+
export type ValueParameterDeclaration = ValueParameterDeclaration_entity | ValueParameterDeclaration_typeMember | ValueParameterDeclaration_substitutedFunction | ValueParameterDeclaration_matchResultValueParameter | ValueParameterDeclaration_universal;
|
264
266
|
export declare class ValueParameterDeclaration_entity implements IValueParameter {
|
265
267
|
readonly value: e.VariableEntity;
|
266
268
|
readonly localization: Localization;
|
@@ -283,7 +285,7 @@ export declare class ValueParameterDeclaration_typeMember implements IValueParam
|
|
283
285
|
isOptional(): boolean;
|
284
286
|
getType(): types.Type;
|
285
287
|
}
|
286
|
-
export declare class
|
288
|
+
export declare class ValueParameterDeclaration_substitutedFunction implements IValueParameter {
|
287
289
|
readonly entity: e.VariableEntity;
|
288
290
|
readonly type: types.Type;
|
289
291
|
readonly localization: Localization;
|
@@ -341,7 +343,7 @@ export declare class TypeParameterValue_typeArgument {
|
|
341
343
|
readonly kind = "type-argument";
|
342
344
|
constructor(value: types.Type);
|
343
345
|
}
|
344
|
-
export type TypeDeclaration = TypeDeclaration_structured |
|
346
|
+
export type TypeDeclaration = TypeDeclaration_structured | TypeDeclaration_function | TypeDeclaration_variant | TypeDeclaration_alias | TypeDeclaration_parameter | TypeDeclaration_unresolved;
|
345
347
|
export declare class TypeDeclaration_structured implements ITypeDeclaration {
|
346
348
|
readonly value: TypeDeclarationStructured;
|
347
349
|
readonly kind = "structured";
|
@@ -389,23 +391,23 @@ interface ITypeDeclarationStructured {
|
|
389
391
|
isAspect(): boolean;
|
390
392
|
getContainer(): DeclarationContainer | undefined;
|
391
393
|
}
|
392
|
-
export declare class
|
393
|
-
readonly value:
|
394
|
-
readonly kind = "
|
395
|
-
constructor(value:
|
394
|
+
export declare class TypeDeclaration_function implements ITypeDeclaration {
|
395
|
+
readonly value: TypeDeclarationFunction;
|
396
|
+
readonly kind = "function";
|
397
|
+
constructor(value: TypeDeclarationFunction);
|
396
398
|
ifNamedThenEntity(): e.NamedTypeEntity | undefined;
|
397
399
|
getLocalization(): Localization;
|
398
400
|
getTypeParameterValues(): readonly TypeParameterValue[];
|
399
401
|
getContainer(): DeclarationContainer | undefined;
|
400
402
|
}
|
401
|
-
export type
|
402
|
-
export declare class
|
403
|
-
readonly entity: e.
|
403
|
+
export type TypeDeclarationFunction = TypeDeclarationFunction_entity | TypeDeclarationFunction_type;
|
404
|
+
export declare class TypeDeclarationFunction_entity implements ITypeDeclarationFunction {
|
405
|
+
readonly entity: e.FunctionTypeEntity;
|
404
406
|
readonly localization: Localization;
|
405
407
|
readonly kind = "entity";
|
406
408
|
private readonly _typeParameterValues;
|
407
409
|
private readonly _valueParameters;
|
408
|
-
constructor(entity: e.
|
410
|
+
constructor(entity: e.FunctionTypeEntity, localization: Localization);
|
409
411
|
ifNamedThenEntity(): e.NamedTypeEntity | undefined;
|
410
412
|
getLocalization(): Localization;
|
411
413
|
getTypeParameterValues(): readonly TypeParameterValue[];
|
@@ -414,13 +416,13 @@ export declare class TypeDeclarationMethod_entity implements ITypeDeclarationMet
|
|
414
416
|
isAsync(): boolean;
|
415
417
|
getContainer(): DeclarationContainer | undefined;
|
416
418
|
}
|
417
|
-
export declare class
|
418
|
-
readonly type: types.
|
419
|
+
export declare class TypeDeclarationFunction_type implements ITypeDeclarationFunction {
|
420
|
+
readonly type: types.FunctionType;
|
419
421
|
readonly localization: Localization;
|
420
422
|
readonly kind = "type";
|
421
423
|
private readonly _typeParameterValues;
|
422
424
|
private readonly _valueParameters;
|
423
|
-
constructor(type: types.
|
425
|
+
constructor(type: types.FunctionType, localization: Localization);
|
424
426
|
ifNamedThenEntity(): e.NamedTypeEntity | undefined;
|
425
427
|
getLocalization(): Localization;
|
426
428
|
getTypeParameterValues(): readonly TypeParameterValue[];
|
@@ -429,7 +431,7 @@ export declare class TypeDeclarationMethod_type implements ITypeDeclarationMetho
|
|
429
431
|
isAsync(): boolean;
|
430
432
|
getContainer(): DeclarationContainer | undefined;
|
431
433
|
}
|
432
|
-
interface
|
434
|
+
interface ITypeDeclarationFunction {
|
433
435
|
ifNamedThenEntity(): e.NamedTypeEntity | undefined;
|
434
436
|
getLocalization(): Localization;
|
435
437
|
getTypeParameterValues(): readonly TypeParameterValue[];
|
@@ -542,11 +544,11 @@ interface ITypeDeclaration {
|
|
542
544
|
getTypeParameterValues(): readonly TypeParameterValue[];
|
543
545
|
getContainer(): DeclarationContainer | undefined;
|
544
546
|
}
|
545
|
-
type NamedType =
|
546
|
-
export declare class
|
547
|
-
readonly value: e.
|
548
|
-
readonly kind = "
|
549
|
-
constructor(value: e.
|
547
|
+
type NamedType = NamedType_function | NamedType_structured | NamedType_typeParameter | NamedType_variant | NamedType_alias;
|
548
|
+
export declare class NamedType_function implements INamedType {
|
549
|
+
readonly value: e.PackageFunctionTypeEntity;
|
550
|
+
readonly kind = "function";
|
551
|
+
constructor(value: e.PackageFunctionTypeEntity);
|
550
552
|
getEntity(): e.NamedTypeEntity;
|
551
553
|
getTypeParameters(): readonly e.TypeParameterEntity[];
|
552
554
|
}
|
@@ -614,7 +616,7 @@ interface IOperatorDeclaration {
|
|
614
616
|
getReturnType(): types.Type;
|
615
617
|
getContainer(analyzer: Analyzer | undefined): DeclarationContainer | undefined;
|
616
618
|
}
|
617
|
-
export type TypeUsage = StructuredTypeUsage | VariantTypeUsage |
|
619
|
+
export type TypeUsage = StructuredTypeUsage | VariantTypeUsage | FunctionTypeUsage | AliasTypeUsage | ParameterTypeUsage | UnionOrIntersectionTypeUsage | UnresolvedTypeUsage;
|
618
620
|
export type StructuredTypeUsage = StructuredTypeUsage_type | StructuredTypeUsage_entity;
|
619
621
|
export declare class StructuredTypeUsage_type implements IStructuredTypeUsage {
|
620
622
|
readonly type: types.StructuredType;
|
@@ -662,11 +664,11 @@ interface IVariantTypeUsage {
|
|
662
664
|
ifNamedThenEntity(): e.NamedTypeEntity | undefined;
|
663
665
|
getContainer(): DeclarationContainer | undefined;
|
664
666
|
}
|
665
|
-
export type
|
666
|
-
export declare class
|
667
|
-
readonly type: types.
|
668
|
-
readonly kind = "
|
669
|
-
constructor(type: types.
|
667
|
+
export type FunctionTypeUsage = FunctionTypeUsage_type | FunctionTypeUsage_entity;
|
668
|
+
export declare class FunctionTypeUsage_type implements IFunctionTypeUsage {
|
669
|
+
readonly type: types.FunctionType;
|
670
|
+
readonly kind = "function";
|
671
|
+
constructor(type: types.FunctionType);
|
670
672
|
ifNamedThenEntity(): e.NamedTypeEntity | undefined;
|
671
673
|
isAsync(): boolean;
|
672
674
|
getTypeParameterValues(): readonly TypeParameterValue[];
|
@@ -674,10 +676,10 @@ export declare class MethodTypeUsage_type implements IMethodTypeUsage {
|
|
674
676
|
getReturnType(): types.Type;
|
675
677
|
getContainer(): DeclarationContainer | undefined;
|
676
678
|
}
|
677
|
-
export declare class
|
678
|
-
readonly entity: e.
|
679
|
-
readonly kind = "
|
680
|
-
constructor(entity: e.
|
679
|
+
export declare class FunctionTypeUsage_entity implements IFunctionTypeUsage {
|
680
|
+
readonly entity: e.FunctionTypeEntity;
|
681
|
+
readonly kind = "function";
|
682
|
+
constructor(entity: e.FunctionTypeEntity);
|
681
683
|
ifNamedThenEntity(): e.NamedTypeEntity | undefined;
|
682
684
|
isAsync(): boolean;
|
683
685
|
getTypeParameterValues(): readonly TypeParameterValue[];
|
@@ -685,8 +687,8 @@ export declare class MethodTypeUsage_entity implements IMethodTypeUsage {
|
|
685
687
|
getReturnType(): types.Type;
|
686
688
|
getContainer(): DeclarationContainer | undefined;
|
687
689
|
}
|
688
|
-
interface
|
689
|
-
readonly kind: '
|
690
|
+
interface IFunctionTypeUsage {
|
691
|
+
readonly kind: 'function';
|
690
692
|
ifNamedThenEntity(): e.NamedTypeEntity | undefined;
|
691
693
|
isAsync(): boolean;
|
692
694
|
getTypeParameterValues(): readonly TypeParameterValue[];
|
@@ -740,11 +742,12 @@ interface IParameterTypeUsage {
|
|
740
742
|
getEntity(): e.NamedTypeEntity;
|
741
743
|
isNoneExcluded(): boolean;
|
742
744
|
}
|
743
|
-
type
|
744
|
-
declare class
|
745
|
-
readonly type: types.UnionType;
|
746
|
-
readonly kind = "union";
|
747
|
-
constructor(type: types.UnionType);
|
745
|
+
type UnionOrIntersectionTypeUsage = UnionOrIntersectionTypeUsage_type;
|
746
|
+
declare class UnionOrIntersectionTypeUsage_type {
|
747
|
+
readonly type: types.UnionType | types.IntersectionType;
|
748
|
+
readonly kind = "union-or-intersection";
|
749
|
+
constructor(type: types.UnionType | types.IntersectionType);
|
750
|
+
isUnionType(): boolean;
|
748
751
|
getOriginalTypes(): readonly types.Type[];
|
749
752
|
getUnaliasedFlattenedTypes(): readonly types.Type[];
|
750
753
|
}
|
@@ -773,7 +776,7 @@ declare namespace DeclarationContainer {
|
|
773
776
|
constructor(entity: e.PackageEntity);
|
774
777
|
}
|
775
778
|
}
|
776
|
-
export declare class
|
779
|
+
export declare class FunctionDeclarationDisplayParts {
|
777
780
|
readonly asyncKeywordWithWhitespace: string;
|
778
781
|
readonly functionKeyword: string;
|
779
782
|
readonly whitespaceAfterFunctionKeyword: string;
|
@@ -864,7 +867,7 @@ export declare class NamedTypeDisplayParts {
|
|
864
867
|
readonly postfix: string;
|
865
868
|
constructor(prefix: string, typeParameters: readonly string[], typeParameterSeparator: string, postfix: string);
|
866
869
|
}
|
867
|
-
export declare class
|
870
|
+
export declare class FunctionTypeBodyDisplayParts {
|
868
871
|
readonly asyncKeywordWithWhitespace: string;
|
869
872
|
readonly functionKeyword: string;
|
870
873
|
readonly valueParametersStart: string;
|
@@ -6,7 +6,7 @@ export declare class HoverService {
|
|
6
6
|
getHover(analyzer: Analyzer, sourceFile: SourceFile, offset: number): Hover | undefined;
|
7
7
|
private createHoverForEntity;
|
8
8
|
private createHoverAtReference;
|
9
|
-
private
|
9
|
+
private createHoverAtAccessedFunction;
|
10
10
|
}
|
11
11
|
export declare class Hover {
|
12
12
|
private readonly _contents;
|
@@ -1,10 +1,11 @@
|
|
1
|
-
import {
|
1
|
+
import { AccessedFunction } from '../analysis/AccessedFunction.js';
|
2
2
|
import { MatchResultValueParameter } from '../analysis/ArgumentToParameterMatchResult.js';
|
3
|
-
import {
|
4
|
-
import { TypeIndexedAccessorDeclaration } from '../analysis/NodeTypeUtils.js';
|
3
|
+
import { PackageNameTreeNode } from '../analysis/ImportedPackageNameTree.js';
|
5
4
|
import { Analyzer } from '../analysis/index.js';
|
5
|
+
import { Translation, WithLocalization } from '../analysis/Localization.js';
|
6
|
+
import { IndexedElementAccessorDeclaration } from '../analysis/NodeTypeUtils.js';
|
6
7
|
import { AccessKind, ReadonlyNonEmptyArray } from '../common/index.js';
|
7
|
-
import { AliasTypeEntity, Entity,
|
8
|
+
import { AliasTypeEntity, Entity, FunctionEntity, FunctionTypeEntity, PackageEntity, StructuredTypeEntity, TypeParameterEntity, VariableEntity, VariantTypeEntity } from '../entities/index.js';
|
8
9
|
import * as tree from '../tree/index.js';
|
9
10
|
import * as types from '../types/index.js';
|
10
11
|
import { TokenOrKeyword } from './TreeUtils.js';
|
@@ -12,18 +13,18 @@ export declare class NodeSemanticInfoService {
|
|
12
13
|
static ofTokenOrKeyword(analyzer: Analyzer, tokenOrKeyword: TokenOrKeyword, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
|
13
14
|
static ofDefaultMatchExpression(analyzer: Analyzer, node: tree.DefaultMatchExpression): NodeSemanticInfo | undefined;
|
14
15
|
static ofNonKeywordIdentifier(analyzer: Analyzer, node: tree.Identifier, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
|
15
|
-
static ofProperty(analyzer: Analyzer, node: tree.
|
16
|
+
static ofProperty(analyzer: Analyzer, node: tree.MemberAccessExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
|
16
17
|
static ofQualifiedNameQualifier(analyzer: Analyzer, node: tree.QualifiedName, qualifier: tree.Identifier, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
|
17
18
|
static ofNamedTypeSpecifierNameQualifier(analyzer: Analyzer, node: tree.NamedTypeSpecifier, qualifier: tree.Identifier, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
|
18
19
|
static ofTagNameQualifier(analyzer: Analyzer, node: tree.Tag, qualifier: tree.Identifier, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
|
19
20
|
static ofIdentifierExpression(analyzer: Analyzer, node: tree.IdentifierExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
|
20
|
-
static
|
21
|
-
static
|
21
|
+
static ofConstructorDeclaration(analyzer: Analyzer, node: tree.ConstructorDeclaration): NodeSemanticInfo;
|
22
|
+
static ofIndexedElementAccessorDeclaration(analyzer: Analyzer, node: IndexedElementAccessorDeclaration): NodeSemanticInfo;
|
22
23
|
static ofIndexedAccessExpressionOperator(analyzer: Analyzer, node: tree.IndexedAccessExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
|
23
24
|
static ofAssignmentStatementOperator(analyzer: Analyzer, node: tree.AssignmentStatement, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
|
24
25
|
static ofBinaryExpressionOperator(analyzer: Analyzer, node: tree.BinaryExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
|
25
26
|
static ofPrefixUnaryExpressionOperator(analyzer: Analyzer, node: tree.PrefixUnaryExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
|
26
|
-
static ofDereferenceOperatorDeclaration(analyzer: Analyzer, node: tree.
|
27
|
+
static ofDereferenceOperatorDeclaration(analyzer: Analyzer, node: tree.DereferencedVariableGetterDeclaration | tree.DereferencedVariableSetterDeclaration): NodeSemanticInfo | undefined;
|
27
28
|
static ofDereferenceExpressionOperator(analyzer: Analyzer, node: tree.DereferenceExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
|
28
29
|
static ofAutotypeCallExpression(analyzer: Analyzer, node: tree.AutotypeCallExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
|
29
30
|
static ofObjectExpression(analyzer: Analyzer, node: tree.ObjectExpression, options: NodeSemanticInfoServiceOptions): NodeSemanticInfo | undefined;
|
@@ -53,16 +54,15 @@ export declare class ReferenceNodeSemanticInfo {
|
|
53
54
|
get firstBetterTargetWithFallback(): WithLocalization<ReferenceTarget>;
|
54
55
|
constructor(targets: ReadonlyNonEmptyArray<WithLocalization<ReferenceTarget>>, isAmbiguous: boolean, betterTargets?: ReadonlyNonEmptyArray<WithLocalization<ReferenceTarget>> | undefined);
|
55
56
|
}
|
56
|
-
export type ReferenceTarget = EntityReferenceTarget |
|
57
|
+
export type ReferenceTarget = EntityReferenceTarget | FieldReferenceTarget | TypeValueParameterReferenceTarget | ConstructorReferenceTarget | OperatorReferenceTarget | DereferenceOperatorReferenceTarget | AccessedFunctionReferenceTarget | IndexerReferenceTarget | MatchResultValueParameterReferenceTarget | PackageReferenceTarget | PackageNameTreeNodeReferenceTarget | TypeContextReferenceTarget;
|
57
58
|
export declare class EntityReferenceTarget {
|
58
|
-
readonly entity:
|
59
|
+
readonly entity: Entity;
|
59
60
|
readonly accessKind: AccessKind;
|
60
61
|
readonly narrowedType?: types.Type | undefined;
|
61
62
|
readonly kind = "entity";
|
62
|
-
constructor(entity:
|
63
|
+
constructor(entity: Entity, accessKind: AccessKind, narrowedType?: types.Type | undefined);
|
63
64
|
}
|
64
|
-
export
|
65
|
-
export declare class TypeVariableReferenceTarget {
|
65
|
+
export declare class FieldReferenceTarget {
|
66
66
|
readonly variable: types.Variable;
|
67
67
|
readonly accessKind: AccessKind;
|
68
68
|
readonly narrowedType: types.Type | undefined;
|
@@ -75,21 +75,21 @@ export declare class TypeValueParameterReferenceTarget {
|
|
75
75
|
readonly kind = "type-value-parameter";
|
76
76
|
constructor(parameter: types.ValueParameter, accessKind: AccessKind);
|
77
77
|
}
|
78
|
-
export declare class
|
78
|
+
export declare class ConstructorReferenceTarget {
|
79
79
|
readonly constructor_: types.Constructor;
|
80
80
|
readonly kind = "type-constructor";
|
81
81
|
constructor(constructor_: types.Constructor);
|
82
82
|
}
|
83
|
-
export declare class
|
83
|
+
export declare class DereferenceOperatorReferenceTarget {
|
84
84
|
readonly operator: types.DereferenceOperator;
|
85
85
|
readonly accessKind: AccessKind;
|
86
86
|
readonly kind = "type-dereference-operator";
|
87
87
|
constructor(operator: types.DereferenceOperator, accessKind: AccessKind);
|
88
88
|
}
|
89
|
-
export declare class
|
90
|
-
readonly
|
91
|
-
readonly kind = "accessed-
|
92
|
-
constructor(
|
89
|
+
export declare class AccessedFunctionReferenceTarget {
|
90
|
+
readonly func: AccessedFunction;
|
91
|
+
readonly kind = "accessed-function";
|
92
|
+
constructor(func: AccessedFunction);
|
93
93
|
}
|
94
94
|
export declare class OperatorReferenceTarget {
|
95
95
|
readonly operator: types.Operator;
|
@@ -107,13 +107,18 @@ export declare class PackageReferenceTarget {
|
|
107
107
|
readonly kind = "package";
|
108
108
|
constructor(package_: PackageEntity);
|
109
109
|
}
|
110
|
+
export declare class PackageNameTreeNodeReferenceTarget {
|
111
|
+
readonly node: PackageNameTreeNode;
|
112
|
+
readonly kind = "package-name-tree-node";
|
113
|
+
constructor(node: PackageNameTreeNode);
|
114
|
+
}
|
110
115
|
export declare class TypeContextReferenceTarget {
|
111
116
|
readonly type: types.Type;
|
112
117
|
readonly typeContextKind: 'object' | 'base';
|
113
118
|
readonly kind = "type-context";
|
114
119
|
constructor(type: types.Type, typeContextKind: 'object' | 'base');
|
115
120
|
}
|
116
|
-
export declare class
|
121
|
+
export declare class IndexerReferenceTarget {
|
117
122
|
readonly indexer: types.Indexer;
|
118
123
|
readonly accessKind: AccessKind;
|
119
124
|
readonly kind = "type-indexer";
|
@@ -127,7 +132,7 @@ export declare class NameTranslationNodeSemanticInfo {
|
|
127
132
|
get firstTarget(): TranslationTargetEntity;
|
128
133
|
constructor(targets: ReadonlyNonEmptyArray<TranslationTargetEntity>, isAmbiguous: boolean, translation: Translation);
|
129
134
|
}
|
130
|
-
type TranslationTargetEntity = VariableEntity | VariantTypeEntity |
|
135
|
+
type TranslationTargetEntity = VariableEntity | VariantTypeEntity | FunctionEntity | TypeParameterEntity | FunctionTypeEntity | StructuredTypeEntity | AliasTypeEntity;
|
131
136
|
export declare class DefaultSwitchMatchNodeSemanticInfo {
|
132
137
|
readonly type: types.Type;
|
133
138
|
readonly kind = "default-switch-match";
|
@@ -5,7 +5,7 @@ export declare class SemanticTokensService {
|
|
5
5
|
getSemanticTokens(analyzer: Analyzer, sourceFile: SourceFile, cancellationToken: CancellationToken | undefined): Promise<SemanticToken[]>;
|
6
6
|
getSemanticTokensInRange(analyzer: Analyzer, sourceFile: SourceFile, range: Range, cancellationToken: CancellationToken | undefined): Promise<SemanticToken[]>;
|
7
7
|
private rangesOverlap;
|
8
|
-
private
|
8
|
+
private getSemanticTokenKindForFunctionEntity;
|
9
9
|
private isCapitalizedName;
|
10
10
|
}
|
11
11
|
export declare class SemanticToken {
|
@@ -23,16 +23,16 @@ export declare class SemanticTokenModifiers {
|
|
23
23
|
setCapitalized(value: boolean): this;
|
24
24
|
}
|
25
25
|
export declare const enum SemanticTokenKind {
|
26
|
-
|
26
|
+
FunctionBlockLiteralParameter = 0,
|
27
27
|
SpecialVariable = 1,
|
28
28
|
SpecialMethod = 2,
|
29
29
|
Variant = 3,
|
30
|
-
|
31
|
-
|
32
|
-
|
30
|
+
PackageFunction = 4,
|
31
|
+
NestedFunction = 5,
|
32
|
+
Method = 6,
|
33
33
|
Operator = 7
|
34
34
|
}
|
35
|
-
export declare const supportedSemanticTokens: readonly [SemanticTokenKind.
|
35
|
+
export declare const supportedSemanticTokens: readonly [SemanticTokenKind.FunctionBlockLiteralParameter, SemanticTokenKind.SpecialVariable, SemanticTokenKind.SpecialMethod, SemanticTokenKind.Variant, SemanticTokenKind.PackageFunction, SemanticTokenKind.NestedFunction, SemanticTokenKind.Method, SemanticTokenKind.Operator];
|
36
36
|
export declare const enum SemanticTokenModifierFlag {
|
37
37
|
Const = 1,
|
38
38
|
Declaration = 2,
|
@@ -23,20 +23,20 @@ export declare const enum ItemKind {
|
|
23
23
|
PackageVariable = 1,
|
24
24
|
PackageVariableGetter = 2,
|
25
25
|
PackageVariableSetter = 3,
|
26
|
-
|
26
|
+
PackageFunction = 4,
|
27
27
|
StructuredType = 5,
|
28
|
-
|
28
|
+
FunctionType = 6,
|
29
29
|
VariantType = 7,
|
30
30
|
InvalidType = 8,
|
31
31
|
Variant = 9,
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
32
|
+
Constructor = 10,
|
33
|
+
Destructor = 11,
|
34
|
+
Field = 12,
|
35
|
+
FieldGetter = 13,
|
36
|
+
FieldSetter = 14,
|
37
|
+
Method = 15,
|
38
|
+
IndexedElementGetter = 16,
|
39
|
+
IndexedElementSetter = 17,
|
40
40
|
TypeParameter = 18,
|
41
|
-
|
41
|
+
NestedFunction = 19
|
42
42
|
}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { Analyzer } from '../analysis/index.js';
|
2
2
|
import { SourceFile } from '../project/index.js';
|
3
|
-
import {
|
3
|
+
import { AnonymousFunctionTypeDeclaration, AnonymousStructuredTypeDeclaration, AnonymousVariantTypeDeclaration, PackageAliasTypeDeclaration, PackageFunctionTypeDeclaration, PackageStructuredTypeDeclaration, PackageVariantTypeDeclaration, TypeParameterDeclaration } from '../tree/index.js';
|
4
4
|
import { RangeLocation } from './Types.js';
|
5
5
|
export declare class TypeDefinitionService {
|
6
6
|
getTypeDefinition(analyzer: Analyzer, sourceFile: SourceFile, offset: number): RangeLocation | undefined;
|
7
7
|
private getTypeDefinitionAtIdentifier;
|
8
8
|
}
|
9
|
-
export type TypeDeclaration = PackageStructuredTypeDeclaration | AnonymousStructuredTypeDeclaration |
|
9
|
+
export type TypeDeclaration = PackageStructuredTypeDeclaration | AnonymousStructuredTypeDeclaration | PackageFunctionTypeDeclaration | AnonymousFunctionTypeDeclaration | PackageVariantTypeDeclaration | AnonymousVariantTypeDeclaration | PackageAliasTypeDeclaration | TypeParameterDeclaration;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { AccessedFunction } from '../../analysis/AccessedFunction.js';
|
2
2
|
import { Localization, WithLocalization } from '../../analysis/Localization.js';
|
3
3
|
import { Analyzer } from '../../analysis/index.js';
|
4
4
|
import { Name } from '../../common/index.js';
|
@@ -49,19 +49,19 @@ export declare class MatchedSignature {
|
|
49
49
|
readonly matchResult: SimplifiedArgumentToParameterMatchResult;
|
50
50
|
constructor(value: Signature, matchResult: SimplifiedArgumentToParameterMatchResult);
|
51
51
|
}
|
52
|
-
export type Signature =
|
53
|
-
export declare class
|
54
|
-
readonly kind = "accessed-
|
55
|
-
readonly
|
52
|
+
export type Signature = AccessedFunctionSignature | FunctionTypeSignature | ConstructorSignature | IndexerSignature;
|
53
|
+
export declare class AccessedFunctionSignature implements ISignature {
|
54
|
+
readonly kind = "accessed-function";
|
55
|
+
readonly func: WithLocalization<AccessedFunction>;
|
56
56
|
private readonly _valueParameters;
|
57
|
-
constructor(
|
57
|
+
constructor(func: WithLocalization<AccessedFunction>);
|
58
58
|
getValueParameters(): readonly ValueParameter[];
|
59
59
|
}
|
60
|
-
export declare class
|
61
|
-
readonly kind = "
|
62
|
-
readonly
|
60
|
+
export declare class FunctionTypeSignature implements ISignature {
|
61
|
+
readonly kind = "function-type";
|
62
|
+
readonly functionType: types.FunctionType;
|
63
63
|
private readonly _valueParameters;
|
64
|
-
constructor(
|
64
|
+
constructor(functionType: types.FunctionType);
|
65
65
|
getValueParameters(): readonly ValueParameter[];
|
66
66
|
}
|
67
67
|
export declare class ConstructorSignature implements ISignature {
|
@@ -16,6 +16,6 @@ export declare class TypeParameterSignatureHelpProvider {
|
|
16
16
|
private getSignaturesForNamedTypeSpecifier;
|
17
17
|
private getSignaturesForTag;
|
18
18
|
private getSignaturesForGenericSpecializationExpression;
|
19
|
-
private
|
19
|
+
private getSignatureForSubstitutedFunction;
|
20
20
|
private getSignatureForNamedType;
|
21
21
|
}
|
@@ -12,22 +12,22 @@ export declare class EntityToSyntax {
|
|
12
12
|
private convertNamedPackageMember;
|
13
13
|
private convertPackageType;
|
14
14
|
private convertPackageVariable;
|
15
|
-
private
|
15
|
+
private convertPackageFunction;
|
16
16
|
private convertPackageStructuredType;
|
17
17
|
private convertPackageAliasType;
|
18
18
|
private convertPackageVariantType;
|
19
|
-
private
|
19
|
+
private convertPackageFunctionType;
|
20
20
|
private convertTypeEntityMembers;
|
21
|
-
private
|
22
|
-
private
|
23
|
-
private
|
24
|
-
private
|
25
|
-
private
|
21
|
+
private convertField;
|
22
|
+
private convertMethod;
|
23
|
+
private convertConstructor;
|
24
|
+
private convertDestructor;
|
25
|
+
private convertIndexer;
|
26
26
|
private convertVariant;
|
27
27
|
private createStructuredTypeDeclarationBody;
|
28
28
|
private createAliasTypeDeclarationBody;
|
29
29
|
private createVariantTypeDeclarationBody;
|
30
|
-
private
|
30
|
+
private createFunctionTypeDeclarationBody;
|
31
31
|
private convertTypeParameters;
|
32
32
|
private convertTypeParameter;
|
33
33
|
private convertValueParameters;
|
@@ -38,10 +38,11 @@ export declare class EntityToSyntax {
|
|
38
38
|
private convertType;
|
39
39
|
private convertStructuredType;
|
40
40
|
private convertVariantType;
|
41
|
-
private
|
41
|
+
private convertFunctionType;
|
42
42
|
private convertAliasType;
|
43
43
|
private convertParameterType;
|
44
44
|
private convertUnionType;
|
45
|
+
private convertIntersectionType;
|
45
46
|
private convertUnresolvedType;
|
46
47
|
private createNamedTypeSpecifier;
|
47
48
|
}
|