Skip to content

"Generate 'get' and 'set' accessors" refactor triggers on whitespace #24880

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

Closed
ghost opened this issue Jun 11, 2018 · 3 comments
Closed

"Generate 'get' and 'set' accessors" refactor triggers on whitespace #24880

ghost opened this issue Jun 11, 2018 · 3 comments
Labels
Bug A bug in TypeScript Domain: Refactorings e.g. extract to constant or function, rename symbol Fixed A PR has been merged for this issue

Comments

@ghost
Copy link

ghost commented Jun 11, 2018

TypeScript Version: 3.0.0-dev.20180609

Code

class A {
    p = 0;
}

Highlight any space between { and p.

Expected behavior:

No refactor.

Actual behavior:

Refactor is suggested.

Note refactorConvertToGetAccessAndSetAccess35.ts was meant to test for this, but verify.not.refactorAvailable(); without a name provided will always pass because it compares refactor names to undefined.

@ghost ghost added Bug A bug in TypeScript Domain: Refactorings e.g. extract to constant or function, rename symbol labels Jun 11, 2018
@mhegazy mhegazy added this to the TypeScript 3.0 milestone Jun 11, 2018
@mhegazy mhegazy assigned ghost Jun 11, 2018
@mhegazy
Copy link
Contributor

mhegazy commented Jun 11, 2018

@Kingwl wanna take on this one?

@ghost
Copy link
Author

ghost commented Jun 11, 2018

I've added a verity.refactorsAvailable function in #24878 which asserts the list of names of refactors available, rather than asserting that a particular name isn't present (which would trivially pass if you mistyped the name)

@ghost ghost added the Fixed A PR has been merged for this issue label Jun 18, 2018
@Kingwl
Copy link
Contributor

Kingwl commented Jun 19, 2018

sorry about that, my deadline is coming and i have not enough time to handle that

@ghost ghost closed this as completed in #25054 Jun 19, 2018
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: Refactorings e.g. extract to constant or function, rename symbol Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

2 participants