Skip to content

Move to new file doesn't maintain prologues directives, ts-check #30478

@DanielRosenwasser

Description

@DanielRosenwasser
// @ts-check
"use strict";

export function foo() {
    return bar();
}

function bar() {
    return 100;
}

Use a refactoring to move bar to a new file.

Expected

// @ts-check
"use strict";

export function bar() {
    return 100;
}

Actual

export function bar() {
    return 100;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: Refactoringse.g. extract to constant or function, rename symbolEffort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Help WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions