Skip to content

Prepending unused TypeScript variables with underscore doesn't rename JSDoc @param #33021

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
SetTrend opened this issue Aug 22, 2019 · 0 comments · Fixed by #36152 or GulajavaMinistudio/TypeScript#266
Labels
Bug A bug in TypeScript Domain: Quick Fixes Editor-provided fixes, often called code actions.
Milestone

Comments

@SetTrend
Copy link

TypeScript Version: The one Visual Studio Code 1.37.1 is using.

Search Terms: is:issue is:open prepending underscore jsdoc

I've been pointed by the Visual Studio Core team here:

I'm not sure if the current behaviour may be by intention and correctly interpreted by JSDoc parsers:

Nonetheless, when Visual Studio Code's Quick Fix solves the TypeScript linter warning: "unused function parameter" by prepending a parameter name with an underscore, it doesn't rename the corresponding JSDoc parameter reference accordingly:

VS Code Underscore Rename Issue 1
VS Code Underscore Rename Issue 2

I suppose, it should, though.

/ref: /microsoft/vscode/issues/79574

@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label Aug 23, 2019
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Aug 23, 2019
@RyanCavanaugh RyanCavanaugh added the Domain: Quick Fixes Editor-provided fixes, often called code actions. label Aug 23, 2019
sergeir82 added a commit to sergeir82/TypeScript that referenced this issue Jan 12, 2020
…name JSDoc @param.

Fix test for quick fix "Prefix all unused declarations with '_' where possible".
Fixes microsoft#33021.
andrewbranch pushed a commit that referenced this issue Apr 17, 2020
)

* Fix prepending unused TypeScript variables with underscore doesn't rename JSDoc @param.
Fix test for quick fix "Prefix all unused declarations with '_' where possible".
Fixes #33021.

* Replace FindAllReferences.Core.eachSymbolReferenceInFile function call to more ligher call of getJSDocParameterTags when searching for a parameter in jsdoc.

* Remove redundant constant declaration.

* Add test for prefix single unused parameter in jsdoc.
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: Quick Fixes Editor-provided fixes, often called code actions.
Projects
None yet
2 participants