Skip to content

Refactor > Rename does not work correctly for private constructor properties #1154

@NoelAbrahams

Description

@NoelAbrahams

Hi,

VS: 2013 Update 4 RC.
TS: 1.3

In the code below:

class Foo {

    constructor(
        private bar: string
        ) { }

    getBar() {
        return this.bar;
    }
}

right-clicking on the constructor bar and renaming does not rename this.bar in getBar.

If bar is public or defined outside of the constructor, then the rename works correctly.

Metadata

Metadata

Labels

BugA bug in TypeScriptDuplicateAn existing issue was already createdFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions