What is the best sort of jsduck header to put over a method of a class (such as a ExtJS subclass) that handles an event? Jsduck seems to support the same tags as jsdoc, but I’m not sure if the @event tag is appropriate.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
An event handler should be documented the same as any other method (
@method, etc.).@eventis tag you would use for a listenable event:Where you document your events is subjective. You might do it like I did above if that is the only entry point to that event, or as is shown in the JsDuck docs, when event names are actually declared, if you do add them formally with an
addEvents(events)method.The docs are not explicit, but presumably any
@eventtag occurring in the context of a given object will be associated with that object.