@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.
Files changed (43) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +6 -2
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +627 -498
  5. package/build/{chunk-DZNNWICP.js → chunk-24QZJOMF.js} +4575 -3937
  6. package/build/{chunk-AX3LQ2CF.js → chunk-62KHK23H.js} +2 -2
  7. package/build/{chunk-LG4Z4SWO.js → chunk-Y6DODJCG.js} +1 -1
  8. package/build/types/analysis/AnalyzedTranslationPackage.d.ts +1 -0
  9. package/build/types/analysis/Analyzer.d.ts +11 -5
  10. package/build/types/analysis/DiagnosticCollector.d.ts +1 -1
  11. package/build/types/analysis/ImportedPackageNameTree.d.ts +1 -0
  12. package/build/types/analysis/NamedTypeResolver.d.ts +5 -1
  13. package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +4 -1
  14. package/build/types/analysis/PropertyAccessExpressionMeaning.d.ts +8 -2
  15. package/build/types/analysis/TagMeaning.d.ts +4 -1
  16. package/build/types/analysis/TypeNarrower.d.ts +21 -21
  17. package/build/types/analysis/Utils.d.ts +12 -0
  18. package/build/types/analysis/control-flow/GraphBuilder.d.ts +43 -0
  19. package/build/types/analysis/{ControlFlowGraphVisualizer.d.ts → control-flow/GraphVisualizer.d.ts} +3 -3
  20. package/build/types/analysis/control-flow/NarrowableExpression.d.ts +5 -0
  21. package/build/types/analysis/control-flow/Nodes.d.ts +91 -0
  22. package/build/types/analysis/control-flow/index.d.ts +4 -0
  23. package/build/types/common/HelperPhrases.d.ts +3 -2
  24. package/build/types/diagnostic/DiagnosticCode.d.ts +5 -5
  25. package/build/types/emitter/Entities.d.ts +5 -4
  26. package/build/types/emitter/ir/Nodes.d.ts +2 -2
  27. package/build/types/services/CompletionService.d.ts +0 -1
  28. package/build/types/services/DisplayService.d.ts +11 -8
  29. package/build/types/services/NodeSemanticInfo.d.ts +11 -6
  30. package/build/types/services/source-generation/EntityToSyntax.d.ts +1 -0
  31. package/build/types/tree/NodeKind.d.ts +146 -144
  32. package/build/types/tree/green/Nodes.d.ts +24 -5
  33. package/build/types/tree/green/SyntaxFactory.d.ts +1 -0
  34. package/build/types/tree/green/SyntaxToCode.d.ts +5 -1
  35. package/build/types/tree/red/Nodes.d.ts +30 -5
  36. package/build/types/ts-interop/TsInteropContext.d.ts +1 -0
  37. package/build/types/types/IntersectionType.d.ts +20 -0
  38. package/build/types/types/ParameterType.d.ts +6 -3
  39. package/build/types/types/Type.d.ts +2 -1
  40. package/build/types/types/TypeFactory.d.ts +4 -1
  41. package/build/types/types/index.d.ts +1 -0
  42. package/package.json +1 -1
  43. 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 displayUnionTypeUsage;
57
+ private displayUnionOrIntersectionTypeUsage;
56
58
  private displayUnresolvedTypeUsage;
57
59
  private displayTypeInternal;
58
60
  private displayTypeUsageInternal;
59
- private displayUnionTypeTypes;
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 | UnionTypeUsage | UnresolvedTypeUsage;
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 UnionTypeUsage = UnionTypeUsage_type;
744
- declare class UnionTypeUsage_type {
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, PackageAliasEntity, PackageEntity, StructuredTypeEntity, TypeParameterEntity, VariableEntity, VariantTypeEntity } from '../entities/index.js';
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: ReferencedEntity;
59
+ readonly entity: Entity;
59
60
  readonly accessKind: AccessKind;
60
61
  readonly narrowedType?: types.Type | undefined;
61
62
  readonly kind = "entity";
62
- constructor(entity: ReferencedEntity, accessKind: AccessKind, narrowedType?: types.Type | undefined);
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';
@@ -42,6 +42,7 @@ export declare class EntityToSyntax {
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
  }
