Push parameter into IIFE/IIAF
Push a parameter of an immediately-invoked function expressions (IIFEs) or an immediately-invoked arrow functions (IIAFs) into the function body.
Why is this refactoring helpful?
With the introduction of
const in ES6, passing parameters into IIFEs as become unnecessary in many cases. Pushing the parameters into the IIFE can simplify the code and unlock the removal of the IIFE.
- Code Assist ID (for the configuration file):
- You can configure custom keyboard shortcuts with this code action kind:
- This code assist provides refactoring suggestions. Learn how to configure the refactoring suggestion visibility.