Skip to content

"Move to file" carries forward imports to target file #54307

@DanielRosenwasser

Description

@DanielRosenwasser

Here's hello.ts:

import { World } from "./world";

export function getHello() {
    return "hello";
}

export function getWorld(): World {
    return "world";
}

Here's world.ts

export type World = "world";

Here's what "move to file" will generate to world.ts:

import { World } from "./world";

export type World = "world";export function getWorld(): World {
    return "world";
}

Notice that the import for World is brought over to the target file.

Metadata

Metadata

Assignees

No one assigned

    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