Fix typescript parsing typed object shorthand methods (#8677)

This commit is contained in:
Brian Ng
2018-09-14 10:20:59 -05:00
committed by GitHub
parent 402bd1cc42
commit 380f2a0297
3 changed files with 379 additions and 3 deletions

View File

@@ -1803,9 +1803,8 @@ export default (superClass: Class<Parser>): Class<Parser> =>
}
parseObjPropValue(prop: N.ObjectMember, ...args): void {
if (this.isRelational("<")) {
throw new Error("TODO");
}
const typeParameters = this.tsTryParseTypeParameters();
if (typeParameters) prop.typeParameters = typeParameters;
super.parseObjPropValue(prop, ...args);
}