Class $interface.descriptor
This is a fake class used to document the descriptor object that is passed to the $interface function to define an interface. The documented properties are handled specially as described by each property. All possible property names beginning with a dollar sign ($), or an underscore and dollar sign (_$) are to be considered reserved for use by the $class library. Anything else is fair game for defining properties and methods in an interface.
Unless documented otherwise, all properties in the descriptor are expected to describe interface methods. The value of these properties must be a function, but its implementation will not be used, so don't bother writing code in the body of the function. Providing a function value for these properties gives you a good place to define and document params and return values. It also allows the debug version of the $class library to yell at you if you try to create a non-static non-method property on an interface.
Property Modifiers
The following modifiers can be applied to properties in the descriptor. See the documentation for each modifier for details and examples.- $static - create a static property or method.
Defined in: class-debug.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Field Attributes | Field Name and Description |
---|---|
One or more interfaces to be inherited by this interface. |
One or more interfaces to be inherited by this interface. Implementations of this interface will be considered to be implementations of all inherited interfaces. All interface methods will be inherited, meaning that implementations of this interface must implement all methods of all inherited interfaces in addition to any methods defined by this interface.
Debug version errors:
- $extends is specified, but one of the values is null/undefined. This usually indicates that you attempted to extend an interface and forgot to include the JS file that defines that interface, or maybe you misspelled the interface name.
- Attempt to extend something that is not an $interface.