@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
| Value | Meaning |
|---|---|
public | Visible to everyone (default) |
protected | Visible to the class and its subclasses |
private | Visible only within the class |
package | Visible only within the same package |
See also
Official reference: jsdoc.app/tags-access