【发布时间】:2015-02-05 05:34:43
【问题描述】:
我一直在尝试使用 JSDoc 记录以下代码:
/**
* @module person
*/
/**
* A human being.
* @class
* @param {string} name
*/
function Person(name){
this.name = name
}
Person.prototype = new function(){
var amount_of_limbs = 4;
/**
* Introduce yourself
*/
this.greet = function(){
alert("Hello, my name is " + this.name + " and I have " + amount_of_limbs + " limbs");
}
}
但是在生成的 JSDoc 文档中找不到方法 greet。我做错了什么?
【问题讨论】:
-
您找到解决方案了吗?
-
我想我有。它涉及使用@alias AFAIR。 usejsdoc.org/tags-alias.html
-
哎呀,你在回答中确实提到了这一点,不知何故我错过了。太糟糕了,你没有详细说明你的答案来用你的问题中的例子来证明它。都一样,感谢您的跟进。
标签: javascript documentation-generation jsdoc code-documentation jsdoc3