Support type annotation for rest argument on babylon parser
This is working on the flow parser but not babylon ```js echo 'function f(...flags: Array<boolean>) {}' | ./bin/prettier.js --stdin function f(...flags: Array<boolean>) {} ```master
parent
be6e92f064
commit
35fb28bef2
|
@ -287,7 +287,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)
|
||||
|
|
Loading…
Reference in New Issue