Skip to content

"Move to a new file" refactoring does not maintain "import type" semanticsΒ #52852

Description

@johnnyreilly

Bug Report

πŸ”Ž Search Terms

"Move to a new file"

πŸ•— Version & Regression Information

@andrewbranch told me it was a bug and I believe him!

https://twitter.com/atcb/status/1627351253742399490

⏯ Playground Link

N/A

πŸ’» Code

N/A

πŸ™ Actual behavior

Here we're refactoring in VS Code. Moving to a new file - see how before we have import type semantics?

image

Oh no! Post refactoring they're gone!

image

πŸ™‚ Expected behavior

Imagine it was this instead:

image

See how we've got import type here and not just import?

image

That's the issue; ideally import type would be maintained across the refactoring.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptDomain: LS: Refactoringse.g. extract to constant or function, rename symbol

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions