You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
/** * @cfg {number/Function} myCfg This can be either a number or a function. * When I specify the signature of the function, however, the result is not * as I expect. * @cfg {string} myCfg.in Some input string. * @cfg {string} myCfg.return Some return value. */
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.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: