@@ -482,9 +482,11 @@ declare namespace ts {
482
482
type DeclarationName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | BindingPattern ;
483
483
interface Declaration extends Node {
484
484
_declarationBrand : any ;
485
+ }
486
+ interface NamedDeclaration extends Declaration {
485
487
name ?: DeclarationName ;
486
488
}
487
- interface DeclarationStatement extends Declaration , Statement {
489
+ interface DeclarationStatement extends NamedDeclaration , Statement {
488
490
name ?: Identifier | StringLiteral | NumericLiteral ;
489
491
}
490
492
interface ComputedPropertyName extends Node {
@@ -495,15 +497,15 @@ declare namespace ts {
495
497
kind : SyntaxKind . Decorator ;
496
498
expression : LeftHandSideExpression ;
497
499
}
498
- interface TypeParameterDeclaration extends Declaration {
500
+ interface TypeParameterDeclaration extends NamedDeclaration {
499
501
kind : SyntaxKind . TypeParameter ;
500
502
parent ?: DeclarationWithTypeParameters ;
501
503
name : Identifier ;
502
504
constraint ?: TypeNode ;
503
505
default ?: TypeNode ;
504
506
expression ?: Expression ;
505
507
}
506
- interface SignatureDeclaration extends Declaration {
508
+ interface SignatureDeclaration extends NamedDeclaration {
507
509
name ?: PropertyName ;
508
510
typeParameters ?: NodeArray < TypeParameterDeclaration > ;
509
511
parameters : NodeArray < ParameterDeclaration > ;
@@ -516,7 +518,7 @@ declare namespace ts {
516
518
kind : SyntaxKind . ConstructSignature ;
517
519
}
518
520
type BindingName = Identifier | BindingPattern ;
519
- interface VariableDeclaration extends Declaration {
521
+ interface VariableDeclaration extends NamedDeclaration {
520
522
kind : SyntaxKind . VariableDeclaration ;
521
523
parent ?: VariableDeclarationList | CatchClause ;
522
524
name : BindingName ;
@@ -528,7 +530,7 @@ declare namespace ts {
528
530
parent ?: VariableStatement | ForStatement | ForOfStatement | ForInStatement ;
529
531
declarations : NodeArray < VariableDeclaration > ;
530
532
}
531
- interface ParameterDeclaration extends Declaration {
533
+ interface ParameterDeclaration extends NamedDeclaration {
532
534
kind : SyntaxKind . Parameter ;
533
535
parent ?: SignatureDeclaration ;
534
536
dotDotDotToken ?: DotDotDotToken ;
@@ -537,7 +539,7 @@ declare namespace ts {
537
539
type ?: TypeNode ;
538
540
initializer ?: Expression ;
539
541
}
540
- interface BindingElement extends Declaration {
542
+ interface BindingElement extends NamedDeclaration {
541
543
kind : SyntaxKind . BindingElement ;
542
544
parent ?: BindingPattern ;
543
545
propertyName ?: PropertyName ;
@@ -559,7 +561,7 @@ declare namespace ts {
559
561
type ?: TypeNode ;
560
562
initializer ?: Expression ;
561
563
}
562
- interface ObjectLiteralElement extends Declaration {
564
+ interface ObjectLiteralElement extends NamedDeclaration {
563
565
_objectLiteralBrandBrand : any ;
564
566
name ?: PropertyName ;
565
567
}
@@ -581,15 +583,15 @@ declare namespace ts {
581
583
kind : SyntaxKind . SpreadAssignment ;
582
584
expression : Expression ;
583
585
}
584
- interface VariableLikeDeclaration extends Declaration {
586
+ interface VariableLikeDeclaration extends NamedDeclaration {
585
587
propertyName ?: PropertyName ;
586
588
dotDotDotToken ?: DotDotDotToken ;
587
589
name : DeclarationName ;
588
590
questionToken ?: QuestionToken ;
589
591
type ?: TypeNode ;
590
592
initializer ?: Expression ;
591
593
}
592
- interface PropertyLikeDeclaration extends Declaration {
594
+ interface PropertyLikeDeclaration extends NamedDeclaration {
593
595
name : PropertyName ;
594
596
}
595
597
interface ObjectBindingPattern extends Node {
@@ -926,7 +928,7 @@ declare namespace ts {
926
928
}
927
929
type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression | ParenthesizedExpression ;
928
930
type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression ;
929
- interface PropertyAccessExpression extends MemberExpression , Declaration {
931
+ interface PropertyAccessExpression extends MemberExpression , NamedDeclaration {
930
932
kind : SyntaxKind . PropertyAccessExpression ;
931
933
expression : LeftHandSideExpression ;
932
934
name : Identifier ;
@@ -1172,7 +1174,7 @@ declare namespace ts {
1172
1174
block : Block ;
1173
1175
}
1174
1176
type DeclarationWithTypeParameters = SignatureDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration ;
1175
- interface ClassLikeDeclaration extends Declaration {
1177
+ interface ClassLikeDeclaration extends NamedDeclaration {
1176
1178
name ?: Identifier ;
1177
1179
typeParameters ?: NodeArray < TypeParameterDeclaration > ;
1178
1180
heritageClauses ?: NodeArray < HeritageClause > ;
@@ -1185,11 +1187,11 @@ declare namespace ts {
1185
1187
interface ClassExpression extends ClassLikeDeclaration , PrimaryExpression {
1186
1188
kind : SyntaxKind . ClassExpression ;
1187
1189
}
1188
- interface ClassElement extends Declaration {
1190
+ interface ClassElement extends NamedDeclaration {
1189
1191
_classElementBrand : any ;
1190
1192
name ?: PropertyName ;
1191
1193
}
1192
- interface TypeElement extends Declaration {
1194
+ interface TypeElement extends NamedDeclaration {
1193
1195
_typeElementBrand : any ;
1194
1196
name ?: PropertyName ;
1195
1197
questionToken ?: QuestionToken ;
@@ -1213,7 +1215,7 @@ declare namespace ts {
1213
1215
typeParameters ?: NodeArray < TypeParameterDeclaration > ;
1214
1216
type : TypeNode ;
1215
1217
}
1216
- interface EnumMember extends Declaration {
1218
+ interface EnumMember extends NamedDeclaration {
1217
1219
kind : SyntaxKind . EnumMember ;
1218
1220
parent ?: EnumDeclaration ;
1219
1221
name : PropertyName ;
@@ -1266,13 +1268,13 @@ declare namespace ts {
1266
1268
moduleSpecifier : Expression ;
1267
1269
}
1268
1270
type NamedImportBindings = NamespaceImport | NamedImports ;
1269
- interface ImportClause extends Declaration {
1271
+ interface ImportClause extends NamedDeclaration {
1270
1272
kind : SyntaxKind . ImportClause ;
1271
1273
parent ?: ImportDeclaration ;
1272
1274
name ?: Identifier ;
1273
1275
namedBindings ?: NamedImportBindings ;
1274
1276
}
1275
- interface NamespaceImport extends Declaration {
1277
+ interface NamespaceImport extends NamedDeclaration {
1276
1278
kind : SyntaxKind . NamespaceImport ;
1277
1279
parent ?: ImportClause ;
1278
1280
name : Identifier ;
@@ -1298,13 +1300,13 @@ declare namespace ts {
1298
1300
elements : NodeArray < ExportSpecifier > ;
1299
1301
}
1300
1302
type NamedImportsOrExports = NamedImports | NamedExports ;
1301
- interface ImportSpecifier extends Declaration {
1303
+ interface ImportSpecifier extends NamedDeclaration {
1302
1304
kind : SyntaxKind . ImportSpecifier ;
1303
1305
parent ?: NamedImports ;
1304
1306
propertyName ?: Identifier ;
1305
1307
name : Identifier ;
1306
1308
}
1307
- interface ExportSpecifier extends Declaration {
1309
+ interface ExportSpecifier extends NamedDeclaration {
1308
1310
kind : SyntaxKind . ExportSpecifier ;
1309
1311
parent ?: NamedExports ;
1310
1312
propertyName ?: Identifier ;
@@ -1435,7 +1437,7 @@ declare namespace ts {
1435
1437
kind : SyntaxKind . JSDocTypeTag ;
1436
1438
typeExpression : JSDocTypeExpression ;
1437
1439
}
1438
- interface JSDocTypedefTag extends JSDocTag , Declaration {
1440
+ interface JSDocTypedefTag extends JSDocTag , NamedDeclaration {
1439
1441
kind : SyntaxKind . JSDocTypedefTag ;
1440
1442
fullName ?: JSDocNamespaceDeclaration | Identifier ;
1441
1443
name ?: Identifier ;
0 commit comments