I'm wondering how to documenting jQuery plugin by using JSDoc? My code is:
/**
* 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) {
// ..
}
I want @method
is $.fn.comments
but it doesn't work.
Acording to JSDoc3 docs you should use @external
in your case:
/**
* 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
*/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With