Merge pull request #133 from vjeux/generic_babylon

Support type annotation for rest argument on babylon parser
master
James Long 2017-01-12 10:28:57 -05:00 committed by GitHub
commit 809aabc3bd
1 changed files with 5 additions and 1 deletions

View File

@ -288,7 +288,11 @@ function genericPrintNoParens(path, options, print) {
case "SpreadProperty":
case "SpreadPropertyPattern":
case "RestElement":
return concat([ "...", path.call(print, "argument") ]);
return concat([
"...",
path.call(print, "argument"),
path.call(print, "typeAnnotation")
]);
case "FunctionDeclaration":
case "FunctionExpression":
if (n.async)