Fix range for TypeScript optional parameter in arrow function (#9463)

This commit is contained in:
Brian Ng
2019-02-06 08:17:32 -06:00
committed by GitHub
parent e03e5ba01d
commit 07b0f22a3f
3 changed files with 135 additions and 8 deletions

View File

@@ -1849,7 +1849,7 @@ export default (superClass: Class<Parser>): Class<Parser> =>
return this.finishNode(typeCastNode, "TSTypeCastExpression");
}
return node;
return this.finishNode(node, node.type);
}
parseExportDeclaration(node: N.ExportNamedDeclaration): ?N.Declaration {