JSDoc comment template incorrectly returned for element that already has JSDoc comment #47733
Copy link
Copy link
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationDomain: LS: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorHelp WantedYou can do thisYou can do this
Milestone
Description
TS Template added by Matt Bierner (@mjbvz)
TypeScript Version: 4.6.0-dev.20220203
Search Terms
- docCommentTemplate
- jsdoc
Does this issue occur when all extensions are disabled?: Yes
- VS Code Version:
1.63.2as well as1.64.0-insider - OS Version: macOS 12.1
Steps to Reproduce:
- Create a js function with parameters and include types via a JSDoc comment
- Create a new JSDoc comment above the other one and hit enter
For a demo of the issue, visit https://vscode.dev/github/jespertheend/vscode-jsdoc-autocomplete-bug and open jsdoc.js
Expected: No @param autocomplete
Actual: It completes with @param and @return inside the comment.
I'd expect comments to only autocomplete like this if a function is directly below it. Though I suppose autocomplete could be useful for overloading functions, this is not supported in TypeScript right now (see #25590).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationDomain: LS: Completion ListsThe issue relates to showing completion lists in an editorThe issue relates to showing completion lists in an editorHelp WantedYou can do thisYou can do this
Activity
[-]JSDoc autocompletes with @param when it shouldn't[/-][+]JSDoc comment template incorrectly returned for element that already has JSDoc comment[/+]mjbvz commentedon Feb 4, 2022
Inline repo using VS Code :
/** */Bug
docCommentTemplatereturns the template forfoo