Skip to content

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

Closed
@billti

Description

@billti

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){}

Metadata

Metadata

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions