WebStorm - Can I define the filename pattern in "Move interface X to X.ts"?
Hi,
Is it possible to define the filename pattern when it comes to interfaces in webstorm? Specifically relating to "Move interface X to X.ts" but it could be useful in other cases take the following example:
I have a file `foo.interface.ts`:
export interface Foo {
bar: Bar
}
export interface Bar {
baz: string
}
Pressing alt+enter on Bar, will bring up intellisense offering to move it to its own file. However, that file will be called `bar.ts`. I would like to change that so that it automatically moves it to a file called `bar.interface.ts`. Is that possible?
Please sign in to leave a comment.
Patterns are not editable, but some variations can be configured in Settings | Editor | Code Style | TypeScript | Code Generation, Filename conventions
See https://www.jetbrains.com/help/webstorm/2023.1/specific-typescriptrefactorings.html#ws_ts_rename_refactoring_keep_names_in_compliance