-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Improve EventEmitter documentation #4554
Comments
+1 for consistency but I would go with |
Wow, I've forked the project and it found that it already uses However I've sent a PR improving it a bit. |
I've been leaning towards the term "topic" since "event" can mean both the name of the event and the actual occurrence of the event. |
"topic" to me sounds like something that involves a 2+-way conversation or something, when in this case it's a one-way thing. Maybe just use "event name?" |
fwiw, "event name" in text makes sense to me,
Seems symmetrical and consistent - we call it the exit event, and we set the event argument to the string 'exit'. "topic" is just a word that doesn't show anywhere else in conversation about the event emitter or docs, so doesn't seem to help a lot (to me). |
The DOM exposes a Event class/object to the user, but Node's
Nothing else. And since there is no "Event" object at all it is 100% safe to use |
+1 for |
Implementing the suggestion in nodejs#4554 this pull request renames the parameter name in all the places that accept an event name as a parameter. Previously, the parameter has been called `event` or `type`. Now as suggested it is consistently called `eventName`. PR-URL: Reviewed-By: Reviewed-By:
Implementing the suggestion in #4554 this pull request renames the parameter name in all the places that accept an event name as a parameter. Previously, the parameter has been called `event` or `type`. Now as suggested it is consistently called `eventName`. PR-URL: #5850 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Implementing the suggestion in #4554 this pull request renames the parameter name in all the places that accept an event name as a parameter. Previously, the parameter has been called `event` or `type`. Now as suggested it is consistently called `eventName`. PR-URL: #5850 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Implementing the suggestion in #4554 this pull request renames the parameter name in all the places that accept an event name as a parameter. Previously, the parameter has been called `event` or `type`. Now as suggested it is consistently called `eventName`. PR-URL: #5850 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Implementing the suggestion in #4554 this pull request renames the parameter name in all the places that accept an event name as a parameter. Previously, the parameter has been called `event` or `type`. Now as suggested it is consistently called `eventName`. PR-URL: #5850 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Implementing the suggestion in #4554 this pull request renames the parameter name in all the places that accept an event name as a parameter. Previously, the parameter has been called `event` or `type`. Now as suggested it is consistently called `eventName`. PR-URL: #5850 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
This can be closed. The documentation has been updated to use |
Currently:
In both cases,
type
andevent
arguments refer to the "event name", so I suggest calling both "type".The text was updated successfully, but these errors were encountered: