- 0133技术站
- 联系QQ:18840023
- QQ交流群

- 微信公众号

描述: 这个标识是受保护的。
使用JSDoc标签字典(默认启用):
@protected
使用Closure Compiler标签字典:
@protected [{typeExpression}]
@protected
标签标记标识符为受保护的,通常情况下,受保护的成员只能在被继承的子类中或在模块内部可以访问。
默认情况下,使用 @protected
标签标记的标识符将会被导出到生成的文档中。在JSDoc3.3.0或更高版本中,您还可以使用 -a/--access
命令行选项来改变这种行为。
@protected
标签和@access protected
是等价的。
在下面的例子中,该实例成员Thingy#_bar
会被导出到生成的文档中,但使用注释说明它是被保护的,
例如,使用@protected 标签:
/** @constructor */ function Thingy() { /** @protected */ this._bar = 1; }
推荐手册