xsburg / vscode-javascript-booster

Sprinkle extra refactorings, code actions and commands over your JavaScript! 🍩 TypeScript and Flow are first class citizens as well!
https://marketplace.visualstudio.com/items?itemName=sburg.vscode-javascript-booster
159 stars 13 forks source link

"Convert to arrow function" loses TypeScript generics #33

Open OliverJAsh opened 4 years ago

OliverJAsh commented 4 years ago
function identity<T>(t: T): T {
  return t;
}

After executing "convert to arrow function":

Expected output:

const identity = <T>(t: T): T => {
  return t;
};

Actual output:

const identity = (t: T): T => {
  return t;
};