jest-codemods
jest-codemods copied to clipboard
Typescript: function (this) is incorrectly transformed
I ran the parser on Typescript and found that function (this) gets incorrectly transformed to this =>. The result was invalid syntax.
this is a special case and should not be transformed; see https://www.typescriptlang.org/docs/handbook/2/functions.html#declaring-this-in-a-function
Thanks for reporting. Which transformer did you use?
Are you up for fixing the issue?