@artel/artc 0.6.25223 → 0.6.25224
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 +6 -2
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +627 -498
- package/build/{chunk-DZNNWICP.js → chunk-24QZJOMF.js} +4575 -3937
- package/build/{chunk-AX3LQ2CF.js → chunk-62KHK23H.js} +2 -2
- package/build/{chunk-LG4Z4SWO.js → chunk-Y6DODJCG.js} +1 -1
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +1 -0
- package/build/types/analysis/Analyzer.d.ts +11 -5
- package/build/types/analysis/DiagnosticCollector.d.ts +1 -1
- package/build/types/analysis/ImportedPackageNameTree.d.ts +1 -0
- package/build/types/analysis/NamedTypeResolver.d.ts +5 -1
- package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +4 -1
- package/build/types/analysis/PropertyAccessExpressionMeaning.d.ts +8 -2
- package/build/types/analysis/TagMeaning.d.ts +4 -1
- package/build/types/analysis/TypeNarrower.d.ts +21 -21
- package/build/types/analysis/Utils.d.ts +12 -0
- 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/common/HelperPhrases.d.ts +3 -2
- package/build/types/diagnostic/DiagnosticCode.d.ts +5 -5
- package/build/types/emitter/Entities.d.ts +5 -4
- package/build/types/emitter/ir/Nodes.d.ts +2 -2
- package/build/types/services/CompletionService.d.ts +0 -1
- package/build/types/services/DisplayService.d.ts +11 -8
- package/build/types/services/NodeSemanticInfo.d.ts +11 -6
- package/build/types/services/source-generation/EntityToSyntax.d.ts +1 -0
- package/build/types/tree/NodeKind.d.ts +146 -144
- package/build/types/tree/green/Nodes.d.ts +24 -5
- package/build/types/tree/green/SyntaxFactory.d.ts +1 -0
- package/build/types/tree/green/SyntaxToCode.d.ts +5 -1
- package/build/types/tree/red/Nodes.d.ts +30 -5
- package/build/types/ts-interop/TsInteropContext.d.ts +1 -0
- package/build/types/types/IntersectionType.d.ts +20 -0
- package/build/types/types/ParameterType.d.ts +6 -3
- package/build/types/types/Type.d.ts +2 -1
- package/build/types/types/TypeFactory.d.ts +4 -1
- package/build/types/types/index.d.ts +1 -0
- package/package.json +1 -1
- package/build/types/analysis/ControlFlowGraphBuilder.d.ts +0 -129
@@ -1,4 +1,5 @@
|
|
1
1
|
import { AccessedMethod } from '../analysis/AccessedMethod.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
5
|
import { SubstitutedMethod } from '../analysis/SubstitutedMethod.js';
|
@@ -19,6 +20,7 @@ export declare class DisplayService {
|
|
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
26
|
displayMethodDeclaration(method: MethodDeclaration): string;
|
@@ -52,11 +54,11 @@ export declare class DisplayService {
|
|
52
54
|
private displayMethodTypeUsage;
|
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
|
}
|
@@ -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 | MethodTypeUsage | AliasTypeUsage | ParameterTypeUsage |
|
619
|
+
export type TypeUsage = StructuredTypeUsage | VariantTypeUsage | MethodTypeUsage | 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;
|
@@ -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
|
}
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { AccessedMethod } from '../analysis/AccessedMethod.js';
|
2
2
|
import { MatchResultValueParameter } from '../analysis/ArgumentToParameterMatchResult.js';
|
3
|
+
import { PackageNameTreeNode } from '../analysis/ImportedPackageNameTree.js';
|
4
|
+
import { Analyzer } from '../analysis/index.js';
|
3
5
|
import { Translation, WithLocalization } from '../analysis/Localization.js';
|
4
6
|
import { TypeIndexedAccessorDeclaration } from '../analysis/NodeTypeUtils.js';
|
5
|
-
import { Analyzer } from '../analysis/index.js';
|
6
7
|
import { AccessKind, ReadonlyNonEmptyArray } from '../common/index.js';
|
7
|
-
import { AliasTypeEntity, Entity, MethodEntity, MethodTypeEntity,
|
8
|
+
import { AliasTypeEntity, Entity, MethodEntity, MethodTypeEntity, 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';
|
@@ -53,15 +54,14 @@ 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 | TypeVariableReferenceTarget | TypeValueParameterReferenceTarget | TypeConstructorReferenceTarget | OperatorReferenceTarget | TypeDereferenceOperatorReferenceTarget | AccessedMethodReferenceTarget | TypeIndexerReferenceTarget | MatchResultValueParameterReferenceTarget | PackageReferenceTarget | TypeContextReferenceTarget;
|
57
|
+
export type ReferenceTarget = EntityReferenceTarget | TypeVariableReferenceTarget | TypeValueParameterReferenceTarget | TypeConstructorReferenceTarget | OperatorReferenceTarget | TypeDereferenceOperatorReferenceTarget | AccessedMethodReferenceTarget | TypeIndexerReferenceTarget | 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 type ReferencedEntity = VariableEntity | VariantTypeEntity | MethodEntity | TypeParameterEntity | MethodTypeEntity | StructuredTypeEntity | PackageAliasEntity | AliasTypeEntity;
|
65
65
|
export declare class TypeVariableReferenceTarget {
|
66
66
|
readonly variable: types.Variable;
|
67
67
|
readonly accessKind: AccessKind;
|
@@ -107,6 +107,11 @@ 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';
|
@@ -12,148 +12,150 @@ export declare enum NodeKind {
|
|
12
12
|
NamedTypeSpecifier = 10,
|
13
13
|
UnionTypeSpecifier = 11,
|
14
14
|
UnionTypeSpecifierTypeList = 12,
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
15
|
+
IntersectionTypeSpecifier = 13,
|
16
|
+
IntersectionTypeSpecifierTypeList = 14,
|
17
|
+
ParenthesizedTypeSpecifier = 15,
|
18
|
+
NullableTypeSpecifier = 16,
|
19
|
+
AnonymousTypeSpecifier = 17,
|
20
|
+
InvalidTypeSpecifier = 18,
|
21
|
+
AnonymousMethodTypeDeclaration = 19,
|
22
|
+
AnonymousStructuredTypeDeclaration = 20,
|
23
|
+
AnonymousVariantTypeDeclaration = 21,
|
24
|
+
TopLevelTranslationList = 22,
|
25
|
+
TranslationsDeclaration = 23,
|
26
|
+
PackageAliasTypeDeclaration = 24,
|
27
|
+
AliasTypeDeclarationBody = 25,
|
28
|
+
PackageMemberGroupDeclaration = 26,
|
29
|
+
PackageConstructorDeclaration = 27,
|
30
|
+
PackageEntryPointDeclaration = 28,
|
31
|
+
PackageMethodDeclaration = 29,
|
32
|
+
PackageMethodTypeDeclaration = 30,
|
33
|
+
MethodTypeDeclarationBody = 31,
|
34
|
+
BaseTypeList = 32,
|
35
|
+
TypeMemberDeclarationList = 33,
|
36
|
+
TypeMemberDeclarationBlock = 34,
|
37
|
+
PackageStructuredTypeDeclaration = 35,
|
38
|
+
StructuredTypeDeclarationBody = 36,
|
39
|
+
PackageVariableDeclaration = 37,
|
40
|
+
PackageVariableGetterDeclaration = 38,
|
41
|
+
PackageVariableSetterDeclaration = 39,
|
42
|
+
PackageVariantTypeDeclaration = 40,
|
43
|
+
VariantTypeDeclarationBody = 41,
|
44
|
+
TypeExtensionDeclaration = 42,
|
45
|
+
ExtendedTypeClauseCommaList = 43,
|
46
|
+
ExtendedTypeClause = 44,
|
47
|
+
InvalidPackageMemberDeclaration = 45,
|
48
|
+
TypeMemberGroupDeclaration = 46,
|
49
|
+
TypeConstructorDeclaration = 47,
|
50
|
+
TypeDestructorDeclaration = 48,
|
51
|
+
TypeIndexedGetterDeclaration = 49,
|
52
|
+
TypeIndexedSetterDeclaration = 50,
|
53
|
+
TypeIndexerParameterClause = 51,
|
54
|
+
TypeDereferencedVariableGetterDeclaration = 52,
|
55
|
+
TypeDereferencedVariableSetterDeclaration = 53,
|
56
|
+
TypeMethodDeclaration = 54,
|
57
|
+
OperatorDeclaration = 55,
|
58
|
+
TypeVariableDeclaration = 56,
|
59
|
+
TypeVariableGetterDeclaration = 57,
|
60
|
+
TypeVariableSetterDeclaration = 58,
|
61
|
+
InvalidTypeMemberDeclaration = 59,
|
62
|
+
NestedMethodDeclaration = 60,
|
63
|
+
LocalVariableDeclaration = 61,
|
64
|
+
EnumerationVariableDeclaration = 62,
|
65
|
+
ArrayLiteral = 63,
|
66
|
+
ArrayLiteralElementList = 64,
|
67
|
+
AssertionExpression = 65,
|
68
|
+
AssumptionExpression = 66,
|
69
|
+
AsExpression = 67,
|
70
|
+
BinaryExpression = 68,
|
71
|
+
MethodBlockLiteral = 69,
|
72
|
+
ArgumentList = 70,
|
73
|
+
CallExpression = 71,
|
74
|
+
AutotypeCallExpression = 72,
|
75
|
+
IndexedAccessExpression = 73,
|
76
|
+
InvalidExpression = 74,
|
77
|
+
IsExpression = 75,
|
78
|
+
MethodLiteral = 76,
|
79
|
+
ParenthesizedExpression = 77,
|
80
|
+
WhenTernaryExpression = 78,
|
81
|
+
PrefixUnaryExpression = 79,
|
82
|
+
PropertyAccessExpression = 80,
|
83
|
+
ReferenceExpression = 81,
|
84
|
+
DereferenceExpression = 82,
|
85
|
+
TextTemplateLiteral = 83,
|
86
|
+
TextTemplateSpanList = 84,
|
87
|
+
TextTemplateSpan = 85,
|
88
|
+
TokenExpression = 86,
|
89
|
+
KeywordExpression = 87,
|
90
|
+
ObjectExpression = 88,
|
91
|
+
BaseExpression = 89,
|
92
|
+
IdentifierExpression = 90,
|
93
|
+
GenericSpecializationExpression = 91,
|
94
|
+
DefaultMatchExpression = 92,
|
95
|
+
AssignmentStatement = 93,
|
96
|
+
StatementList = 94,
|
97
|
+
StatementBlock = 95,
|
98
|
+
FunctionBlock = 96,
|
99
|
+
BreakLoopStatement = 97,
|
100
|
+
ContinueLoopStatement = 98,
|
101
|
+
DisposeStatement = 99,
|
102
|
+
RunStatement = 100,
|
103
|
+
TryStatement = 101,
|
104
|
+
CatchClause = 102,
|
105
|
+
ErrorVariableDeclaration = 103,
|
106
|
+
FinallyClause = 104,
|
107
|
+
EmptyStatement = 105,
|
108
|
+
ErrorStatement = 106,
|
109
|
+
ImportantStatement = 107,
|
110
|
+
ExpressionStatement = 108,
|
111
|
+
EnumerationVariableList = 109,
|
112
|
+
ForStatement = 110,
|
113
|
+
IfStatement = 111,
|
114
|
+
ElseIfClauseList = 112,
|
115
|
+
ElseIfClause = 113,
|
116
|
+
ElseClause = 114,
|
117
|
+
InvalidStatement = 115,
|
118
|
+
NestedMethodDeclarationStatement = 116,
|
119
|
+
LocalVariableDeclarationStatement = 117,
|
120
|
+
LoopStatement = 118,
|
121
|
+
ReturnStatement = 119,
|
122
|
+
CaseClauseList = 120,
|
123
|
+
SwitchStatement = 121,
|
124
|
+
MatchExpressionList = 122,
|
125
|
+
CaseClause = 123,
|
126
|
+
WhileStatement = 124,
|
127
|
+
YieldStatement = 125,
|
128
|
+
TranslationParameterList = 126,
|
129
|
+
TranslationParameterClause = 127,
|
130
|
+
ConstructorTranslation = 128,
|
131
|
+
IndexerTranslationParameterClause = 129,
|
132
|
+
IndexerTranslation = 130,
|
133
|
+
TranslationTypeParameterList = 131,
|
134
|
+
TranslationTypeParameterClause = 132,
|
135
|
+
PackageMethodTranslation = 133,
|
136
|
+
TypeMethodTranslation = 134,
|
137
|
+
MethodTypeTranslation = 135,
|
138
|
+
PackageImportTranslation = 136,
|
139
|
+
QualifiedName = 137,
|
140
|
+
PackageVariableTranslation = 138,
|
141
|
+
TypeVariableOrVariantTranslation = 139,
|
142
|
+
TypeMemberTranslationList = 140,
|
143
|
+
TypeTranslation = 141,
|
144
|
+
TextLiteralTranslation = 142,
|
145
|
+
TextTemplateLiteralTranslation = 143,
|
146
|
+
VariantDeclaration = 144,
|
147
|
+
TypeParameterDeclaration = 145,
|
148
|
+
ParameterDeclaration = 146,
|
149
|
+
Argument = 147,
|
150
|
+
TagList = 148,
|
151
|
+
Tag = 149,
|
152
|
+
ModifierList = 150,
|
153
|
+
Modifier = 151,
|
154
|
+
ParameterClause = 152,
|
155
|
+
ParameterList = 153,
|
156
|
+
TypeArgumentClause = 154,
|
157
|
+
TypeArgumentList = 155,
|
158
|
+
TypeParameterClause = 156,
|
159
|
+
TypeParameterList = 157,
|
160
|
+
TypeAnnotation = 158
|
159
161
|
}
|
@@ -111,7 +111,7 @@ export declare class PackagePath extends BaseNode {
|
|
111
111
|
constructor(parts: readonly PackagePathPart[]);
|
112
112
|
toRed(rangeStart: number, parent: red.PackagePathParent): red.PackagePath;
|
113
113
|
}
|
114
|
-
export type TypeSpecifier = NamedTypeSpecifier | AnonymousTypeSpecifier | UnionTypeSpecifier | ParenthesizedTypeSpecifier | NullableTypeSpecifier | InvalidTypeSpecifier;
|
114
|
+
export type TypeSpecifier = NamedTypeSpecifier | AnonymousTypeSpecifier | UnionTypeSpecifier | IntersectionTypeSpecifier | ParenthesizedTypeSpecifier | NullableTypeSpecifier | InvalidTypeSpecifier;
|
115
115
|
export declare class NamedTypeSpecifier extends BaseNode {
|
116
116
|
readonly kind = NodeKind.NamedTypeSpecifier;
|
117
117
|
readonly children: readonly [
|
@@ -143,6 +143,25 @@ export declare class UnionTypeSpecifierTypeList extends BaseNode {
|
|
143
143
|
constructor(elements: readonly UnionTypeSpecifierTypeListElement[]);
|
144
144
|
toRed(rangeStart: number, parent: red.UnionTypeSpecifierTypeListParent): red.UnionTypeSpecifierTypeList;
|
145
145
|
}
|
146
|
+
export declare class IntersectionTypeSpecifier extends BaseNode {
|
147
|
+
readonly kind = NodeKind.IntersectionTypeSpecifier;
|
148
|
+
readonly children: readonly [
|
149
|
+
IntersectionTypeSpecifierTypeList
|
150
|
+
];
|
151
|
+
get typeList(): IntersectionTypeSpecifierTypeList;
|
152
|
+
protected get thisAsNode(): Node;
|
153
|
+
constructor(typeList: IntersectionTypeSpecifierTypeList);
|
154
|
+
toRed(rangeStart: number, parent: red.NonNamedTypeSpecifierParent): red.IntersectionTypeSpecifier;
|
155
|
+
}
|
156
|
+
export type IntersectionTypeSpecifierTypeListElement = TypeSpecifier | Token<TokenKind.Ampersand>;
|
157
|
+
export declare class IntersectionTypeSpecifierTypeList extends BaseNode {
|
158
|
+
readonly kind = NodeKind.IntersectionTypeSpecifierTypeList;
|
159
|
+
readonly children: readonly IntersectionTypeSpecifierTypeListElement[];
|
160
|
+
get elements(): readonly IntersectionTypeSpecifierTypeListElement[];
|
161
|
+
protected get thisAsNode(): Node;
|
162
|
+
constructor(elements: readonly IntersectionTypeSpecifierTypeListElement[]);
|
163
|
+
toRed(rangeStart: number, parent: red.IntersectionTypeSpecifierTypeListParent): red.IntersectionTypeSpecifierTypeList;
|
164
|
+
}
|
146
165
|
export declare class ParenthesizedTypeSpecifier extends BaseNode {
|
147
166
|
readonly kind = NodeKind.ParenthesizedTypeSpecifier;
|
148
167
|
readonly children: readonly [
|
@@ -1465,12 +1484,12 @@ export declare class ErrorStatement extends BaseNode {
|
|
1465
1484
|
readonly kind = NodeKind.ErrorStatement;
|
1466
1485
|
readonly children: readonly [
|
1467
1486
|
Keyword<KeywordKind.Error>,
|
1468
|
-
Expression
|
1487
|
+
Expression
|
1469
1488
|
];
|
1470
1489
|
get errorKeyword(): Keyword<KeywordKind.Error>;
|
1471
|
-
get expression(): Expression
|
1490
|
+
get expression(): Expression;
|
1472
1491
|
protected get thisAsNode(): Node;
|
1473
|
-
constructor(errorKeyword: Keyword<KeywordKind.Error>, expression: Expression
|
1492
|
+
constructor(errorKeyword: Keyword<KeywordKind.Error>, expression: Expression);
|
1474
1493
|
toRed(rangeStart: number, parent: red.ErrorStatementParent): red.ErrorStatement;
|
1475
1494
|
}
|
1476
1495
|
export declare class ImportantStatement extends BaseNode {
|
@@ -2184,4 +2203,4 @@ export declare class TypeAnnotation extends BaseNode {
|
|
2184
2203
|
constructor(colonToken: Token<TokenKind.Colon>, typeSpecifier: TypeSpecifier);
|
2185
2204
|
toRed(rangeStart: number, parent: red.TypeAnnotationParent): red.TypeAnnotation;
|
2186
2205
|
}
|
2187
|
-
export type Node = SourceFile | PackageMemberDeclarationList | Keyword | PackageImportDirectiveList | SinglePackageImportDirective | PackageGroupImportDirective | PackageImportList | PackageImport | PackagePath | NamedTypeSpecifier | UnionTypeSpecifier | UnionTypeSpecifierTypeList | ParenthesizedTypeSpecifier | NullableTypeSpecifier | AnonymousTypeSpecifier | InvalidTypeSpecifier | AnonymousMethodTypeDeclaration | AnonymousStructuredTypeDeclaration | AnonymousVariantTypeDeclaration | TopLevelTranslationList | TranslationsDeclaration | PackageAliasTypeDeclaration | AliasTypeDeclarationBody | PackageMemberGroupDeclaration | PackageConstructorDeclaration | PackageEntryPointDeclaration | PackageMethodDeclaration | PackageMethodTypeDeclaration | MethodTypeDeclarationBody | BaseTypeList | TypeMemberDeclarationList | TypeMemberDeclarationBlock | PackageStructuredTypeDeclaration | StructuredTypeDeclarationBody | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageVariantTypeDeclaration | VariantTypeDeclarationBody | TypeExtensionDeclaration | ExtendedTypeClauseCommaList | ExtendedTypeClause | InvalidPackageMemberDeclaration | TypeMemberGroupDeclaration | TypeConstructorDeclaration | TypeDestructorDeclaration | TypeIndexedGetterDeclaration | TypeIndexedSetterDeclaration | TypeIndexerParameterClause | TypeDereferencedVariableGetterDeclaration | TypeDereferencedVariableSetterDeclaration | TypeMethodDeclaration | OperatorDeclaration | TypeVariableDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | InvalidTypeMemberDeclaration | NestedMethodDeclaration | LocalVariableDeclaration | EnumerationVariableDeclaration | ArrayLiteral | ArrayLiteralElementList | AssertionExpression | AssumptionExpression | AsExpression | BinaryExpression | MethodBlockLiteral | ArgumentList | CallExpression | AutotypeCallExpression | IndexedAccessExpression | InvalidExpression | IsExpression | MethodLiteral | ParenthesizedExpression | WhenTernaryExpression | PrefixUnaryExpression | PropertyAccessExpression | ReferenceExpression | DereferenceExpression | TextTemplateLiteral | TextTemplateSpanList | TextTemplateSpan | TokenExpression | KeywordExpression | ObjectExpression | BaseExpression | IdentifierExpression | GenericSpecializationExpression | DefaultMatchExpression | AssignmentStatement | StatementList | StatementBlock | FunctionBlock | BreakLoopStatement | ContinueLoopStatement | DisposeStatement | RunStatement | TryStatement | CatchClause | ErrorVariableDeclaration | FinallyClause | EmptyStatement | ErrorStatement | ImportantStatement | ExpressionStatement | EnumerationVariableList | ForStatement | IfStatement | ElseIfClauseList | ElseIfClause | ElseClause | InvalidStatement | NestedMethodDeclarationStatement | LocalVariableDeclarationStatement | LoopStatement | ReturnStatement | CaseClauseList | SwitchStatement | MatchExpressionList | CaseClause | WhileStatement | YieldStatement | TranslationParameterList | TranslationParameterClause | ConstructorTranslation | IndexerTranslationParameterClause | IndexerTranslation | TranslationTypeParameterList | TranslationTypeParameterClause | PackageMethodTranslation | TypeMethodTranslation | MethodTypeTranslation | PackageImportTranslation | QualifiedName | PackageVariableTranslation | TypeVariableOrVariantTranslation | TypeMemberTranslationList | TypeTranslation | TextLiteralTranslation | TextTemplateLiteralTranslation | VariantDeclaration | TypeParameterDeclaration | ParameterDeclaration | Argument | TagList | Tag | ModifierList | Modifier | ParameterClause | ParameterList | TypeArgumentClause | TypeArgumentList | TypeParameterClause | TypeParameterList | TypeAnnotation | Token;
|
2206
|
+
export type Node = SourceFile | PackageMemberDeclarationList | Keyword | PackageImportDirectiveList | SinglePackageImportDirective | PackageGroupImportDirective | PackageImportList | PackageImport | PackagePath | NamedTypeSpecifier | UnionTypeSpecifier | UnionTypeSpecifierTypeList | IntersectionTypeSpecifier | IntersectionTypeSpecifierTypeList | ParenthesizedTypeSpecifier | NullableTypeSpecifier | AnonymousTypeSpecifier | InvalidTypeSpecifier | AnonymousMethodTypeDeclaration | AnonymousStructuredTypeDeclaration | AnonymousVariantTypeDeclaration | TopLevelTranslationList | TranslationsDeclaration | PackageAliasTypeDeclaration | AliasTypeDeclarationBody | PackageMemberGroupDeclaration | PackageConstructorDeclaration | PackageEntryPointDeclaration | PackageMethodDeclaration | PackageMethodTypeDeclaration | MethodTypeDeclarationBody | BaseTypeList | TypeMemberDeclarationList | TypeMemberDeclarationBlock | PackageStructuredTypeDeclaration | StructuredTypeDeclarationBody | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageVariantTypeDeclaration | VariantTypeDeclarationBody | TypeExtensionDeclaration | ExtendedTypeClauseCommaList | ExtendedTypeClause | InvalidPackageMemberDeclaration | TypeMemberGroupDeclaration | TypeConstructorDeclaration | TypeDestructorDeclaration | TypeIndexedGetterDeclaration | TypeIndexedSetterDeclaration | TypeIndexerParameterClause | TypeDereferencedVariableGetterDeclaration | TypeDereferencedVariableSetterDeclaration | TypeMethodDeclaration | OperatorDeclaration | TypeVariableDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | InvalidTypeMemberDeclaration | NestedMethodDeclaration | LocalVariableDeclaration | EnumerationVariableDeclaration | ArrayLiteral | ArrayLiteralElementList | AssertionExpression | AssumptionExpression | AsExpression | BinaryExpression | MethodBlockLiteral | ArgumentList | CallExpression | AutotypeCallExpression | IndexedAccessExpression | InvalidExpression | IsExpression | MethodLiteral | ParenthesizedExpression | WhenTernaryExpression | PrefixUnaryExpression | PropertyAccessExpression | ReferenceExpression | DereferenceExpression | TextTemplateLiteral | TextTemplateSpanList | TextTemplateSpan | TokenExpression | KeywordExpression | ObjectExpression | BaseExpression | IdentifierExpression | GenericSpecializationExpression | DefaultMatchExpression | AssignmentStatement | StatementList | StatementBlock | FunctionBlock | BreakLoopStatement | ContinueLoopStatement | DisposeStatement | RunStatement | TryStatement | CatchClause | ErrorVariableDeclaration | FinallyClause | EmptyStatement | ErrorStatement | ImportantStatement | ExpressionStatement | EnumerationVariableList | ForStatement | IfStatement | ElseIfClauseList | ElseIfClause | ElseClause | InvalidStatement | NestedMethodDeclarationStatement | LocalVariableDeclarationStatement | LoopStatement | ReturnStatement | CaseClauseList | SwitchStatement | MatchExpressionList | CaseClause | WhileStatement | YieldStatement | TranslationParameterList | TranslationParameterClause | ConstructorTranslation | IndexerTranslationParameterClause | IndexerTranslation | TranslationTypeParameterList | TranslationTypeParameterClause | PackageMethodTranslation | TypeMethodTranslation | MethodTypeTranslation | PackageImportTranslation | QualifiedName | PackageVariableTranslation | TypeVariableOrVariantTranslation | TypeMemberTranslationList | TypeTranslation | TextLiteralTranslation | TextTemplateLiteralTranslation | VariantDeclaration | TypeParameterDeclaration | ParameterDeclaration | Argument | TagList | Tag | ModifierList | Modifier | ParameterClause | ParameterList | TypeArgumentClause | TypeArgumentList | TypeParameterClause | TypeParameterList | TypeAnnotation | Token;
|
@@ -31,6 +31,7 @@ export declare class SyntaxFactory {
|
|
31
31
|
static indexerParameterClause(indexerParameters: readonly tree.ParameterDeclaration[]): tree.TypeIndexerParameterClause;
|
32
32
|
static namedTypeSpecifier(name: string | readonly string[], typeArguments?: readonly tree.TypeSpecifier[]): tree.NamedTypeSpecifier;
|
33
33
|
static unionTypeSpecifier(typeSpecifiers: readonly tree.TypeSpecifier[]): tree.UnionTypeSpecifier;
|
34
|
+
static intersectionTypeSpecifier(typeSpecifiers: readonly tree.TypeSpecifier[]): tree.IntersectionTypeSpecifier;
|
34
35
|
static nullableTypeSpecifier(typeSpecifier: tree.TypeSpecifier): tree.NullableTypeSpecifier;
|
35
36
|
static parenthesizedTypeSpecifier(typeSpecifier: tree.TypeSpecifier): tree.ParenthesizedTypeSpecifier;
|
36
37
|
static anonymousStructuredTypeSpecifier(body: tree.StructuredTypeDeclarationBody): tree.AnonymousTypeSpecifier;
|
@@ -67,9 +67,13 @@ export declare class SyntaxToCode {
|
|
67
67
|
private writeAnonymousStructuredTypeDeclaration;
|
68
68
|
private writeAnonymousVariantTypeDeclaration;
|
69
69
|
private writeUnionTypeSpecifier;
|
70
|
+
private writeUnionTypeSpecifierTypeList;
|
71
|
+
private writeIntersectionTypeSpecifier;
|
72
|
+
private writeIntersectionTypeSpecifierTypeList;
|
70
73
|
private writeParenthesizedTypeSpecifier;
|
71
74
|
private writeNullableTypeSpecifier;
|
72
|
-
private
|
75
|
+
private doesUnionTypeElementRequireParenthesis;
|
76
|
+
private doesIntersectionTypeElementRequireParenthesis;
|
73
77
|
private doesTypeMadeNullableRequireParenthesis;
|
74
78
|
private writeQualifiedName;
|
75
79
|
private writeTypeArgumentClause;
|
@@ -133,9 +133,9 @@ export declare class PackagePath extends BaseNode {
|
|
133
133
|
constructor(green: green.PackagePath, rangeStart: number, parent: PackagePathParent);
|
134
134
|
private createChildren;
|
135
135
|
}
|
136
|
-
export type TypeSpecifier = NamedTypeSpecifier | AnonymousTypeSpecifier | UnionTypeSpecifier | ParenthesizedTypeSpecifier | NullableTypeSpecifier | InvalidTypeSpecifier;
|
136
|
+
export type TypeSpecifier = NamedTypeSpecifier | AnonymousTypeSpecifier | UnionTypeSpecifier | IntersectionTypeSpecifier | ParenthesizedTypeSpecifier | NullableTypeSpecifier | InvalidTypeSpecifier;
|
137
137
|
export type NamedTypeSpecifierParent = BaseTypeList | NonNamedTypeSpecifierParent;
|
138
|
-
export type NonNamedTypeSpecifierParent = AliasTypeDeclarationBody | AsExpression | IsExpression | TypeParameterDeclaration | TypeArgumentList | TypeAnnotation | ParenthesizedTypeSpecifier | NullableTypeSpecifier | UnionTypeSpecifierTypeList;
|
138
|
+
export type NonNamedTypeSpecifierParent = AliasTypeDeclarationBody | AsExpression | IsExpression | TypeParameterDeclaration | TypeArgumentList | TypeAnnotation | ParenthesizedTypeSpecifier | NullableTypeSpecifier | UnionTypeSpecifierTypeList | IntersectionTypeSpecifierTypeList;
|
139
139
|
export declare class NamedTypeSpecifier extends BaseNode {
|
140
140
|
readonly kind = NodeKind.NamedTypeSpecifier;
|
141
141
|
readonly green: green.NamedTypeSpecifier;
|
@@ -173,6 +173,31 @@ export declare class UnionTypeSpecifierTypeList extends BaseNode {
|
|
173
173
|
constructor(green: green.UnionTypeSpecifierTypeList, rangeStart: number, parent: UnionTypeSpecifierTypeListParent);
|
174
174
|
private createChildren;
|
175
175
|
}
|
176
|
+
export declare class IntersectionTypeSpecifier extends BaseNode {
|
177
|
+
readonly kind = NodeKind.IntersectionTypeSpecifier;
|
178
|
+
readonly green: green.IntersectionTypeSpecifier;
|
179
|
+
readonly parent: NonNamedTypeSpecifierParent;
|
180
|
+
private _children;
|
181
|
+
get children(): readonly [IntersectionTypeSpecifierTypeList];
|
182
|
+
get typeList(): IntersectionTypeSpecifierTypeList;
|
183
|
+
protected get thisAsNode(): Node;
|
184
|
+
constructor(green: green.IntersectionTypeSpecifier, rangeStart: number, parent: NonNamedTypeSpecifierParent);
|
185
|
+
private createChildren;
|
186
|
+
}
|
187
|
+
export type IntersectionTypeSpecifierTypeListElement = TypeSpecifier | Token<TokenKind.Ampersand>;
|
188
|
+
export type IntersectionTypeSpecifierTypeListParent = IntersectionTypeSpecifier;
|
189
|
+
export declare class IntersectionTypeSpecifierTypeList extends BaseNode {
|
190
|
+
readonly kind = NodeKind.IntersectionTypeSpecifierTypeList;
|
191
|
+
readonly green: green.IntersectionTypeSpecifierTypeList;
|
192
|
+
readonly parent: IntersectionTypeSpecifierTypeListParent;
|
193
|
+
private _children;
|
194
|
+
get children(): readonly IntersectionTypeSpecifierTypeListElement[];
|
195
|
+
get elements(): readonly IntersectionTypeSpecifierTypeListElement[];
|
196
|
+
get types(): Query<TypeSpecifier>;
|
197
|
+
protected get thisAsNode(): Node;
|
198
|
+
constructor(green: green.IntersectionTypeSpecifierTypeList, rangeStart: number, parent: IntersectionTypeSpecifierTypeListParent);
|
199
|
+
private createChildren;
|
200
|
+
}
|
176
201
|
export declare class ParenthesizedTypeSpecifier extends BaseNode {
|
177
202
|
readonly kind = NodeKind.ParenthesizedTypeSpecifier;
|
178
203
|
readonly green: green.ParenthesizedTypeSpecifier;
|
@@ -1439,9 +1464,9 @@ export declare class ErrorStatement extends BaseNode {
|
|
1439
1464
|
readonly green: green.ErrorStatement;
|
1440
1465
|
readonly parent: ErrorStatementParent;
|
1441
1466
|
private _children;
|
1442
|
-
get children(): readonly [Keyword<green.KeywordKind.Error>, Expression
|
1467
|
+
get children(): readonly [Keyword<green.KeywordKind.Error>, Expression];
|
1443
1468
|
get errorKeyword(): Keyword<KeywordKind.Error>;
|
1444
|
-
get expression(): Expression
|
1469
|
+
get expression(): Expression;
|
1445
1470
|
protected get thisAsNode(): Node;
|
1446
1471
|
constructor(green: green.ErrorStatement, rangeStart: number, parent: ErrorStatementParent);
|
1447
1472
|
private createChildren;
|
@@ -2182,4 +2207,4 @@ export declare class TypeAnnotation extends BaseNode {
|
|
2182
2207
|
constructor(green: green.TypeAnnotation, rangeStart: number, parent: TypeAnnotationParent);
|
2183
2208
|
private createChildren;
|
2184
2209
|
}
|
2185
|
-
export type Node = SourceFile | PackageMemberDeclarationList | Keyword | PackageImportDirectiveList | SinglePackageImportDirective | PackageGroupImportDirective | PackageImportList | PackageImport | PackagePath | NamedTypeSpecifier | UnionTypeSpecifier | UnionTypeSpecifierTypeList | ParenthesizedTypeSpecifier | NullableTypeSpecifier | AnonymousTypeSpecifier | InvalidTypeSpecifier | AnonymousMethodTypeDeclaration | AnonymousStructuredTypeDeclaration | AnonymousVariantTypeDeclaration | TopLevelTranslationList | TranslationsDeclaration | PackageAliasTypeDeclaration | AliasTypeDeclarationBody | PackageMemberGroupDeclaration | PackageConstructorDeclaration | PackageEntryPointDeclaration | PackageMethodDeclaration | PackageMethodTypeDeclaration | MethodTypeDeclarationBody | BaseTypeList | TypeMemberDeclarationList | TypeMemberDeclarationBlock | PackageStructuredTypeDeclaration | StructuredTypeDeclarationBody | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageVariantTypeDeclaration | VariantTypeDeclarationBody | TypeExtensionDeclaration | ExtendedTypeClauseCommaList | ExtendedTypeClause | InvalidPackageMemberDeclaration | TypeMemberGroupDeclaration | TypeConstructorDeclaration | TypeDestructorDeclaration | TypeIndexedGetterDeclaration | TypeIndexedSetterDeclaration | TypeIndexerParameterClause | TypeDereferencedVariableGetterDeclaration | TypeDereferencedVariableSetterDeclaration | TypeMethodDeclaration | OperatorDeclaration | TypeVariableDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | InvalidTypeMemberDeclaration | NestedMethodDeclaration | LocalVariableDeclaration | EnumerationVariableDeclaration | ArrayLiteral | ArrayLiteralElementList | AssertionExpression | AssumptionExpression | AsExpression | BinaryExpression | MethodBlockLiteral | ArgumentList | CallExpression | AutotypeCallExpression | IndexedAccessExpression | InvalidExpression | IsExpression | MethodLiteral | ParenthesizedExpression | WhenTernaryExpression | PrefixUnaryExpression | PropertyAccessExpression | ReferenceExpression | DereferenceExpression | TextTemplateLiteral | TextTemplateSpanList | TextTemplateSpan | TokenExpression | KeywordExpression | ObjectExpression | BaseExpression | IdentifierExpression | GenericSpecializationExpression | DefaultMatchExpression | AssignmentStatement | StatementList | StatementBlock | FunctionBlock | BreakLoopStatement | ContinueLoopStatement | DisposeStatement | RunStatement | TryStatement | CatchClause | ErrorVariableDeclaration | FinallyClause | EmptyStatement | ErrorStatement | ImportantStatement | ExpressionStatement | EnumerationVariableList | ForStatement | IfStatement | ElseIfClauseList | ElseIfClause | ElseClause | InvalidStatement | NestedMethodDeclarationStatement | LocalVariableDeclarationStatement | LoopStatement | ReturnStatement | CaseClauseList | SwitchStatement | MatchExpressionList | CaseClause | WhileStatement | YieldStatement | TranslationParameterList | TranslationParameterClause | ConstructorTranslation | IndexerTranslationParameterClause | IndexerTranslation | TranslationTypeParameterList | TranslationTypeParameterClause | PackageMethodTranslation | TypeMethodTranslation | MethodTypeTranslation | PackageImportTranslation | QualifiedName | PackageVariableTranslation | TypeVariableOrVariantTranslation | TypeMemberTranslationList | TypeTranslation | TextLiteralTranslation | TextTemplateLiteralTranslation | VariantDeclaration | TypeParameterDeclaration | ParameterDeclaration | Argument | TagList | Tag | ModifierList | Modifier | ParameterClause | ParameterList | TypeArgumentClause | TypeArgumentList | TypeParameterClause | TypeParameterList | TypeAnnotation | Token;
|
2210
|
+
export type Node = SourceFile | PackageMemberDeclarationList | Keyword | PackageImportDirectiveList | SinglePackageImportDirective | PackageGroupImportDirective | PackageImportList | PackageImport | PackagePath | NamedTypeSpecifier | UnionTypeSpecifier | UnionTypeSpecifierTypeList | IntersectionTypeSpecifier | IntersectionTypeSpecifierTypeList | ParenthesizedTypeSpecifier | NullableTypeSpecifier | AnonymousTypeSpecifier | InvalidTypeSpecifier | AnonymousMethodTypeDeclaration | AnonymousStructuredTypeDeclaration | AnonymousVariantTypeDeclaration | TopLevelTranslationList | TranslationsDeclaration | PackageAliasTypeDeclaration | AliasTypeDeclarationBody | PackageMemberGroupDeclaration | PackageConstructorDeclaration | PackageEntryPointDeclaration | PackageMethodDeclaration | PackageMethodTypeDeclaration | MethodTypeDeclarationBody | BaseTypeList | TypeMemberDeclarationList | TypeMemberDeclarationBlock | PackageStructuredTypeDeclaration | StructuredTypeDeclarationBody | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageVariantTypeDeclaration | VariantTypeDeclarationBody | TypeExtensionDeclaration | ExtendedTypeClauseCommaList | ExtendedTypeClause | InvalidPackageMemberDeclaration | TypeMemberGroupDeclaration | TypeConstructorDeclaration | TypeDestructorDeclaration | TypeIndexedGetterDeclaration | TypeIndexedSetterDeclaration | TypeIndexerParameterClause | TypeDereferencedVariableGetterDeclaration | TypeDereferencedVariableSetterDeclaration | TypeMethodDeclaration | OperatorDeclaration | TypeVariableDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | InvalidTypeMemberDeclaration | NestedMethodDeclaration | LocalVariableDeclaration | EnumerationVariableDeclaration | ArrayLiteral | ArrayLiteralElementList | AssertionExpression | AssumptionExpression | AsExpression | BinaryExpression | MethodBlockLiteral | ArgumentList | CallExpression | AutotypeCallExpression | IndexedAccessExpression | InvalidExpression | IsExpression | MethodLiteral | ParenthesizedExpression | WhenTernaryExpression | PrefixUnaryExpression | PropertyAccessExpression | ReferenceExpression | DereferenceExpression | TextTemplateLiteral | TextTemplateSpanList | TextTemplateSpan | TokenExpression | KeywordExpression | ObjectExpression | BaseExpression | IdentifierExpression | GenericSpecializationExpression | DefaultMatchExpression | AssignmentStatement | StatementList | StatementBlock | FunctionBlock | BreakLoopStatement | ContinueLoopStatement | DisposeStatement | RunStatement | TryStatement | CatchClause | ErrorVariableDeclaration | FinallyClause | EmptyStatement | ErrorStatement | ImportantStatement | ExpressionStatement | EnumerationVariableList | ForStatement | IfStatement | ElseIfClauseList | ElseIfClause | ElseClause | InvalidStatement | NestedMethodDeclarationStatement | LocalVariableDeclarationStatement | LoopStatement | ReturnStatement | CaseClauseList | SwitchStatement | MatchExpressionList | CaseClause | WhileStatement | YieldStatement | TranslationParameterList | TranslationParameterClause | ConstructorTranslation | IndexerTranslationParameterClause | IndexerTranslation | TranslationTypeParameterList | TranslationTypeParameterClause | PackageMethodTranslation | TypeMethodTranslation | MethodTypeTranslation | PackageImportTranslation | QualifiedName | PackageVariableTranslation | TypeVariableOrVariantTranslation | TypeMemberTranslationList | TypeTranslation | TextLiteralTranslation | TextTemplateLiteralTranslation | VariantDeclaration | TypeParameterDeclaration | ParameterDeclaration | Argument | TagList | Tag | ModifierList | Modifier | ParameterClause | ParameterList | TypeArgumentClause | TypeArgumentList | TypeParameterClause | TypeParameterList | TypeAnnotation | Token;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { Analyzer } from '../analysis/index.js';
|
2
|
+
import { TypeEntity } from '../entities/index.js';
|
3
|
+
import { SubstitutionMap, Substitutions } from './Substitutions.js';
|
4
|
+
import { IType, Type } from './index.js';
|
5
|
+
export declare class IntersectionType implements IType {
|
6
|
+
readonly kind = "intersection";
|
7
|
+
readonly originalTypes: readonly Type[];
|
8
|
+
private readonly _analyzer;
|
9
|
+
private readonly _unaliasedFlattenedTypes;
|
10
|
+
get unaliasedFlattenedTypes(): readonly Type[];
|
11
|
+
get debuggerDisplay(): string;
|
12
|
+
constructor(analyzer: Analyzer, originalTypes: readonly Type[]);
|
13
|
+
equals(other: Type): boolean;
|
14
|
+
getSubstitutions(): Substitutions;
|
15
|
+
applySubstitutions(map: SubstitutionMap): Type;
|
16
|
+
getEntity(): TypeEntity | undefined;
|
17
|
+
getBaseObjectTypeOrAliasedType(): Type | undefined;
|
18
|
+
toString(): string;
|
19
|
+
private unaliasAndFlattenType;
|
20
|
+
}
|
@@ -4,12 +4,15 @@ import { IType, SubstitutionMap, Substitutions, Type } from './index.js';
|
|
4
4
|
export declare class ParameterType implements IType {
|
5
5
|
private readonly _analyzer;
|
6
6
|
private readonly _entity;
|
7
|
-
|
7
|
+
readonly isNoneExcluded: boolean;
|
8
8
|
readonly kind = "parameter";
|
9
|
-
|
9
|
+
private readonly _constraint;
|
10
|
+
/**
|
11
|
+
* Ограничение параметра типа с учётом флага {@link isNoneExcluded}.
|
12
|
+
*/
|
10
13
|
get constraint(): Type | undefined;
|
11
14
|
get debuggerDisplay(): string;
|
12
|
-
constructor(_analyzer: Analyzer, _entity: TypeParameterEntity,
|
15
|
+
constructor(_analyzer: Analyzer, _entity: TypeParameterEntity, isNoneExcluded: boolean);
|
13
16
|
getSubstitutions(): Substitutions;
|
14
17
|
getEntity(): TypeParameterEntity;
|
15
18
|
applySubstitutions(map: SubstitutionMap): Type;
|