Support method generics on babylon parser

This is working on the flow parser but not babylon

```js
echo 'class C<T> { submit<T>() { } }' | ./bin/prettier.js --stdin
class C<T> {
  submit<T>() {}
}
```
master
Christopher Chedeau 2017-01-11 15:14:46 -08:00
parent d25881530f
commit 291440b730
1 changed files with 4 additions and 0 deletions

View File

@ -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),