@protected¶
-
.. @protected::
¶ - 语法
@protected [{typeExpression}]
- 概述
With the JSDoc tag dictionary (enabled by default): @protected With the Closure Compiler tag dictionary:
The
@protected
tag marks a symbol as protected. Typically, this tag indicates that a symbol is only available, or should only be used, within the current module.By default, symbols marked with the
@protected
tag will appear in your documentation. In JSDoc 3.3.0 and later, you can use the-a/--access
JSDoc的命令行参数 to change this behavior.The
@protected
tag is equivalent to@access protected
.- 示例
In the following example, the instance member
Thingy#_bar
appears in the generated documentation, but with an annotation indicating that it is protected:Using the @protected tag¶/** @constructor */ function Thingy() { /** @protected */ this._bar = 1; }