语法
🌐 Syntax
@this <namePath>
概述
🌐 Overview
@this 标签指示在另一个符号中使用时,this 关键字所指的内容。
🌐 The @this tag indicates what the this keyword refers to when used within another symbol.
示例
🌐 Examples
在以下示例中,@this 标签使得 "this.name" 被记录为 "Greeter#name",而不是名为 "name" 的全局符号。
🌐 In the following example, the @this tag causes "this.name" to be documented as "Greeter#name" rather than a global symbol called "name".
/** @constructor */
function Greeter(name) {
setName.apply(this, name);
}
/** @this Greeter */
function setName(name) {
/** document me */
this.name = name;
}