Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
@jespertheend

Description

@jespertheend
Issue body actions

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).

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    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

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.