Open
Description
Suggestion
probably related to #44930 but a different use case. default values on @param
: https://jsdoc.app/tags-param.html
π Search Terms
jsdoc param default value
β Suggestion
Please allow for default value params parsing
/**
* @param {string} [somebody=John Doe] - Somebody's name.
*/
export function sayHello(somebody) {
}
currently parses to tags:
[
{
name: "param",
text: [
{
text: "somebody",
kind: "parameterName"
},
{
text: " ",
kind: "space"
},
{
text: "Doe] - Somebody's name.",
kind: "text"
}
]
}
]
possibly add a new node
{
text: "John Doe",
kind: "defaultValue"
},
and clean up the description from
{
text: "Doe] - Somebody's name.",
kind: "text"
}
to
{
text: "- Somebody's name.",
kind: "text"
}
p.s. it mighy also be worth in general to clean up parameter descriptions text
from the leading hyphen