【发布时间】:2011-11-07 02:22:08
【问题描述】:
如果像示例中那样,在构造函数中参数和属性的名称相同,是否有办法避免为@property 和@param 键入两行单独的行。
/**
* Class for representing a point in 2D space.
* @property {number} x The x coordinate of this point.
* @property {number} y The y coordinate of this point.
* @constructor
* @param {number} x The x coordinate of this point.
* @param {number} y The y coordinate of this point.
* @return {Point} A new Point
*/
Point = function (x, y)
{
this.x = x;
this.y = y;
}
【问题讨论】:
标签: javascript documentation documentation-generation jsdoc