admin管理员组

文章数量:1414621

I'm wondering how to documenting jQuery plugin by using JSDoc? My code is:

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

   /**
     * Show ments
     * @method ments
     * @version 1.0.1
     * @param {CommentConfig} options Configuration of ment
     */
    $.fnments = function (options) {
        // ..
    }

I want @method is $.fnments but it doesn't work.

I'm wondering how to documenting jQuery plugin by using JSDoc? My code is:

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

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

I want @method is $.fn.ments but it doesn't work.

Share Improve this question edited Dec 9, 2017 at 18:12 Cœur 38.8k25 gold badges206 silver badges278 bronze badges asked Jul 23, 2014 at 4:13 ducdhmducdhm 1,95215 silver badges26 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

Acording to JSDoc3 docs you should use @external in your case:

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

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

本文标签: javascriptjQuery plugin documentation with JSDocStack Overflow