Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.


TypeScript Version: 4.0.5, 4.1.2, and 4.2.0-dev.20201123
Search Terms: es5 target, arrow function, enum destructure
Code
Expected behavior: With --target es5, both es6 arrow functions should be converted to anonymous functions
Actual behavior: The first arrow function is not converted. Replacing the enums in the destructure keys fixes the function, as does using TypeScript 3.7.5.
Playground Link: Playground link
Related Issues: