Skip to content

JSDoc comment template incorrectly returned for element that already has JSDoc comment #47733

Closed
@jespertheend

Description

@jespertheend

TS Template added by @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.2 as well as 1.64.0-insider
  • OS Version: macOS 12.1

Steps to Reproduce:

  1. Create a js function with parameters and include types via a JSDoc comment
  2. 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: Completion ListsThe issue relates to showing completion lists in an editorDomain: JSDocRelates to JSDoc parsing and type generationHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions