@this¶
-
.. @this::
¶ - 语法
@this <namePath>
- 概述
The @this tag indicates what the
this
keyword refers to when used within another symbol.- 示例
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; }