简体   繁体   English

如何在jsdoc中记录函数和函数构造函数的属性?

[英]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/ 参见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){}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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