JSDoc 中文网

Synonyms

语法

¥Syntax

@class [<type> <name>]

概述

¥Overview

@class 标记将函数标记为构造函数,意味着使用 new 关键字调用以返回实例。

¥The @class tag marks a function as being a constructor, meant to be called with the new keyword to return an instance.

示例

¥Examples

构造 Person 实例的函数。
/**

 * Creates a new Person.

 * @class
 */
function Person() {
}

var p = new Person();