@private¶
-
.. @private::
¶ - 语法
@private [{typeExpression}]
- 概述
使用JSDoc标记字典(默认启用):
@private
With the Closure Compiler tag dictionary:The
@private
tag marks a symbol as private, or not meant for general use. Private members are not shown in the generated output unless JSDoc is run with the-p/--private
command-line option. In JSDoc 3.3.0 and later, you can also use the-a/--access
`command-line`_ to change this behavior.The
@private
tag is not inherited by child members. For example, if the@private
tag is added to a namespace, members of the namespace can still appear in the generated output; because the namespace is private, the members’ namepath will not include the namespace.The
@private
tag is equivalent to@access private
.- 示例
In the following example,
Documents
andDocuments.Newspaper
appear in the generated documentation, but notDocuments.Diary
.Using the @private tag¶/** @namespace */ var Documents = { /** * An ordinary newspaper. */ Newspaper: 1, /** * My diary. * @private */ Diary: 2 };