You can add a hyphen before the description to make it more readable. Be sure to include a space before and after the hyphen.
When hovering over a function name where a parameter definition has the optional hyphen before the description, the hover card will display a double-hyphen. I'm expecting only a single hyphen to be displayed.
Example code:
/**
* My first function!
* @function helloWorld
* @param {String} [_name="World"] - The name of the person to greet.
* @returns {String} A greeting for the supplied name.
*/
function helloWorld(_name="World") {
return "Hello, " + _name + "!";
}
According to JSDocs:
When hovering over a function name where a parameter definition has the optional hyphen before the description, the hover card will display a double-hyphen. I'm expecting only a single hyphen to be displayed.
Example code: