2014-07-23 26 views
5

Zastanawiam się, jak dokumentować wtyczkę jQuery za pomocą JSDoc? Mój kod to:Dokumentacja wtyczki jQuery z JSDoc

/** 
    * The default configurations of comments 
    * @typedef {Object} CommentConfig 
    ... 
    */ 

    /** 
    * Show comments 
    * @method comments 
    * @version 1.0.1 
    * @param {CommentConfig} options Configuration of comment 
    */ 
    $.fn.comments = function (options) { 
     // .. 
    } 

Chcę @method jest $.fn.comments ale to nie działa.

Odpowiedz

5

Acording do JSDoc3 docs należy użyć @external w przypadku:

/** 
* The jQuery plugin namespace. 
* @external "jQuery.fn" 
* @see {@link http://docs.jquery.com/Plugins/Authoring The jQuery Plugin Guide} 
*/ 

/** 
* Show comments 
* @function external:"jQuery.fn".comments 
*/