@@ -12,148 +12,150 @@ export declare enum NodeKind {
12
12
  NamedTypeSpecifier = 10,
13
13
  UnionTypeSpecifier = 11,
14
14
  UnionTypeSpecifierTypeList = 12,
15
- ParenthesizedTypeSpecifier = 13,
16
- NullableTypeSpecifier = 14,
17
- AnonymousTypeSpecifier = 15,
18
- InvalidTypeSpecifier = 16,
19
- AnonymousMethodTypeDeclaration = 17,
20
- AnonymousStructuredTypeDeclaration = 18,
21
- AnonymousVariantTypeDeclaration = 19,
22
- TopLevelTranslationList = 20,
23
- TranslationsDeclaration = 21,
24
- PackageAliasTypeDeclaration = 22,
25
- AliasTypeDeclarationBody = 23,
26
- PackageMemberGroupDeclaration = 24,
27
- PackageConstructorDeclaration = 25,
28
- PackageEntryPointDeclaration = 26,
29
- PackageMethodDeclaration = 27,
30
- PackageMethodTypeDeclaration = 28,
31
- MethodTypeDeclarationBody = 29,
32
- BaseTypeList = 30,
33
- TypeMemberDeclarationList = 31,
34
- TypeMemberDeclarationBlock = 32,
35
- PackageStructuredTypeDeclaration = 33,
36
- StructuredTypeDeclarationBody = 34,
37
- PackageVariableDeclaration = 35,
38
- PackageVariableGetterDeclaration = 36,
39
- PackageVariableSetterDeclaration = 37,
40
- PackageVariantTypeDeclaration = 38,
41
- VariantTypeDeclarationBody = 39,
42
- TypeExtensionDeclaration = 40,
43
- ExtendedTypeClauseCommaList = 41,
44
- ExtendedTypeClause = 42,
45
- InvalidPackageMemberDeclaration = 43,
46
- TypeMemberGroupDeclaration = 44,
47
- TypeConstructorDeclaration = 45,
48
- TypeDestructorDeclaration = 46,
49
- TypeIndexedGetterDeclaration = 47,
50
- TypeIndexedSetterDeclaration = 48,
51
- TypeIndexerParameterClause = 49,
52
- TypeDereferencedVariableGetterDeclaration = 50,
53
- TypeDereferencedVariableSetterDeclaration = 51,
54
- TypeMethodDeclaration = 52,
55
- OperatorDeclaration = 53,
56
- TypeVariableDeclaration = 54,
57
- TypeVariableGetterDeclaration = 55,
58
- TypeVariableSetterDeclaration = 56,
59
- InvalidTypeMemberDeclaration = 57,
60
- NestedMethodDeclaration = 58,
61
- LocalVariableDeclaration = 59,
62
- EnumerationVariableDeclaration = 60,
63
- ArrayLiteral = 61,
64
- ArrayLiteralElementList = 62,
65
- AssertionExpression = 63,
66
- AssumptionExpression = 64,
67
- AsExpression = 65,
68
- BinaryExpression = 66,
69
- MethodBlockLiteral = 67,
70
- ArgumentList = 68,
71
- CallExpression = 69,
72
- AutotypeCallExpression = 70,
73
- IndexedAccessExpression = 71,
74
- InvalidExpression = 72,
75
- IsExpression = 73,
76
- MethodLiteral = 74,
77
- ParenthesizedExpression = 75,
78
- WhenTernaryExpression = 76,
79
- PrefixUnaryExpression = 77,
80
- PropertyAccessExpression = 78,
81
- ReferenceExpression = 79,
82
- DereferenceExpression = 80,
83
- TextTemplateLiteral = 81,
84
- TextTemplateSpanList = 82,
85
- TextTemplateSpan = 83,
86
- TokenExpression = 84,
87
- KeywordExpression = 85,
88
- ObjectExpression = 86,
89
- BaseExpression = 87,
90
- IdentifierExpression = 88,
91
- GenericSpecializationExpression = 89,
92
- DefaultMatchExpression = 90,
93
- AssignmentStatement = 91,
94
- StatementList = 92,
95
- StatementBlock = 93,
96
- FunctionBlock = 94,
97
- BreakLoopStatement = 95,
98
- ContinueLoopStatement = 96,
99
- DisposeStatement = 97,
100
- RunStatement = 98,
101
- TryStatement = 99,
102
- CatchClause = 100,
103
- ErrorVariableDeclaration = 101,
104
- FinallyClause = 102,
105
- EmptyStatement = 103,
106
- ErrorStatement = 104,
107
- ImportantStatement = 105,
108
- ExpressionStatement = 106,
109
- EnumerationVariableList = 107,
110
- ForStatement = 108,
111
- IfStatement = 109,
112
- ElseIfClauseList = 110,
113
- ElseIfClause = 111,
114
- ElseClause = 112,
115
- InvalidStatement = 113,
116
- NestedMethodDeclarationStatement = 114,
117
- LocalVariableDeclarationStatement = 115,
118
- LoopStatement = 116,
119
- ReturnStatement = 117,
120
- CaseClauseList = 118,
121
- SwitchStatement = 119,
122
- MatchExpressionList = 120,
123
- CaseClause = 121,
124
- WhileStatement = 122,
125
- YieldStatement = 123,
126
- TranslationParameterList = 124,
127
- TranslationParameterClause = 125,
128
- ConstructorTranslation = 126,
129
- IndexerTranslationParameterClause = 127,
130
- IndexerTranslation = 128,
131
- TranslationTypeParameterList = 129,
132
- TranslationTypeParameterClause = 130,
133
- PackageMethodTranslation = 131,
134
- TypeMethodTranslation = 132,
135
- MethodTypeTranslation = 133,
136
- PackageImportTranslation = 134,
137
- QualifiedName = 135,
138
- PackageVariableTranslation = 136,
139
- TypeVariableOrVariantTranslation = 137,
140
- TypeMemberTranslationList = 138,
141
- TypeTranslation = 139,
142
- TextLiteralTranslation = 140,
143
- TextTemplateLiteralTranslation = 141,
144
- VariantDeclaration = 142,
145
- TypeParameterDeclaration = 143,
146
- ParameterDeclaration = 144,
147
- Argument = 145,
148
- TagList = 146,
149
- Tag = 147,
150
- ModifierList = 148,
151
- Modifier = 149,
152
- ParameterClause = 150,
153
- ParameterList = 151,
154
- TypeArgumentClause = 152,
155
- TypeArgumentList = 153,
156
- TypeParameterClause = 154,
157
- TypeParameterList = 155,
158
- TypeAnnotation = 156
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 | undefined
1487
+ Expression
1469
1488
  ];
