On Mar 27, 4:50 pm, Peter van der Zee <[email protected]> wrote:
> So, I'm looking at jsdoc-toolkit. Can't really find docs about it. I mean
> the wiki has individual tags covered, but not how to actually annotate
> declarations.
>
> http://code.google.com/p/jsdoc-toolkit/
>
> So, according to "jsdoc", how should I annotate a function expression and a
> variable statement with multiple variables declared...
>
> var f = function(){};
>
> var a = 1, b = 2;

I'm afraid there is no accepted standard.  Nor are there even really
common patterns.  The language is so dynamic, with so many different
coding styles that it's really hard to determind

What I would suggest is that you always use the "-n" command-line
parameter, which will only document symbols that you've intentionally
named for documentation.  Then you can do something like this:

    /**
     * @function
     * @name f
     * @description Description of function
     * @param param1 description of first param
     * @param param2 description of second param
     * @return description of return
     */
    var f = function(){};

    /**
     * @field
     * @name a
     * @description Description of field a
     */
    /**
     * @field
     * @name b
     * @description Description of field b
     */
    var a = 1, b = 2;

Cheers,

  -- Scott

-- 
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to