@private¶
-
.. @private::¶ - 语法
@private [{typeExpression}]- 概述
使用JSDoc标记字典(默认启用):
@privateWith the Closure Compiler tag dictionary:The
@privatetag 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/--privatecommand-line option. In JSDoc 3.3.0 and later, you can also use the-a/--access`command-line`_ to change this behavior.The
@privatetag is not inherited by child members. For example, if the@privatetag 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
@privatetag is equivalent to@access private.- 示例
In the following example,
DocumentsandDocuments.Newspaperappear in the generated documentation, but notDocuments.Diary.Using the @private tag¶/** @namespace */ var Documents = { /** * An ordinary newspaper. */ Newspaper: 1, /** * My diary. * @private */ Diary: 2 };