Refactor/Move attempts to moves files instead of functions
I'm trying to move a simple static function that is called from a lot of places, from 1 file & class into another file & class.
Right now when I do the interface I get is about moving the whole class and some random data. Not the specific static function.
Here is a picture: http://prntscr.com/n1nmr0
Using:
WebStorm 2018.2.7
Build #WS-182.5107.43, built on November 27, 2018
macOS 10.13.6
Copy is also doing the same behaviour. Rename is working correctly.
Please sign in to leave a comment.
Just tried inside a typescript file without a class or method, and I was able to move pure functions. But not static functions inside a class or module.
Moving methods is not currently supported, please follow https://youtrack.jetbrains.com/issue/WEB-34698 for updates
Thank you. Is there any cool hacks or tricks I can use to help refactor my code in the meantime?
I'm not aware of any:(
A coworker is using the version 2017.3
and it seems this feature is working on there: http://prntscr.com/n2xh95
Do you recommend me to download that version? Can I use 2 separate versions of Webstorm while working on the same repo?
This feature was enabled for static methods in 2017.3, but didn't always work as expected (https://youtrack.jetbrains.com/issue/WEB-29669) and has been removed