小编jus*_*ing的帖子

JSDoc Toolkit - 如何在同一行上指定@param和@property

有没有办法避免必须为@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;
}
Run Code Online (Sandbox Code Playgroud)

javascript documentation documentation-generation jsdoc

8
推荐指数
1
解决办法
1203
查看次数