@use JSDoc


Table of Contents


With the JSDoc tag dictionary (enabled by default):


With the Closure Compiler tag dictionary:

@package [{typeExpression}]


The @package tag marks a symbol as package-private. Typically, this tag indicates that a symbol is available only to code in the same directory as the source file for this symbol. This tag is available in JSDoc 3.5.0 and later.

By default, symbols marked with the @package tag will appear in your documentation. In JSDoc 3.3.0 and later, you can use the -a/--access command-line option to change this behavior.

The @package tag is equivalent to @access package.


In the following example, the instance member Thingy#_bar appears in the generated documentation, but with an annotation indicating that it is package-private:

Using the @package tag
/** @constructor */
function Thingy() {
    /** @package */
    this._bar = 1;