My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
TagStatic  
@static
Updated Aug 4, 2011 by micmath

The @static Tag

The @static tag indicate that accessing the documented variable does not require instantiation of its parent or containing object.

Syntax

@static

Example

Hello = {}

/**
 * @static
 */
Hello.World = function() {
    alert("Hello world");
}

In this case you are documenting that the World function is a static method of the Hello object. In most cases the JsDoc Toolkit parser can determine that fact on its own, but this tag may rarely be required when it can't.

See Also

  • The @namespace tag is used to document that a variable is meant to be used like a "namespace" with static properties.
Powered by Google Project Hosting