1470
1489
  get errorKeyword(): Keyword<KeywordKind.Error>;
1471
- get expression(): Expression | undefined;
1490
+ get expression(): Expression;
1472
1491
  protected get thisAsNode(): Node;
1473
- constructor(errorKeyword: Keyword<KeywordKind.Error>, expression: Expression | undefined);
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 doesConstituentTypeRequireParenthesis;
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 | undefined];
1467
+ get children(): readonly [Keyword<green.KeywordKind.Error>, Expression];
1443
1468
  get errorKeyword(): Keyword<KeywordKind.Error>;
1444
- get expression(): Expression | undefined;
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;
@@ -103,6 +103,7 @@ declare class TypeContext {
103
103
  private ofTypeAlias;
104
104
  private ofObjectType;
105
105
  private ofUnionType;
106
+ private ofIntersectionType;
106
107
  private ofTypeParameter;
107
108
  private createTypeArguments;
108
109
  private createTypeFromEntity;
@@ -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
- private readonly _excludeNone;
7
+ readonly isNoneExcluded: boolean;
8
8
  readonly kind = "parameter";
9
- get isNoneExcluded(): boolean;
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, _excludeNone: boolean);
15
+ constructor(_analyzer: Analyzer, _entity: TypeParameterEntity, isNoneExcluded: boolean);
13
16
  getSubstitutions(): Substitutions;
14
17
  getEntity(): TypeParameterEntity;
15
18
  applySubstitutions(map: SubstitutionMap): Type;