Skip to content

"Move to a new file" refactor was recently broken for some import namesΒ #60408

Closed
@CGNonofr

Description

@CGNonofr

πŸ”Ž Search Terms

refactor, move to new file

πŸ•— Version & Regression Information

⏯ 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fix AvailableA PR has been opened for this issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions