Merge pull request #133 from vjeux/generic_babylon

Support type annotation for rest argument on babylon parser
This commit is contained in:
James Long authored and GitHub committed 2017-01-12 10:28:57 -05:00
commit 809aabc3bd
1 file changed
+5 -1
+5 -1
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)