microsoft / microsoft/TypeScript

JSDoc comment for destructuring param: description text not displayed

Open
#24,746 25 comments 32 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug Domain: JSDoc Help Wanted
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

TypeScript Version:
2.9

Search Terms:
JSDoc destructuring param

Code

/**
 * @param {Object} arg
 * @param {number} arg.id - This param description won't show up
 */
function foo({ id }) {}

Expected behavior:
In VSCode 1.24.0, when typing foo(, IntelliSense should display the full param description, including its type and text.

Actual behavior:
The type is displayed ("number"), but not the text ("This param description won't show up"):
image

Related Issues:
https://github.com/Microsoft/TypeScript/issues/19645

Additional remark
When omitting the {Object} line, the param text shows up correctly:
image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the example with TypeScript 2.9 in VSCode 1.24.0 and compare it with the case that omits the {Object} line. Read the related issue #19645 for context. Done means IntelliSense for foo( displays the destructured parameter's type and description text.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.