Skip to content

How should we handle directory renames with 'getEditsForFileRename'? #24260

@mjbvz

Description

@mjbvz

For a project:

jsconfig.json
index.ts
sub/
    a.ts
    b.ts

Where index.ts:

import {a} from './sub/a'
import {b} from './sub/b'
console.log(a, b);

If the user renames the directory sub -> sub2, how should we handle updating the paths using the getEditsForFileRename api? Is this something we want to support in V1?

I'm concerned that renaming directories may require a call to getEditsForFileRename for each file, which will be chatty

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: LS: Refactoringse.g. extract to constant or function, rename symbolFixedA PR has been merged for this issueSuggestionAn idea for TypeScript

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions