From 291440b730d808193ce1cae16426821cbe478f1c Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Wed, 11 Jan 2017 15:14:46 -0800 Subject: [PATCH] Support method generics on babylon parser This is working on the flow parser but not babylon ```js echo 'class C { submit() { } }' | ./bin/prettier.js --stdin class C { submit() {} } ``` --- src/printer.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/printer.js b/src/printer.js index 78d2d64d..e7fb5891 100644 --- a/src/printer.js +++ b/src/printer.js @@ -1811,6 +1811,10 @@ function printObjectMethod(path, options, print) { parts.push(key); } + if (objMethod.typeParameters) { + parts.push(path.call(print, "typeParameters")); + } + parts.push( multilineGroup(concat([ printFunctionParams(path, print, options),