Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link to documentation #68

Closed
recidive opened this issue Sep 21, 2012 · 1 comment
Closed

Link to documentation #68

recidive opened this issue Sep 21, 2012 · 1 comment

Comments

@recidive
Copy link

Is there a link to a complete documentation for how to document code compatible with dox?

I miss specially how to document functions that takes a variable number of arguments, and arguments that accept any types. I saw JSDoc uses {...Type} for the former and {*} for the latter, maybe it's something like {...*} for an argument with variable number of arguments of all types.

How would you document a function that takes a string as the first argument, and a callback as the last, and any number of arguments of any type in between?

/**
 * Description.
 *
 * @param {String} key
 * @param {...*} argument
 * @param {Function} callback
 * @api private
 */

Also, how to document an argument that can be of e.g. Object or String types and be omitted or set to null? In JSDoc I see something like {?Object|String} or @param {Object|String} [arg].

Thanks in advance.

@ForbesLindesay
Copy link
Contributor

https://developers.google.com/closure/compiler/docs/js-for-compiler is probably seen as the most definitive guide to how to write JS-docs. I think http://constellation.github.com/doctrine/demo/index.html does a slightly better job of parsing the comments so if you want to be future proof I'd suggest coding to work well with that.

@Twipped Twipped closed this as completed Mar 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants