W3cubDocs

/JSDoc

@protected

Table of Contents

Syntax

With the JSDoc tag dictionary (enabled by default):

@protected

With the Closure Compiler tag dictionary:

@protected [{typeExpression}]

Overview

The @protected tag marks a symbol as protected. Typically, this tag indicates that a symbol is only available, or should only be used, within the current module.

By default, symbols marked with the @protected 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 @protected tag is equivalent to @access protected.

Examples

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

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

© 2011–2017 the contributors to the JSDoc 3 documentation project
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
http://usejsdoc.org/tags-protected.html