Skip to content
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

JSDoc syntax for optional parameter causes description to disappear from intellisense #9971

Closed
rummelsworth opened this issue Jul 26, 2016 · 3 comments · Fixed by #10671
Closed
Assignees
Labels
Bug A bug in TypeScript Duplicate An existing issue was already created

Comments

@rummelsworth
Copy link

TypeScript Version: within VS Code 1.3.1

JSDoc syntax for optional parameters (e.g. {number} [parameterName] Description) seems to cause the parameter description to not get picked up for intellisense.

Closure Compiler syntax (e.g. {number=} parameterName Description) does not cause the same problem.

Code

/**
 * @param {number} [x] Description
 */
function foo (x) { }

Expected behavior:

Hovering over x in the function declaration shows "Description", like this:

description-for-required-parameter

Actual behavior:

no-description-for-optional-parameter

@sandersn
Copy link
Member

Is this a typescript file or a javascript file?

@sandersn
Copy link
Member

Never mind, it repros for both javascript and typescript.

@sandersn sandersn added the Bug A bug in TypeScript label Jul 26, 2016
@sandersn sandersn self-assigned this Jul 26, 2016
@sandersn sandersn added this to the TypeScript 2.1 milestone Jul 26, 2016
@sandersn
Copy link
Member

Duplicate of #6810

@sandersn sandersn added the Duplicate An existing issue was already created label Aug 30, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Duplicate An existing issue was already created
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants