Skip to content

Allow class/function rename to be triggered on declaration keywords and modifiers #28268

Closed
@mjbvz

Description

@mjbvz

Search Terms

  • rename

Suggestion

Follow up on microsoft/vscode#58907

Allow renames to be triggered on keywords such as public, private, class, const, readonly, and function to rename the symbol itself

class Foo {
    public bar() { }
}

function func() { }

const x = 1;

Use the triggerSpan property on the renameResponse to actually trigger the rename on the symbol.

We currently return "You cannot rename this element." for these cases

Metadata

Metadata

Assignees

Labels

CommittedThe team has roadmapped this issueDomain: Refactoringse.g. extract to constant or function, rename symbolDomain: TSServerIssues related to the TSServerSuggestionAn idea for TypeScriptVS Code PriorityCritical issues that VS Code needs fixed in the current TypeScript milestone

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions