Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encapsulate Field Refactoring #13911

Closed
mjbvz opened this issue Feb 6, 2017 · 2 comments
Closed

Encapsulate Field Refactoring #13911

mjbvz opened this issue Feb 6, 2017 · 2 comments
Labels
Duplicate An existing issue was already created VS Code Tracked There is a VS Code equivalent to this issue

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Feb 6, 2017

From microsoft/vscode#19905

Add a refactoring to encapsulate a field in a class, similar to https://msdn.microsoft.com/en-us/library/a5adyhe9.aspx:

class Foo {
    bar: string;
}

Encapsulating the bar field would change the class to:

class Foo {
    private _bar: string;

    public get bar() { return _bar; }
    public set bar(value: string) { _bar = value; }
}
@mhegazy
Copy link
Contributor

mhegazy commented Feb 6, 2017

Duplicate of #12417

@mhegazy mhegazy added the Duplicate An existing issue was already created label Feb 6, 2017
@mjbvz
Copy link
Contributor Author

mjbvz commented Feb 6, 2017

Thanks @mhegazy

Closing as duplicate

@mjbvz mjbvz closed this as completed Feb 6, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created VS Code Tracked There is a VS Code equivalent to this issue
Projects
None yet
Development

No branches or pull requests

2 participants