如何在JSDoc3中正确地记录这些代码?
var Foo,
doFoo;
/**
* What JSDoc string should go here ...
*/
doFoo = function () {};
/**
* @constructor
*/
Foo = function () {};
/**
* ... and here ..
*/
Foo.doFoo = doFoo;
/**
* ... and here ..
*/
Foo.prototype.doBar = doFoo;
/**
* ... and here?
*/
Foo.prototype.doBoo = doFoo;感谢您的帮助..
发布于 2013-09-12 17:28:12
您可能要查找的标记是@method (http://usejsdoc.org/tags-method.html),它让解析器知道看起来不像函数的东西实际上是函数。
如果不想重复描述,还可以使用@link (http://usejsdoc.org/tags-link.html)指向原始函数声明的描述。
https://stackoverflow.com/questions/18759104
复制相似问题