@artel/artc 0.6.25224 → 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 +81 -79
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +995 -1001
- package/build/{chunk-24QZJOMF.js → chunk-TFTCV5R5.js} +5434 -5343
- package/build/{chunk-62KHK23H.js → chunk-UB6LHKS5.js} +3 -3
- package/build/{chunk-Y6DODJCG.js → chunk-Z6TZA6SN.js} +3 -3
- package/build/types/analysis/AccessedFunction.d.ts +53 -0
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +15 -15
- package/build/types/analysis/Analyzer.d.ts +133 -124
- package/build/types/analysis/CallExpressionMeaning.d.ts +10 -10
- package/build/types/analysis/DiagnosticCollector.d.ts +16 -16
- package/build/types/analysis/EntityLocalizationHelper.d.ts +6 -6
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +10 -10
- package/build/types/analysis/LocalizationContext.d.ts +2 -2
- package/build/types/analysis/{PropertyAccessExpressionMeaning.d.ts → MemberAccessExpressionMeaning.d.ts} +20 -20
- 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 +19 -19
- package/build/types/analysis/Tags.d.ts +6 -6
- package/build/types/analysis/Utils.d.ts +3 -3
- package/build/types/analysis/WellKnownDeclarations.d.ts +4 -4
- package/build/types/analysis/control-flow/NarrowableExpression.d.ts +1 -1
- package/build/types/api/Api.d.ts +3 -3
- 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 +26 -25
- 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 +140 -139
- 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 -8
- package/build/types/services/DisplayService.d.ts +62 -62
- package/build/types/services/HoverService.d.ts +1 -1
- package/build/types/services/NodeSemanticInfo.d.ts +17 -17
- 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 +9 -9
- package/build/types/tree/NodeKind.d.ts +146 -148
- package/build/types/tree/green/Nodes.d.ts +119 -139
- package/build/types/tree/green/SyntaxFactory.d.ts +19 -19
- package/build/types/tree/green/SyntaxToCode.d.ts +20 -22
- package/build/types/tree/red/Nodes.d.ts +165 -189
- package/build/types/ts-interop/Entities.d.ts +28 -28
- package/build/types/ts-interop/TsInteropContext.d.ts +1 -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/StandardTypes.d.ts +2 -2
- package/build/types/types/Type.d.ts +2 -2
- package/build/types/types/TypeFactory.d.ts +6 -7
- package/build/types/types/TypeMembers.d.ts +8 -8
- package/build/types/types/index.d.ts +1 -1
- package/package.json +1 -1
- package/build/types/analysis/AccessedMethod.d.ts +0 -53
@@ -6,7 +6,7 @@ import { PackageEntityDefinition } from '../entities/PackageEntity.js';
|
|
6
6
|
import { OriginalPackageMembers } from '../entities/PackageMembers.js';
|
7
7
|
import { OriginalTypeEntityMembers } from '../entities/TypeEntityMembers.js';
|
8
8
|
import type { EntityContainingTypeParameter, EntityContainingValueParameter, EntityOwningGetter, TypeEntityWithMembers, VariantTypeEntity } from '../entities/index.js';
|
9
|
-
import { AliasTypeEntity, AliasTypeEntityDefinition, AliasedType,
|
9
|
+
import { AliasTypeEntity, AliasTypeEntityDefinition, AliasedType, AnonymousFunctionTypeEntity, AnonymousStructuredTypeEntity, BaseAspectTypes, BaseObjectType, ConstructorEntity, ConstructorEntityDefinition, DefaultConstructorEntityInfo, EntityHidingLevel, EntityKind, EntityNaming, EntityOwningSetter, FunctionEntityDefinition, GetterEntity, GetterEntityDefinition, IndexerEntity, IndexerEntityDefinition, InterfacePackageEntityInfo, MethodEntity, FunctionTypeEntityDefinition, PackageFunctionEntity, PackageFunctionTypeEntity, PackageStructuredTypeEntity, PackageVariableEntity, PackageVariantTypeEntity, ParameterVariableEntity, ParameterVariableEntityContainer, SetterEntity, SetterEntityDefinition, SpecialVariableEntityInfo, StructuredTypeEntityDefinition, SubstitutionApplicationMode, TypeEntityKind, TypeMemberEntityContainer, TypeParameterConstraint, TypeParameterEntity, TypeParameterEntityDefinition, FieldEntity, VariableEntityDefinition, VariantTypeEntityDefinition } from '../entities/index.js';
|
10
10
|
import { JavaScriptImplementationConfig, PackageName, PlatformKind, ProgramPackage } from '../project/index.js';
|
11
11
|
import * as tree from '../tree/index.js';
|
12
12
|
import * as types from '../types/index.js';
|
@@ -41,8 +41,8 @@ export declare class SourcePackageLoadedFromDtsEntity implements PackageEntity {
|
|
41
41
|
getImplementedInterfacePackage(): PackageEntity | undefined;
|
42
42
|
getSupportedPlatforms(): readonly PlatformKind[];
|
43
43
|
getPackageAliasTypeDeclarationEntity(node: tree.PackageAliasTypeDeclaration): AliasTypeEntity;
|
44
|
-
|
45
|
-
|
44
|
+
getPackageFunctionDeclarationEntity(node: tree.PackageFunctionDeclaration): PackageFunctionEntity;
|
45
|
+
getPackageFunctionTypeDeclarationEntity(node: tree.PackageFunctionTypeDeclaration): PackageFunctionTypeEntity;
|
46
46
|
getPackageStructuredTypeDeclarationEntity(node: tree.PackageStructuredTypeDeclaration): PackageStructuredTypeEntity;
|
47
47
|
getPackageVariableDeclarationEntity(node: tree.PackageVariableDeclaration): PackageVariableEntity;
|
48
48
|
getComputedPackageVariableDeclaration(node: tree.PackageVariableGetterDeclaration | tree.PackageVariableSetterDeclaration): PackageVariableEntity;
|
@@ -71,14 +71,14 @@ export declare class TsGlobalVariableEntity implements PackageVariableEntity {
|
|
71
71
|
getTags(): readonly Tag[];
|
72
72
|
private getDeclaration;
|
73
73
|
}
|
74
|
-
export declare class TsGlobalFunctionEntity implements
|
74
|
+
export declare class TsGlobalFunctionEntity implements PackageFunctionEntity {
|
75
75
|
private readonly _tsctx;
|
76
76
|
private readonly _symbol;
|
77
77
|
private readonly _isDefaultExport;
|
78
78
|
private readonly _declaration;
|
79
79
|
private readonly _containingPackage;
|
80
80
|
private readonly _forceHiddenInPackage;
|
81
|
-
readonly kind = EntityKind.
|
81
|
+
readonly kind = EntityKind.Function;
|
82
82
|
readonly subkind = "package";
|
83
83
|
private readonly _typeParameters;
|
84
84
|
private readonly _valueParameters;
|
@@ -89,7 +89,7 @@ export declare class TsGlobalFunctionEntity implements PackageMethodEntity {
|
|
89
89
|
getTypeParameters(): readonly TypeParameterEntity[];
|
90
90
|
getValueParameters(): readonly ParameterVariableEntity[];
|
91
91
|
getReturnType(): types.Type;
|
92
|
-
getDefinition():
|
92
|
+
getDefinition(): FunctionEntityDefinition;
|
93
93
|
isAsync(): boolean;
|
94
94
|
isHidden(): EntityHidingLevel | undefined;
|
95
95
|
getTags(): readonly Tag[];
|
@@ -289,13 +289,13 @@ export declare class SourceAndTsNamedTypeLiteralMergeEntity implements PackageSt
|
|
289
289
|
getTags(): readonly Tag[];
|
290
290
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
291
291
|
}
|
292
|
-
export declare class TsPropertyEntity implements
|
292
|
+
export declare class TsPropertyEntity implements FieldEntity {
|
293
293
|
private readonly _tsctx;
|
294
294
|
private readonly _symbol;
|
295
295
|
private readonly _containingType;
|
296
296
|
private readonly _forceStatic;
|
297
297
|
readonly kind = EntityKind.Variable;
|
298
|
-
readonly subkind = "
|
298
|
+
readonly subkind = "field";
|
299
299
|
private readonly _type;
|
300
300
|
private readonly _overriddenMembers;
|
301
301
|
constructor(_tsctx: TsInteropContext, _symbol: ts.Symbol, _containingType: TypeEntityWithMembers, _forceStatic: boolean);
|
@@ -317,13 +317,13 @@ export declare class TsPropertyEntity implements TypeVariableEntity {
|
|
317
317
|
isVariant(): boolean;
|
318
318
|
private getDeclaration;
|
319
319
|
}
|
320
|
-
export declare class TsAccessorEntity implements
|
320
|
+
export declare class TsAccessorEntity implements FieldEntity {
|
321
321
|
private readonly _tsctx;
|
322
322
|
private readonly _symbol;
|
323
323
|
private readonly _containingType;
|
324
324
|
private readonly _forceStatic;
|
325
325
|
readonly kind = EntityKind.Variable;
|
326
|
-
readonly subkind = "
|
326
|
+
readonly subkind = "field";
|
327
327
|
private readonly _type;
|
328
328
|
private readonly _getter;
|
329
329
|
private readonly _setter;
|
@@ -375,14 +375,14 @@ export declare class TsSetAccessorEntity implements SetterEntity {
|
|
375
375
|
isHidden(): EntityHidingLevel | undefined;
|
376
376
|
getTags(): readonly Tag[];
|
377
377
|
}
|
378
|
-
export declare class
|
378
|
+
export declare class TsFunctionEntity implements MethodEntity {
|
379
379
|
private readonly _tsctx;
|
380
380
|
private readonly _symbol;
|
381
381
|
private readonly _declaration;
|
382
382
|
private readonly _containingType;
|
383
383
|
private readonly _forceStatic;
|
384
|
-
readonly kind = EntityKind.
|
385
|
-
readonly subkind = "
|
384
|
+
readonly kind = EntityKind.Function;
|
385
|
+
readonly subkind = "method";
|
386
386
|
private readonly _typeParameters;
|
387
387
|
private readonly _valueParameters;
|
388
388
|
private readonly _returnType;
|
@@ -392,7 +392,7 @@ export declare class TsMethodEntity implements TypeMethodEntity {
|
|
392
392
|
getTypeParameters(): readonly TypeParameterEntity[];
|
393
393
|
getValueParameters(): readonly ParameterVariableEntity[];
|
394
394
|
getReturnType(): types.Type;
|
395
|
-
getDefinition():
|
395
|
+
getDefinition(): FunctionEntityDefinition;
|
396
396
|
getContainer(): TypeMemberEntityContainer;
|
397
397
|
isStatic(): boolean;
|
398
398
|
isRedefinable(): boolean;
|
@@ -403,16 +403,16 @@ export declare class TsMethodEntity implements TypeMethodEntity {
|
|
403
403
|
isHidden(): EntityHidingLevel | undefined;
|
404
404
|
getTags(): readonly Tag[];
|
405
405
|
getTypeParametersArity(): number;
|
406
|
-
|
406
|
+
isFunctionTypeInvokeMethod(): boolean;
|
407
407
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
408
408
|
getOverriddenMembers(): readonly types.Method[];
|
409
409
|
}
|
410
|
-
export declare class
|
410
|
+
export declare class TsIteratorFunctionEntity implements MethodEntity {
|
411
411
|
private readonly _tsctx;
|
412
412
|
private readonly _symbol;
|
413
413
|
private readonly _containingType;
|
414
|
-
readonly kind = EntityKind.
|
415
|
-
readonly subkind = "
|
414
|
+
readonly kind = EntityKind.Function;
|
415
|
+
readonly subkind = "method";
|
416
416
|
private readonly _returnType;
|
417
417
|
private readonly _overriddenMembers;
|
418
418
|
constructor(_tsctx: TsInteropContext, _symbol: ts.Symbol, _containingType: TypeEntityWithMembers);
|
@@ -420,7 +420,7 @@ export declare class TsIteratorMethodEntity implements TypeMethodEntity {
|
|
420
420
|
getTypeParameters(): readonly TypeParameterEntity[];
|
421
421
|
getValueParameters(): readonly ParameterVariableEntity[];
|
422
422
|
getReturnType(): types.Type;
|
423
|
-
getDefinition():
|
423
|
+
getDefinition(): FunctionEntityDefinition;
|
424
424
|
getContainer(): TypeMemberEntityContainer;
|
425
425
|
isStatic(): boolean;
|
426
426
|
isRedefinable(): boolean;
|
@@ -431,7 +431,7 @@ export declare class TsIteratorMethodEntity implements TypeMethodEntity {
|
|
431
431
|
isHidden(): EntityHidingLevel | undefined;
|
432
432
|
getTags(): readonly Tag[];
|
433
433
|
getTypeParametersArity(): number;
|
434
|
-
|
434
|
+
isFunctionTypeInvokeMethod(): boolean;
|
435
435
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
436
436
|
getOverriddenMembers(): readonly types.Method[];
|
437
437
|
private getFirstDeclaration;
|
@@ -561,12 +561,12 @@ export declare class TsEnumEntity implements PackageVariantTypeEntity {
|
|
561
561
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
562
562
|
getBaseObjectType(): BaseObjectType;
|
563
563
|
}
|
564
|
-
export declare class TsEnumMemberEntity implements
|
564
|
+
export declare class TsEnumMemberEntity implements FieldEntity {
|
565
565
|
private readonly _tsctx;
|
566
566
|
private readonly _symbol;
|
567
567
|
private readonly _variantTypeEntity;
|
568
568
|
readonly kind = EntityKind.Variable;
|
569
|
-
readonly subkind = "
|
569
|
+
readonly subkind = "field";
|
570
570
|
private readonly _type;
|
571
571
|
constructor(_tsctx: TsInteropContext, _symbol: ts.Symbol, _variantTypeEntity: VariantTypeEntity);
|
572
572
|
getContainer(): TypeMemberEntityContainer;
|
@@ -608,13 +608,13 @@ export declare class TsTypeAliasEntity implements AliasTypeEntity {
|
|
608
608
|
getSubstitutionApplicationMode(): SubstitutionApplicationMode;
|
609
609
|
private getDeclaration;
|
610
610
|
}
|
611
|
-
export declare class TsAnonymousFunctionTypeEntity implements
|
611
|
+
export declare class TsAnonymousFunctionTypeEntity implements AnonymousFunctionTypeEntity {
|
612
612
|
private readonly _tsctx;
|
613
613
|
private readonly _symbol;
|
614
614
|
private readonly _declaration;
|
615
615
|
private readonly _containingPackage;
|
616
616
|
readonly kind = EntityKind.Type;
|
617
|
-
readonly typeEntityKind = TypeEntityKind.
|
617
|
+
readonly typeEntityKind = TypeEntityKind.Function;
|
618
618
|
readonly subkind = "anonymous";
|
619
619
|
private readonly _valueParameters;
|
620
620
|
private readonly _returnType;
|
@@ -626,7 +626,7 @@ export declare class TsAnonymousFunctionTypeEntity implements AnonymousMethodTyp
|
|
626
626
|
getValueParameters(): readonly ParameterVariableEntity[];
|
627
627
|
getReturnType(): types.Type;
|
628
628
|
getMembers(): OriginalTypeEntityMembers;
|
629
|
-
getDefinition():
|
629
|
+
getDefinition(): FunctionTypeEntityDefinition;
|
630
630
|
isAsync(): boolean;
|
631
631
|
getArity(): number;
|
632
632
|
isHidden(): EntityHidingLevel | undefined;
|
@@ -646,7 +646,7 @@ export declare class TsAnonymousFunctionTypeEntity implements AnonymousMethodTyp
|
|
646
646
|
* type MyType = { (): number } // псевдоним типа с единственным членом - сигнатурой вызова
|
647
647
|
* ```
|
648
648
|
*/
|
649
|
-
export declare class TsNamedFunctionTypeEntity implements
|
649
|
+
export declare class TsNamedFunctionTypeEntity implements PackageFunctionTypeEntity {
|
650
650
|
private readonly _tsctx;
|
651
651
|
private readonly _signatureSymbol;
|
652
652
|
private readonly _signatureDeclaration;
|
@@ -656,7 +656,7 @@ export declare class TsNamedFunctionTypeEntity implements PackageMethodTypeEntit
|
|
656
656
|
private readonly _containingPackage;
|
657
657
|
private readonly _forceHiddenInPackage;
|
658
658
|
readonly kind = EntityKind.Type;
|
659
|
-
readonly typeEntityKind = TypeEntityKind.
|
659
|
+
readonly typeEntityKind = TypeEntityKind.Function;
|
660
660
|
readonly subkind = "package";
|
661
661
|
private readonly _typeParameters;
|
662
662
|
private readonly _valueParameters;
|
@@ -671,7 +671,7 @@ export declare class TsNamedFunctionTypeEntity implements PackageMethodTypeEntit
|
|
671
671
|
getValueParameters(): readonly ParameterVariableEntity[];
|
672
672
|
getReturnType(): types.Type;
|
673
673
|
getMembers(): OriginalTypeEntityMembers;
|
674
|
-
getDefinition():
|
674
|
+
getDefinition(): FunctionTypeEntityDefinition;
|
675
675
|
isAsync(): boolean;
|
676
676
|
getArity(): number;
|
677
677
|
isHidden(): EntityHidingLevel | undefined;
|
@@ -31,7 +31,7 @@ export declare class TsInteropContext {
|
|
31
31
|
getTypeMemberHiding(node: ts.Declaration | undefined, containingType: TypeEntity): EntityHidingLevel | undefined;
|
32
32
|
onPackageMembersCreated(pkg: PackageEntity, creationResult: TsPackageMembersCreationResult): void;
|
33
33
|
onTypeMembersCreated(type: TypeEntityWithMembers, creationResult: TsTypeMembersCreationResult): void;
|
34
|
-
|
34
|
+
ifTypeCanBeExpressedByFunctionTypeThenCallSignature(symbol: ts.Symbol): ts.Symbol | undefined;
|
35
35
|
getName(original: string, ownerKind: 'type' | 'variable' | 'method'): Name;
|
36
36
|
createDefaultExportTag(): Tag;
|
37
37
|
private getPackagesCreationResult;
|
@@ -59,7 +59,7 @@ export declare class TsPackageMembersCreator {
|
|
59
59
|
private createReplacementSourceEntities;
|
60
60
|
private getSourceEntity;
|
61
61
|
}
|
62
|
-
export type NamedPackageMemberDeclaration = tree.PackageAliasTypeDeclaration | tree.
|
62
|
+
export type NamedPackageMemberDeclaration = tree.PackageAliasTypeDeclaration | tree.PackageFunctionDeclaration | tree.PackageFunctionTypeDeclaration | tree.PackageStructuredTypeDeclaration | tree.PackageVariableDeclaration | tree.PackageVariableGetterDeclaration | tree.PackageVariableSetterDeclaration | tree.PackageVariantTypeDeclaration;
|
63
63
|
export declare class TsPackageMembersCreationResult {
|
64
64
|
readonly members: OriginalPackageMembers;
|
65
65
|
readonly typeEntityBySymbol: ReadonlyMap<ts.Symbol, TypeEntity>;
|
@@ -30,7 +30,7 @@ export declare class TsTypeMembersCreator {
|
|
30
30
|
* @param symbol (symbol.flags & ts.SymbolFlags.Method) !== 0
|
31
31
|
*/
|
32
32
|
private createMethods;
|
33
|
-
private
|
33
|
+
private createFunctionEntityNoReplacement;
|
34
34
|
private createConstructors;
|
35
35
|
private createIndexerSignatures;
|
36
36
|
private registerTypeParameters;
|
@@ -1,19 +1,19 @@
|
|
1
1
|
import { Analyzer } from '../analysis/index.js';
|
2
|
-
import {
|
2
|
+
import { FunctionTypeEntity, TypeParameterEntity } from '../entities/index.js';
|
3
3
|
import { IType, SubstitutionMap, Substitutions, Type, ValueParameter } from './index.js';
|
4
|
-
export declare class
|
4
|
+
export declare class FunctionType implements IType {
|
5
5
|
private readonly _analyzer;
|
6
6
|
private readonly _entity;
|
7
7
|
private readonly _substitutions;
|
8
|
-
readonly kind = "
|
8
|
+
readonly kind = "function";
|
9
9
|
private readonly _valueParameters;
|
10
10
|
get debuggerDisplay(): string;
|
11
|
-
constructor(_analyzer: Analyzer, _entity:
|
11
|
+
constructor(_analyzer: Analyzer, _entity: FunctionTypeEntity, _substitutions: Substitutions);
|
12
12
|
getTypeParameters(): readonly TypeParameterEntity[];
|
13
13
|
getSubstitutions(): Substitutions;
|
14
|
-
applySubstitutions(map: SubstitutionMap):
|
14
|
+
applySubstitutions(map: SubstitutionMap): FunctionType;
|
15
15
|
equals(other: Type): boolean;
|
16
|
-
getEntity():
|
16
|
+
getEntity(): FunctionTypeEntity;
|
17
17
|
isAsync(): boolean;
|
18
18
|
getReturnType(): Type;
|
19
19
|
getValueParameters(): readonly ValueParameter[];
|
@@ -19,7 +19,7 @@ export declare class StandardTypes {
|
|
19
19
|
private _reference;
|
20
20
|
private _task;
|
21
21
|
private _error;
|
22
|
-
private
|
22
|
+
private _func;
|
23
23
|
constructor(_analyzer: Analyzer);
|
24
24
|
get refObject(): StructuredType;
|
25
25
|
get plainObject(): StructuredType;
|
@@ -38,5 +38,5 @@ export declare class StandardTypes {
|
|
38
38
|
get reference(): StructuredType;
|
39
39
|
get task(): StructuredType;
|
40
40
|
get error(): StructuredType;
|
41
|
-
get
|
41
|
+
get func(): StructuredType;
|
42
42
|
}
|
@@ -1,13 +1,13 @@
|
|
1
1
|
import { TypeEntity } from '../entities/index.js';
|
2
2
|
import { AliasType } from './AliasType.js';
|
3
3
|
import { IntersectionType } from './IntersectionType.js';
|
4
|
-
import {
|
4
|
+
import { FunctionType } from './FunctionType.js';
|
5
5
|
import { ParameterType } from './ParameterType.js';
|
6
6
|
import { StructuredType } from './StructuredType.js';
|
7
7
|
import { UnresolvedType } from './UnresolvedType.js';
|
8
8
|
import { VariantType } from './VariantType.js';
|
9
9
|
import { SubstitutionMap, Substitutions, UnionType } from './index.js';
|
10
|
-
export type Type = StructuredType | VariantType |
|
10
|
+
export type Type = StructuredType | VariantType | FunctionType | AliasType | UnresolvedType | ParameterType | UnionType | IntersectionType;
|
11
11
|
export interface IType {
|
12
12
|
getSubstitutions(): Substitutions;
|
13
13
|
applySubstitutions(map: SubstitutionMap): Type;
|
@@ -1,19 +1,18 @@
|
|
1
1
|
import { Analyzer } from '../analysis/index.js';
|
2
|
-
import { AliasTypeEntity,
|
3
|
-
import { AliasType,
|
2
|
+
import { AliasTypeEntity, FunctionTypeEntity, StructuredTypeEntity, TypeParameterEntity, VariantTypeEntity } from '../entities/index.js';
|
3
|
+
import { AliasType, FunctionType, ParameterType, StructuredType, Substitutions, Type, UnresolvedType, VariantType } from './index.js';
|
4
4
|
export declare class TypeFactory {
|
5
5
|
readonly analyzer: Analyzer;
|
6
6
|
constructor(analyzer: Analyzer);
|
7
7
|
getStructuredType(entity: StructuredTypeEntity, substitutions: Substitutions): StructuredType;
|
8
8
|
getParameterType(entity: TypeParameterEntity, excludeNone: boolean): ParameterType;
|
9
9
|
getVariantType(entity: VariantTypeEntity, substitutions: Substitutions): VariantType;
|
10
|
-
|
10
|
+
getFunctionType(entity: FunctionTypeEntity, substitutions: Substitutions): FunctionType;
|
11
11
|
getAliasType(entity: AliasTypeEntity, substitutions: Substitutions): AliasType;
|
12
|
-
getUnionType(types: readonly Type[],
|
13
|
-
getIntersectionType(types: readonly Type[],
|
12
|
+
getUnionType(types: readonly Type[], reduce?: boolean): Type;
|
13
|
+
getIntersectionType(types: readonly Type[], reduce?: boolean): Type;
|
14
14
|
getUnresolvedType(): UnresolvedType;
|
15
|
-
private
|
16
|
-
private excludeDuplicateTypesComparingWithEqualsMethod;
|
15
|
+
private flattenAndExcludeDuplicateTypes;
|
17
16
|
private removeBaseTypes;
|
18
17
|
private removeDerivedTypes;
|
19
18
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { Analyzer } from '../analysis/index.js';
|
2
2
|
import { Name } from '../common/index.js';
|
3
|
-
import { ConstructorEntity, DereferenceOperatorEntity, DestructorEntity, EntityHidingLevel, IndexerEntity, OperatorEntity, OperatorKind, ParameterVariableEntity,
|
4
|
-
import {
|
3
|
+
import { ConstructorEntity, DereferenceOperatorEntity, DestructorEntity, EntityHidingLevel, IndexerEntity, OperatorEntity, OperatorKind, ParameterVariableEntity, MethodEntity, TypeParameterEntity, FieldEntity } from '../entities/index.js';
|
4
|
+
import { FunctionType } from './FunctionType.js';
|
5
5
|
import { Substitutions } from './Substitutions.js';
|
6
6
|
import { Type } from './Type.js';
|
7
7
|
export type TypeMember = Variable | Method | Operator | Constructor | Destructor | Indexer | DereferenceOperator;
|
@@ -13,14 +13,14 @@ export declare class Method implements ITypeMember {
|
|
13
13
|
readonly kind = "method";
|
14
14
|
private readonly _valueParameters;
|
15
15
|
private readonly _signatureEntity;
|
16
|
-
constructor(_analyzer: Analyzer, _entity:
|
16
|
+
constructor(_analyzer: Analyzer, _entity: MethodEntity, _substitutions: Substitutions);
|
17
17
|
getName(): Name;
|
18
18
|
getTypeParameters(): readonly TypeParameterEntity[];
|
19
19
|
getValueParameters(): readonly ValueParameter[];
|
20
20
|
getReturnType(): Type;
|
21
|
-
getEntity():
|
21
|
+
getEntity(): MethodEntity;
|
22
22
|
getSubstitutions(): Substitutions;
|
23
|
-
getSignatureType():
|
23
|
+
getSignatureType(): FunctionType;
|
24
24
|
isAsync(): boolean;
|
25
25
|
isHidden(): EntityHidingLevel | undefined;
|
26
26
|
isStatic(): boolean;
|
@@ -43,10 +43,10 @@ export declare class Variable implements ITypeMember {
|
|
43
43
|
private readonly _entity;
|
44
44
|
private readonly _substitutions;
|
45
45
|
readonly kind = "variable";
|
46
|
-
constructor(_entity:
|
46
|
+
constructor(_entity: FieldEntity, _substitutions: Substitutions);
|
47
47
|
getName(): Name;
|
48
48
|
getType(): Type;
|
49
|
-
getEntity():
|
49
|
+
getEntity(): FieldEntity;
|
50
50
|
getSubstitutions(): Substitutions;
|
51
51
|
isConstant(): boolean;
|
52
52
|
isHidden(): EntityHidingLevel | undefined;
|
@@ -68,7 +68,7 @@ export declare class Operator implements ITypeMember {
|
|
68
68
|
getReturnType(): Type;
|
69
69
|
getEntity(): OperatorEntity;
|
70
70
|
getSubstitutions(): Substitutions;
|
71
|
-
getSignatureType():
|
71
|
+
getSignatureType(): FunctionType;
|
72
72
|
isHidden(): EntityHidingLevel | undefined;
|
73
73
|
isStatic(): boolean;
|
74
74
|
applySubstitutions(substitutions: Substitutions): Operator;
|
package/package.json
CHANGED
@@ -1,53 +0,0 @@
|
|
1
|
-
import { Name } from '../common/index.js';
|
2
|
-
import { MethodEntity, ParameterVariableEntity, TypeParameterEntity } from '../entities/index.js';
|
3
|
-
import * as types from '../types/index.js';
|
4
|
-
import { Analyzer } from './Analyzer.js';
|
5
|
-
import { SubstitutedMethod } from './SubstitutedMethod.js';
|
6
|
-
export type AccessedMethod = AccessedMethod_entity | AccessedMethod_typeMember | AccessedMethod_substitutedMethod;
|
7
|
-
export declare class AccessedMethod_entity implements IAccessedMethod {
|
8
|
-
readonly value: MethodEntity;
|
9
|
-
readonly kind = "entity";
|
10
|
-
constructor(value: MethodEntity);
|
11
|
-
getTypeParameters(): readonly TypeParameterEntity[];
|
12
|
-
getValueParameters(): readonly AccessedMethodValueParameter[];
|
13
|
-
getReturnType(): types.Type;
|
14
|
-
getEntity(): MethodEntity;
|
15
|
-
getName(): Name;
|
16
|
-
getSignatureType(analyzer: Analyzer): types.MethodType;
|
17
|
-
}
|
18
|
-
export declare class AccessedMethod_typeMember implements IAccessedMethod {
|
19
|
-
readonly value: types.Method;
|
20
|
-
readonly kind = "type-member";
|
21
|
-
constructor(value: types.Method);
|
22
|
-
getTypeParameters(): readonly TypeParameterEntity[];
|
23
|
-
getValueParameters(): readonly AccessedMethodValueParameter[];
|
24
|
-
getReturnType(): types.Type;
|
25
|
-
getEntity(): MethodEntity;
|
26
|
-
getName(): Name;
|
27
|
-
getSignatureType(_analyzer: Analyzer): types.MethodType;
|
28
|
-
}
|
29
|
-
export declare class AccessedMethod_substitutedMethod implements IAccessedMethod {
|
30
|
-
readonly value: SubstitutedMethod;
|
31
|
-
readonly kind = "substituted-method";
|
32
|
-
constructor(value: SubstitutedMethod);
|
33
|
-
getTypeParameters(): readonly TypeParameterEntity[];
|
34
|
-
getValueParameters(): readonly AccessedMethodValueParameter[];
|
35
|
-
getReturnType(): types.Type;
|
36
|
-
getEntity(): MethodEntity;
|
37
|
-
getName(): Name;
|
38
|
-
getSignatureType(_analyzer: Analyzer): types.MethodType;
|
39
|
-
}
|
40
|
-
export declare class AccessedMethodValueParameter {
|
41
|
-
readonly entity: ParameterVariableEntity;
|
42
|
-
readonly type: types.Type;
|
43
|
-
constructor(entity: ParameterVariableEntity, type: types.Type);
|
44
|
-
}
|
45
|
-
interface IAccessedMethod {
|
46
|
-
getTypeParameters(): readonly TypeParameterEntity[];
|
47
|
-
getValueParameters(): readonly AccessedMethodValueParameter[];
|
48
|
-
getReturnType(): types.Type;
|
49
|
-
getEntity(): MethodEntity;
|
50
|
-
getName(): Name;
|
51
|
-
getSignatureType(analyzer: Analyzer): types.MethodType;
|
52
|
-
}
|
53
|
-
export {};
|