vscode-javascript-booster icon indicating copy to clipboard operation
vscode-javascript-booster copied to clipboard

"Convert to arrow function" loses TypeScript generics

Open OliverJAsh opened this issue 4 years ago • 0 comments

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;
};

OliverJAsh avatar Jun 26 '20 13:06 OliverJAsh