@@ -815,18 +815,21 @@ namespace ts {
815815
816816 export interface ConstructorDeclaration extends FunctionLikeDeclaration , ClassElement {
817817 kind : SyntaxKind . Constructor ;
818+ parent ?: ClassDeclaration | ClassExpression ;
818819 body ?: FunctionBody ;
819820 }
820821
821822 // For when we encounter a semicolon in a class declaration. ES6 allows these as class elements.
822823 export interface SemicolonClassElement extends ClassElement {
823824 kind : SyntaxKind . SemicolonClassElement ;
825+ parent ?: ClassDeclaration | ClassExpression ;
824826 }
825827
826828 // See the comment on MethodDeclaration for the intuition behind GetAccessorDeclaration being a
827829 // ClassElement and an ObjectLiteralElement.
828830 export interface GetAccessorDeclaration extends FunctionLikeDeclaration , ClassElement , ObjectLiteralElement {
829831 kind : SyntaxKind . GetAccessor ;
832+ parent ?: ClassDeclaration | ClassExpression | ObjectLiteralExpression ;
830833 name : PropertyName ;
831834 body : FunctionBody ;
832835 }
@@ -835,6 +838,7 @@ namespace ts {
835838 // ClassElement and an ObjectLiteralElement.
836839 export interface SetAccessorDeclaration extends FunctionLikeDeclaration , ClassElement , ObjectLiteralElement {
837840 kind : SyntaxKind . SetAccessor ;
841+ parent ?: ClassDeclaration | ClassExpression | ObjectLiteralExpression ;
838842 name : PropertyName ;
839843 body : FunctionBody ;
840844 }
@@ -843,6 +847,7 @@ namespace ts {
843847
844848 export interface IndexSignatureDeclaration extends SignatureDeclaration , ClassElement , TypeElement {
845849 kind : SyntaxKind . IndexSignature ;
850+ parent ?: ClassDeclaration | ClassExpression | InterfaceDeclaration | TypeLiteralNode ;
846851 }
847852
848853 export interface TypeNode extends Node {
@@ -937,6 +942,7 @@ namespace ts {
937942
938943 export interface MappedTypeNode extends TypeNode , Declaration {
939944 kind : SyntaxKind . MappedType ;
945+ parent ?: TypeAliasDeclaration ;
940946 readonlyToken ?: ReadonlyToken ;
941947 typeParameter : TypeParameterDeclaration ;
942948 questionToken ?: QuestionToken ;
0 commit comments