How do I document mixins or multiple inheritance?
/**
* @class Parent
*/
function Parent() {
}
Parent.prototype.parentTest = 5;
/**
* @class Mixin
*/
function Mixin() {
}
Mixin.prototype.mixinTest = 5;
/**
* @class Child
* @augments Parent
* @mixin Mixin
*/
function Child() {
}
Is there anything official from JsDoc? If not then how would you prefer it to be written?
Multiple
@augments
are actually supported by the JsDoc Toolkit (I haven't tried, but their unit tests suggest so, search for "multiple").For Mixins you can make use of
@lends
and@borrows
, see the examples here: http://code.google.com/p/jsdoc-toolkit/wiki/CookBookHow about:
Add to any objects that get mixed into:
Pulled from documentation link: