Suppose I have a class like this:
function myClass(q) {
this.someFunction = function(e) {
console.log("Click event");
};
jQuery(q).click(this.someFunction);
}
Is there a way to tell JSDoc that someFunction is not just a function that should be called directly, but an event handler?
I see the @event tag, but if I understand correctly, this is more for documenting the function in my class, which I consider an event (something that the client code should also register, and that my class will be launched if necessary), and not a handler event function?
source
share