Skip to main content

@access

Syntax

@access public
@access protected
@access private
@access package

Overview

@access sets the access level of a symbol. It is equivalent to the individual tags @public, @protected, @private, and @package, which are shorthand aliases.

Example

/**
* @access private
*/
function _helper() {}
tip

The shorthand tags @private, @protected, @public, and @package are more commonly used than @access directly.

Access levels

ValueMeaning
publicVisible to everyone (default)
protectedVisible to the class and its subclasses
privateVisible only within the class
packageVisible only within the same package

See also

Official reference: jsdoc.app/tags-access