Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get JSDoc to mark my param as a jQuery object?

I'm attempting to thoroughly comment my JavaScript and I'm using JSDoc. I have a function that consumes a jQuery object and I'd like to mark the parameter as such.

Currently, I have this:

/**
 * Initializes a login object.
 * @param formEl {JQuery} The login form element on the page.
 */
var login = function(formEl){ ... }

But JSDoc doesn't recognize (or properly format) "JQuery" as a variable type. Any help?

like image 951
Nick G. Avatar asked Nov 28 '12 17:11

Nick G.


1 Answers

According to http://code.google.com/p/jsdoc-toolkit/wiki/TagParam it should be

Param type before param name.

/**
 * Initializes a login object.
 * @param {jQuery} formEl The login form element on the page.
 */
var login = function(formEl){ ... }
like image 188
OneOfOne Avatar answered Oct 07 '22 09:10

OneOfOne