Move Function to File

Extract a function into a separate file.

Want to move a function to a separate file? You can use the Move function quick fix ⌥⏎ (macOS) / Alt+Enter (Windows/Linux) that creates a new file named after this function. Or use the Move... refactoring if you want to select a different target file.


Related Resources

Add New Dependencies
WebStorm can help you add a new dependency.
Add console.log Faster
Use Postfix Completion to quickly add console.log.
Create Arrow Functions in One Click
WebStorm can help you add arrow functions to your code.