Open chrisj-back2work opened 2 years ago
Thank you for reporting the issue. It's clearly an uncovered scenario that should be fixed.
In general, JavaScript Booster uses Babel to manipulate code, which prevents syntax errors but cannot prevent semantic errors as above. There are normally two sorts of bugs that might arise in such an approach: the code action shouldn't be available in a certain scenario (therefore the trigger code should be fixed); the code action doesn't work as expected (we need to fix the action logic and support the scenario).
Thank you for a very helpful tool.
Today I found a problem when the refactor target uses generics.
Original code --
Refactored using "Convert to arrow function" --
... which results in
Cannot find name 'T'. ts(2304)
What the refactor should result in --
Does JavaScript Booster have a way to verify if a refactor introduces a compile error?