@artel/artc 0.6.25222 → 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 (53) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +12 -2
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +635 -532
  5. package/build/{chunk-ODWG5ZXF.js → chunk-24QZJOMF.js} +4477 -3240
  6. package/build/{chunk-MBMOAUK7.js → chunk-62KHK23H.js} +2 -2
  7. package/build/{chunk-UZK7JCND.js → chunk-Y6DODJCG.js} +1 -1
  8. package/build/types/analysis/AnalyzedTranslationPackage.d.ts +1 -0
  9. package/build/types/analysis/Analyzer.d.ts +17 -11
  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/LocalizationContext.d.ts +2 -2
  13. package/build/types/analysis/Lookup.d.ts +4 -4
  14. package/build/types/analysis/NamedTypeResolver.d.ts +5 -1
  15. package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +4 -1
  16. package/build/types/analysis/PropertyAccessExpressionMeaning.d.ts +9 -3
  17. package/build/types/analysis/Scope.d.ts +21 -44
  18. package/build/types/analysis/SemanticContext.d.ts +14 -1
  19. package/build/types/analysis/SemanticContextBuilder.d.ts +1 -0
  20. package/build/types/analysis/StatementBlockScopeBuilder.d.ts +1 -0
  21. package/build/types/analysis/TagMeaning.d.ts +4 -1
  22. package/build/types/analysis/TypeMemberLookup.d.ts +39 -11
  23. package/build/types/analysis/TypeNarrower.d.ts +49 -14
  24. package/build/types/analysis/Utils.d.ts +12 -0
  25. package/build/types/analysis/control-flow/GraphBuilder.d.ts +43 -0
  26. package/build/types/analysis/{ControlFlowGraphVisualizer.d.ts → control-flow/GraphVisualizer.d.ts} +3 -3
  27. package/build/types/analysis/control-flow/NarrowableExpression.d.ts +5 -0
  28. package/build/types/analysis/control-flow/Nodes.d.ts +91 -0
  29. package/build/types/analysis/control-flow/index.d.ts +4 -0
  30. package/build/types/common/HelperPhrases.d.ts +3 -2
  31. package/build/types/diagnostic/DiagnosticCode.d.ts +5 -5
  32. package/build/types/emitter/Entities.d.ts +5 -4
  33. package/build/types/emitter/ir/Nodes.d.ts +2 -2
  34. package/build/types/entities/index.d.ts +3 -0
  35. package/build/types/parser/Scanner.d.ts +1 -2
  36. package/build/types/services/CompletionService.d.ts +0 -1
  37. package/build/types/services/DisplayService.d.ts +11 -8
  38. package/build/types/services/NodeSemanticInfo.d.ts +11 -6
  39. package/build/types/services/source-generation/EntityToSyntax.d.ts +1 -0
  40. package/build/types/tree/NodeKind.d.ts +146 -144
  41. package/build/types/tree/green/Nodes.d.ts +28 -10
  42. package/build/types/tree/green/SyntaxFactory.d.ts +1 -0
  43. package/build/types/tree/green/SyntaxToCode.d.ts +5 -1
  44. package/build/types/tree/red/Nodes.d.ts +33 -8
  45. package/build/types/ts-interop/TsInteropContext.d.ts +1 -0
  46. package/build/types/types/IntersectionType.d.ts +20 -0
  47. package/build/types/types/ParameterType.d.ts +6 -3
  48. package/build/types/types/Type.d.ts +2 -1
  49. package/build/types/types/TypeFactory.d.ts +4 -1
  50. package/build/types/types/TypeMembers.d.ts +5 -0
  51. package/build/types/types/index.d.ts +1 -0
  52. package/package.json +1 -1
  53. package/build/types/analysis/ControlFlowGraphBuilder.d.ts +0 -121
@@ -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 [
@@ -1338,20 +1357,19 @@ export declare class StatementBlock extends BaseNode {
1338
1357
  constructor(openBraceToken: Token<TokenKind.OpenBrace>, statementList: StatementList, closeBraceToken: Token<TokenKind.CloseBrace>);
1339
1358
  toRed(rangeStart: number, parent: red.StatementBlockParent): red.StatementBlock;
1340
1359
  }
1360
+ export type ExpressionOrStatementList = Expression | StatementList;
1341
1361
  export declare class FunctionBlock extends BaseNode {
1342
1362
  readonly kind = NodeKind.FunctionBlock;
1343
1363
  readonly children: readonly [
1344
1364
  Token<TokenKind.OpenBrace>,
1345
- Expression | undefined,
1346
- StatementList | undefined,
1365
+ ExpressionOrStatementList,
1347
1366
  Token<TokenKind.CloseBrace>
1348
1367
  ];
1349
1368
  get openBraceToken(): Token<TokenKind.OpenBrace>;
1350
- get expression(): Expression | undefined;
1351
- get statementList(): StatementList | undefined;
1369
+ get expressionOrStatementList(): ExpressionOrStatementList;
1352
1370
  get closeBraceToken(): Token<TokenKind.CloseBrace>;
1353
1371
  protected get thisAsNode(): Node;
1354
- constructor(openBraceToken: Token<TokenKind.OpenBrace>, expression: Expression | undefined, statementList: StatementList | undefined, closeBraceToken: Token<TokenKind.CloseBrace>);
1372
+ constructor(openBraceToken: Token<TokenKind.OpenBrace>, expressionOrStatementList: ExpressionOrStatementList, closeBraceToken: Token<TokenKind.CloseBrace>);
1355
1373
  toRed(rangeStart: number, parent: red.FunctionBlockParent): red.FunctionBlock;
1356
1374
  }
1357
1375
  export declare class BreakLoopStatement extends BaseNode {
@@ -1466,12 +1484,12 @@ export declare class ErrorStatement extends BaseNode {
1466
1484
  readonly kind = NodeKind.ErrorStatement;
1467
1485
  readonly children: readonly [
1468
1486
  Keyword<KeywordKind.Error>,
1469
- Expression | undefined
1487
+ Expression
1470
1488
  ];
1471
1489
  get errorKeyword(): Keyword<KeywordKind.Error>;
1472
- get expression(): Expression | undefined;
1490
+ get expression(): Expression;
1473
1491
  protected get thisAsNode(): Node;
1474
- constructor(errorKeyword: Keyword<KeywordKind.Error>, expression: Expression | undefined);
1492
+ constructor(errorKeyword: Keyword<KeywordKind.Error>, expression: Expression);
1475
1493
  toRed(rangeStart: number, parent: red.ErrorStatementParent): red.ErrorStatement;
1476
1494
  }
1477
1495
  export declare class ImportantStatement extends BaseNode {
@@ -2185,4 +2203,4 @@ export declare class TypeAnnotation extends BaseNode {
2185
2203
  constructor(colonToken: Token<TokenKind.Colon>, typeSpecifier: TypeSpecifier);
2186
2204
  toRed(rangeStart: number, parent: red.TypeAnnotationParent): red.TypeAnnotation;
2187
2205
  }
2188
- 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;
@@ -1306,15 +1331,15 @@ export declare class StatementBlock extends BaseNode {
1306
1331
  private createChildren;
1307
1332
  }
1308
1333
  export type FunctionBlockParent = PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageMethodDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | TypeIndexedGetterDeclaration | TypeIndexedSetterDeclaration | TypeDereferencedVariableGetterDeclaration | TypeDereferencedVariableSetterDeclaration | TypeMethodDeclaration | OperatorDeclaration | NestedMethodDeclaration | MethodLiteral | MethodBlockLiteral | PackageConstructorDeclaration | PackageEntryPointDeclaration | TypeConstructorDeclaration | TypeDestructorDeclaration;
1334
+ export type ExpressionOrStatementList = Expression | StatementList;
1309
1335
  export declare class FunctionBlock extends BaseNode {
1310
1336
  readonly kind = NodeKind.FunctionBlock;
1311
1337
  readonly green: green.FunctionBlock;
1312
1338
  readonly parent: FunctionBlockParent;
1313
1339
  private _children;
1314
- get children(): readonly [Token<green.TokenKind.OpenBrace>, Expression | undefined, StatementList | undefined, Token<green.TokenKind.CloseBrace>];
1340
+ get children(): readonly [Token<green.TokenKind.OpenBrace>, ExpressionOrStatementList, Token<green.TokenKind.CloseBrace>];
1315
1341
  get openBraceToken(): Token<TokenKind.OpenBrace>;
1316
- get expression(): Expression | undefined;
1317
- get statementList(): StatementList | undefined;
1342
+ get expressionOrStatementList(): ExpressionOrStatementList;
1318
1343
  get closeBraceToken(): Token<TokenKind.CloseBrace>;
1319
1344
  protected get thisAsNode(): Node;
1320
1345
  constructor(green: green.FunctionBlock, rangeStart: number, parent: FunctionBlockParent);
@@ -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;
@@ -1,12 +1,13 @@
1
1
  import { TypeEntity } from '../entities/index.js';
2
2
  import { AliasType } from './AliasType.js';
3
+ import { IntersectionType } from './IntersectionType.js';
3
4
  import { MethodType } from './MethodType.js';
4
5
  import { ParameterType } from './ParameterType.js';
5
6
  import { StructuredType } from './StructuredType.js';
6
7
  import { UnresolvedType } from './UnresolvedType.js';
7
8
  import { VariantType } from './VariantType.js';
8
9
  import { SubstitutionMap, Substitutions, UnionType } from './index.js';
9
- export type Type = StructuredType | VariantType | MethodType | AliasType | UnresolvedType | ParameterType | UnionType;
10
+ export type Type = StructuredType | VariantType | MethodType | AliasType | UnresolvedType | ParameterType | UnionType | IntersectionType;
10
11
  export interface IType {
11
12
  getSubstitutions(): Substitutions;
12
13
  applySubstitutions(map: SubstitutionMap): Type;
@@ -9,8 +9,11 @@ export declare class TypeFactory {
9
9
  getVariantType(entity: VariantTypeEntity, substitutions: Substitutions): VariantType;
10
10
  getMethodType(entity: MethodTypeEntity, substitutions: Substitutions): MethodType;
11
11
  getAliasType(entity: AliasTypeEntity, substitutions: Substitutions): AliasType;
12
- getUnionType(types: readonly Type[], excludeDuplicates?: boolean): Type;
12
+ getUnionType(types: readonly Type[], excludeDuplicates?: boolean, reduce?: boolean): Type;
13
+ getIntersectionType(types: readonly Type[], excludeDuplicates?: boolean, reduce?: boolean): Type;
13
14
  getUnresolvedType(): UnresolvedType;
14
15
  private getUniqueFlattenedConstituentTypes;
15
16
  private excludeDuplicateTypesComparingWithEqualsMethod;
17
+ private removeBaseTypes;
18
+ private removeDerivedTypes;
16
19
  }
@@ -86,6 +86,7 @@ export declare class Constructor implements ITypeMember {
86
86
  getEntity(): ConstructorEntity;
87
87
  getSubstitutions(): Substitutions;
88
88
  isHidden(): EntityHidingLevel | undefined;
89
+ isStatic(): boolean;
89
90
  equals(other: TypeMember): boolean;
90
91
  }
91
92
  export declare class Destructor implements ITypeMember {
@@ -98,6 +99,7 @@ export declare class Destructor implements ITypeMember {
98
99
  getEntity(): DestructorEntity;
99
100
  getSubstitutions(): Substitutions;
100
101
  isHidden(): EntityHidingLevel | undefined;
102
+ isStatic(): boolean;
101
103
  applySubstitutions(substitutions: Substitutions): Destructor;
102
104
  equals(other: TypeMember): boolean;
103
105
  }
@@ -112,6 +114,7 @@ export declare class Indexer implements ITypeMember {
112
114
  getEntity(): IndexerEntity;
113
115
  getSubstitutions(): Substitutions;
114
116
  isHidden(): EntityHidingLevel | undefined;
117
+ isStatic(): boolean;
115
118
  applySubstitutions(substitutions: Substitutions): Indexer;
116
119
  equals(other: TypeMember): boolean;
117
120
  }
@@ -124,11 +127,13 @@ export declare class DereferenceOperator implements ITypeMember {
124
127
  getEntity(): DereferenceOperatorEntity;
125
128
  getSubstitutions(): Substitutions;
126
129
  isHidden(): EntityHidingLevel | undefined;
130
+ isStatic(): boolean;
127
131
  applySubstitutions(substitutions: Substitutions): DereferenceOperator;
128
132
  equals(other: TypeMember): boolean;
129
133
  }
130
134
  export interface ITypeMember {
131
135
  isHidden(): EntityHidingLevel | undefined;
136
+ isStatic(): boolean;
132
137
  getSubstitutions(): Substitutions;
133
138
  equals(other: TypeMember): boolean;
134
139
  }
@@ -1,4 +1,5 @@
1
1
  export * from './AliasType.js';
2
+ export * from './IntersectionType.js';
2
3
  export * from './MethodType.js';
3
4
  export * from './ParameterType.js';
4
5
  export * from './StandardTypes.js';