Implement optionality marker for @param
victorteokw opened this issue · 5 comments
victorteokw commented
Implement optionality marker for @param
hildjj commented
The node.js API docs are generated with square brackets around the optional parameters. I like that a lot. Something as simple as the description ending in (optional)
or starting with Optional,
would be perfectly adequate.
mitar commented
Why was this closed? I would also need this feature.
inossidabile commented
Because you can specify "optional" manually and this is not a PR.
mitar commented
But you cannot specify that for the signature.
E-geek commented
Please do not forget the default.
Example (as JSDoc param ):
# @param {String} [name] optional value
# @param {Number} [input = 1] optional with default value
Or other format:
# @param {String} name optional value [optional]
# @param {Number} input optional with default value [default = 1]