senchalabs/jsduck — Issue #104: @inheritdoc for mixins?
Author: burnnat
Created: 2011-11-29 14:30:50+00:00
State: open

When attempting to do something like the following:

```javascript
/**
*
*/
Ext.define('SomeMixin', {
/**
* Something will happen.
* Here's a really long description about it.
*/
templateMethod: function() {
console.log('do basic stuff');
}
});

/**
*
*/
Ext.define('MyImplementation', {
mixins: {
something: 'SomeMixin'
},

/**
* This will do some extra things in addition to the basic stuff:
*
* @inheritdoc
*/
templateMethod: function(arg) {
this.mixins.something.templateMethod();
console.log('do extended stuff');
}
});
```
JSDuck gives the error `@inheritdoc - parent class not found`, so it looks as though you can't automatically @inheritdoc from mixins. Of course, the workaround is to specify the parent via `@inheritdoc SomeMixin#templateMethod`, but that's not as nice if things get renamed, etc. Would it be possible to make mixin members automatically inheritable as well? I know it's probably tricky because of multiple inheritance, but it seems like a nice thing to have.