Fix compatibility between typescript and jsx plugins in interface declarations (#9058)

This commit is contained in:
Daniel Tschinder
2018-11-21 15:58:50 -08:00
committed by GitHub
parent 4f16a12c03
commit d2971a1959
4 changed files with 286 additions and 1 deletions

View File

@@ -930,7 +930,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
node.extends = this.tsParseHeritageClause();
}
const body: N.TSInterfaceBody = this.startNode();
body.body = this.tsParseObjectTypeMembers();
body.body = this.tsInType(this.tsParseObjectTypeMembers.bind(this));
node.body = this.finishNode(body, "TSInterfaceBody");
return this.finishNode(node, "TSInterfaceDeclaration");
}