Reputation: 385
I use WebStorm.
I've split a code from a file with interfaces and moved every interface to a separate file.
What is the most efficient way to update the import paths of these interfaces for each file that uses the interface?
Currently, I search by an interface name, where it's used, deleted the import and auto import again. It's not a very convenient way to do it...
Upvotes: 1
Views: 624
Reputation: 349
Option 1:
You can cleanly move the interface to a dedicated file by Refactor
> Move
option. You can do this by placing a cursor on the interface declaration and hit F6
.
Option 2:
Trigger "Import all unambiguous imports" per file with Alt
+ Shift
+ Enter
. However, it requires doing Alt
+ Enter
first if you don't see the below tooltip.
Upvotes: 1