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();