I'm looking for documentation generator for my JS library. I find JSDuck the most comprehensive and powerful one. But I don't see a way to define type variables for generic classes and functions using its syntax. Quick look at popular JS documentation generators makes me feel that neither of them has a capability of doing that. Here is a pseudo-example of what I'm looking for:
/**
* @class MyArray
* My perfect array class.
* @typevar T
*/
MyArray = function() ...
/**
* @class BirdArray
* Please count birds using this awesome array class.
* @typevar T extends {Bird}
* @extends {MyArray<T>}
*/
BirdArray = function() ...
extend(BirdArray, MyArray);
Sample output:
MyArray<T>
My perfect array class.
BirdArray<T extends Bird> extends MyArray<T>
Please count birds using this awesome array class.
Is there a way of achieving that in JSDuck? If not, is there some JS documentation generator which can do that for me? Please assume that it should be as versatile as JSDuck, to make sure that I'll be able to use arbitrary class inheritance pattern.