Skip to content
nene edited this page Mar 21, 2012 · 5 revisions

Synopsis:

@static

Marks member as static. Without this a member is documented as instance member.

Although Ext4 has a special statics: block for defining static properties and method, JSDuck doesn't understand this and needs an explicit @static tag to be added to each static member:

/**
 * Represents an HTML fragment template.
 */
Ext.define("Ext.Template", {
    statics: {
        /**
         * Creates a template from the passed element's value.
         * @static
         */
        from: function() { ... }
    }
});

Inheritable statics

Also by default the static members won't be inherited by subclasses. Again JSDuck doesn't recognize the inheritableStatics: block and needs to be told explicitly with @inheritable tag:

/**
 * Represents an HTML fragment template.
 */
Ext.define("Ext.Template", {
    inheritableStatics: {
        /**
         * Creates a template from the passed element's value.
         * @static
         * @inheritable
         */
        from: function() { ... }
    }
});
Clone this wiki locally