Closed
Description
I want to be able to rename a file based on an import or export specifier:
import "./foo";
import * as foo from "./foo.ts";
export * from './bar';
In other words, F2 in VS Code on "./foo"
, "./foo.ts
, and './bar'
should allow me to rename the file if it originates from the appropriate workspace. Ideally this doesn't mess with .d.ts
files that aren't considered hand-authored, but that's tough to differentiate.
My expectations:
- we should maintain the extension for the new file if unspecified in the import/export specifier (i.e. keep it as
.js
,.jsx
,.ts
,.tsx
if not mentioned in the resulting string) - we should change the extension if explicitly specified in the new specifier
- for affected import/export specifiers, we should maintain whether or not an extension was ever specified.