Webstorm move top level symbol to another file

The option to move a symbol to a new file is available in the context menu

However it is not available through refactor/move (the top of this article says it should be https://www.jetbrains.com/help/webstorm/specific-javascript-refactorings.html)

Seems that only move file is available, which moves the entire file to a different directory, and is not what I am looking for.

This is an issue for me because I am trying to extract a few top level methods to a new file

0
3 comments

Works fine for me in 2020.3.2:

 

what IDE version do you use? Is it Typescript or Javascript?

0
Avatar
Permanently deleted user

Hi, I'm using the latest version, 2020.3.2. The file is Javascript, in a node project.

Could you please show how you get to that move module members dialog?

0

By right-clicking the function name, Refactor > Move....:

 

0

Please sign in to leave a comment.