Open rivo opened 8 years ago
Yeah, it would make sense to detect if the type contains "Function" instead of checking that it strictly equals to "Function".
But truth to be told, the development of JSDuck has kinda stagnated. No idea when this might be implemented.
Thanks for suggestion.
Out of curiosity, what's the reason for that stagnation?
That's just me not being really motivated to develop it as I'm not developing with Sencha stack any more.
Ok, I understand. Actually, I'm not using it for a Sencha project. I like that JSDuck is so flexible that it will adapt to my own style and code organization while still generating very precise documentation.
I would probably contribute but I'm not very familiar with the stack (and I kind of skipped ruby) so there's a bit of a learning curve.
Anyway, it still works for now. It would be great if it could at least remain on life support. ;-)
I often have a situation where two types are allowed for a parameter or config. If one of them is a function, I would like to be able to specify the function's signature but that currently does not work. Here's an example:
This turns into:
It works ok if the accepted type for this config is just
{Function}
but not if multiple types are allowed like{number/Function}
. Is there a way to have jsduck recognize that what follows is the function's signature?I understand that there may be an ambiguity if one specifies
{Object/Function}
but in that case, I would be ok with a fixed preference, e.g. additional subparameters would be interpreted as object fields.