-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documenting events? #581
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It appears that the following code is undocumentable with ESdoc (using the node.js EventEmitter):
Here, the
anevent
event is associated with the classExample
, not with any particular method of it. Multiple methods may emit that event, and the API is designed such that it doesn't matter what method emits the event (this is the intent of events to begin with), ason('anevent', ...)
would be called on anExample
instance, not on the return value of some particular method.Also, this code simply uses the functionality of the base
EventEmitter
, it does not define any custom event code that can itself serve as a documentation target.In other words, events are a property of the class
Example
, and not of anything else.However, ESdoc does not seem to recognize
@emits
in class documentation, only in method documentation, even though it is the class that emits the events.Is there a way to document this type of code with ESdoc?
The text was updated successfully, but these errors were encountered: