Closed victorteokw closed 8 years ago
Why was this closed? I would also need this feature.
Because you can specify "optional" manually and this is not a PR.
But you cannot specify that for the signature.
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]
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 withOptional,
would be perfectly adequate.