@static
May 18, 2022
0 Comments
Overview
The @static tag indicates that a symbol is contained within a parent and can be accessed without instantiating the parent.
Using the @static tag will override a symbol’s default scope, with one exception: Symbols in global scope will remain global.
Examples
The following example has the same effect as writing “@function MyNamespace.myFunction” and omitting the @memberof and @static tags:
- Using @static in a virtual comment
-
/** @namespace MyNamespace */ /** * @function myFunction * @memberof MyNamespace * @static */
The following example forces a module’s inner member to be documented as a static member:
- Using @static to override the default scope
-
/** @module Rollerskate */ /** * The 'wheel' variable is documented as Rollerskate.wheel * rather than Rollerskate~wheel. * @static */ var wheel = 1;
See Also
- @inner, which marks a symbol as an inner member (Parent~Child).
- @instance, which marks a symbol as an instance member (Parent#Child).
- @global, which marks a symbol as global (Child).