简体   繁体   中英

How to document properties of a function and functional constructors in jsdoc?

For example how would I document this?

var f = function () { var g = function() {}; gh = function(); return g; }

This isn't a pattern I've invented. See http://bost.ocks.org/mike/chart/

Check this link out . Very helpful reference.

Do something like this.

/** 

*@method 
*@param

* {string} parameterA used to process..... 
* @description 
* function is used to process...... 
*/ 

Params is for parameters mentioning its type. Description describes what the function does.

function a(parameterA){}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM