Skip to content

JsDoc optional params with [] syntax breaks JSDoc comments in signature help #6810

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

Closed
billti opened this issue Feb 2, 2016 · 5 comments · Fixed by #10671
Closed

JsDoc optional params with [] syntax breaks JSDoc comments in signature help #6810

billti opened this issue Feb 2, 2016 · 5 comments · Fixed by #10671
Assignees
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@billti
Copy link
Member

billti commented Feb 2, 2016

The last two parameters below don't show the description in the signature help for that parameter, the first two do. It appears to be the [name] syntax that breaks this.

/**
 * @param {string} p1 - A string param
 * @param {string?} p2 - An optional param 
 * @param {string} [p3] - Another optional param
 * @param {string} [p4="test"] - An optional param with a default value
 */
function f1(p1, p2, p3, p4){}
@billti billti added Bug A bug in TypeScript Salsa labels Feb 2, 2016
@billti billti added this to the TypeScript 1.8.2 milestone Feb 2, 2016
RyanCavanaugh added a commit to RyanCavanaugh/TypeScript that referenced this issue Feb 3, 2016
@RyanCavanaugh RyanCavanaugh added the Fixed A PR has been merged for this issue label Feb 3, 2016
@RyanCavanaugh
Copy link
Member

Moving to TS2.0 milestone since this involves a lot more work than we anticipated

@RyanCavanaugh RyanCavanaugh changed the title JsDoc optional params with [] syntax breaks signature help JsDoc optional params with [] syntax breaks JSDoc comments in signature help Feb 4, 2016
@RyanCavanaugh RyanCavanaugh removed the Fixed A PR has been merged for this issue label Feb 17, 2016
@mhegazy mhegazy modified the milestones: TypeScript 2.0, TypeScript 2.1 Jun 9, 2016
@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Sep 15, 2016
@Elarcis
Copy link

Elarcis commented Sep 29, 2016

Has this fix been implemented in TS 2.0.3? Because I'm using this version in VSCode (and I'm certain I'm overriding the TS version via my workspace settings), and this issue's still there.

It also breaks the syntax highlighting of jsdoc, I think I'm going to submit a separate issue on the grammar repo for that.

@sandersn
Copy link
Member

No, it's going to ship in 2.1. If you npm install typescript@next and then point your VSCode there you should see the fix.

@mhegazy
Copy link
Contributor

mhegazy commented Sep 29, 2016

VSCode ships with an older version of TypeScript. Please see Using Newer TypeScript Versions documentation for more details on updating your VSCode to use a different version of TypeScript.

@Elarcis
Copy link

Elarcis commented Sep 29, 2016

@sandersn Thanks, indeed I installed the latest build and it works.

@mhegazy : "and I'm certain I'm overriding the TS version via my workspace settings"

@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 Fixed A PR has been merged for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants