Closed
Description
TypeScript Version: 2.7.2
Search Terms:
IntelliSense
static
subclass
JSDoc
Class
Members
inheritDoc
Code
abstract class BaseClass {
/**
* Useful description always applicable
*
* @returns {string} Useful description of return value always applicable.
*/
public static doSomethingUseful(stuff?: any): string {
throw new Error('Must be implemented by subclass');
}
/**
* Applicable description always.
*/
public static readonly someProperty: string = 'general value';
}
class SubClass extends BaseClass {
/**
* @inheritDoc
*
* @param {{ tiger: string; lion: string; }} [mySpecificStuff] Description of my specific parameter.
*/
public static doSomethingUseful(mySpecificStuff?: { tiger: string; lion: string; }): string {
let useful = '';
// do something useful to useful
return useful;
}
/**
* @inheritDoc
*/
public static readonly someProperty: string = 'specific to this class value'
}
Expected behavior:
For someProperty
I expect the JSDocs describes for BaseClass.someProperty
to show up exactly for SubClass.someProperty
For doSomethingUseful(...)
I expect the documentation that was provided for BaseClass.doSomethingUseful
to show up for SubClass.doSomethingUseful
. I also expect the extra documentation (the parameters in this case) for SubClass.doSomethingUseful
to also show up in the intellisense documentation for SubClass.doSomethingUseful
.
Actual behavior:
The actual behavior is that the static properties of SubClass
is not getting inherited docs from BaseClass