@@ -815,18 +815,21 @@ namespace ts {
815
815
816
816
export interface ConstructorDeclaration extends FunctionLikeDeclaration , ClassElement {
817
817
kind : SyntaxKind . Constructor ;
818
+ parent ?: ClassDeclaration | ClassExpression ;
818
819
body ?: FunctionBody ;
819
820
}
820
821
821
822
// For when we encounter a semicolon in a class declaration. ES6 allows these as class elements.
822
823
export interface SemicolonClassElement extends ClassElement {
823
824
kind : SyntaxKind . SemicolonClassElement ;
825
+ parent ?: ClassDeclaration | ClassExpression ;
824
826
}
825
827
826
828
// See the comment on MethodDeclaration for the intuition behind GetAccessorDeclaration being a
827
829
// ClassElement and an ObjectLiteralElement.
828
830
export interface GetAccessorDeclaration extends FunctionLikeDeclaration , ClassElement , ObjectLiteralElement {
829
831
kind : SyntaxKind . GetAccessor ;
832
+ parent ?: ClassDeclaration | ClassExpression | ObjectLiteralExpression ;
830
833
name : PropertyName ;
831
834
body : FunctionBody ;
832
835
}
@@ -835,6 +838,7 @@ namespace ts {
835
838
// ClassElement and an ObjectLiteralElement.
836
839
export interface SetAccessorDeclaration extends FunctionLikeDeclaration , ClassElement , ObjectLiteralElement {
837
840
kind : SyntaxKind . SetAccessor ;
841
+ parent ?: ClassDeclaration | ClassExpression | ObjectLiteralExpression ;
838
842
name : PropertyName ;
839
843
body : FunctionBody ;
840
844
}
@@ -843,6 +847,7 @@ namespace ts {
843
847
844
848
export interface IndexSignatureDeclaration extends SignatureDeclaration , ClassElement , TypeElement {
845
849
kind : SyntaxKind . IndexSignature ;
850
+ parent ?: ClassDeclaration | ClassExpression | InterfaceDeclaration | TypeLiteralNode ;
846
851
}
847
852
848
853
export interface TypeNode extends Node {
@@ -937,6 +942,7 @@ namespace ts {
937
942
938
943
export interface MappedTypeNode extends TypeNode , Declaration {
939
944
kind : SyntaxKind . MappedType ;
945
+ parent ?: TypeAliasDeclaration ;
940
946
readonlyToken ?: ReadonlyToken ;
941
947
typeParameter : TypeParameterDeclaration ;
942
948
questionToken ?: QuestionToken ;
@@ -1450,7 +1456,7 @@ namespace ts {
1450
1456
kind : SyntaxKind . NewExpression ;
1451
1457
expression : LeftHandSideExpression ;
1452
1458
typeArguments ?: NodeArray < TypeNode > ;
1453
- arguments : NodeArray < Expression > ;
1459
+ arguments ? : NodeArray < Expression > ;
1454
1460
}
1455
1461
1456
1462
export interface TaggedTemplateExpression extends MemberExpression {
@@ -1504,6 +1510,7 @@ namespace ts {
1504
1510
export type JsxTagNameExpression = PrimaryExpression | PropertyAccessExpression ;
1505
1511
1506
1512
export interface JsxAttributes extends ObjectLiteralExpressionBase < JsxAttributeLike > {
1513
+ parent ?: JsxOpeningLikeElement ;
1507
1514
}
1508
1515
1509
1516
/// The opening element of a <Tag>...</Tag> JsxElement
@@ -1523,15 +1530,15 @@ namespace ts {
1523
1530
1524
1531
export interface JsxAttribute extends ObjectLiteralElement {
1525
1532
kind : SyntaxKind . JsxAttribute ;
1526
- parent ?: JsxOpeningLikeElement ;
1533
+ parent ?: JsxAttributes ;
1527
1534
name : Identifier ;
1528
1535
/// JSX attribute initializers are optional; <X y /> is sugar for <X y={true} />
1529
1536
initializer ?: StringLiteral | JsxExpression ;
1530
1537
}
1531
1538
1532
1539
export interface JsxSpreadAttribute extends ObjectLiteralElement {
1533
1540
kind : SyntaxKind . JsxSpreadAttribute ;
1534
- parent ?: JsxOpeningLikeElement ;
1541
+ parent ?: JsxAttributes ;
1535
1542
expression : Expression ;
1536
1543
}
1537
1544
@@ -1777,7 +1784,7 @@ namespace ts {
1777
1784
kind : SyntaxKind . HeritageClause ;
1778
1785
parent ?: InterfaceDeclaration | ClassDeclaration | ClassExpression ;
1779
1786
token : SyntaxKind . ExtendsKeyword | SyntaxKind . ImplementsKeyword ;
1780
- types ? : NodeArray < ExpressionWithTypeArguments > ;
1787
+ types : NodeArray < ExpressionWithTypeArguments > ;
1781
1788
}
1782
1789
1783
1790
export interface TypeAliasDeclaration extends DeclarationStatement {
0 commit comments