coffeedoc/codo

Implement optionality marker for @param

victorteokw opened this issue · 5 comments

Implement optionality marker for @param

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.

Because you can specify "optional" manually and this is not a PR.

mitar commented

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]