Closed
Description
π Search Terms
refactor, move to new file
π Version & Regression Information
- This changed between versions 5.7.0-dev.20241021 and 5.7.0-dev.20241104
- This changed in commit or PR fix autoimports crash: generate namespace and other module symbol imports Β #60333
β― Playground Link
No response
π» Code
- test1.ts:
import Event from './test2.js';
export function test(test: Event): void {
console.log(test);
}
- test2.ts
export default class Event {
}
then tries to "move to new file" the test function from test1.ts
π Actual behavior
the function is moved to a new file, but not the import so Event
is not resolved in the new file
π Expected behavior
the whole content of the test1.ts file is moved to a new file (with the import)
Additional information about the issue
It looks like it has something to do with the name, as if it's imported as something else than Event
there is no issue