同义词
var
语法
@member [<type>] [<name>]
概述
@member 标记标识任何没有更专门类型(例如“类”、“函数”或“常量”)的成员。成员可以选择具有类型和名称。
示例
/** @class */
function Data() {
/** @member {Object} */
this.point = {};
}
以下是一个使用 @var(@member 的同义词)来记录(虚拟)变量“foo”的示例。
/**
* A variable in the global namespace called 'foo'.
* @var {number} foo
*/
上述示例等效于以下内容
/**
* A variable in the global namespace called 'foo'.
* @type {number}
*/
var foo;