Skip to content
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 EnhancedEventEmitter #836

Merged
merged 2 commits into from
Jun 18, 2022
Merged

Improve EnhancedEventEmitter #836

merged 2 commits into from
Jun 18, 2022

Conversation

ibc
Copy link
Member

@ibc ibc commented Jun 18, 2022

  • Do not allow any event name starting with '@' (those were not TS checked).
  • Instead, properly include private @xxxx events in XxxxEvents types.
  • Add missing EventEmitter methods.
  • Remove useless @emits xxxx notation in classes.

- Do not allow any event name starting with '@' (those were not TS checked).
- Instead, properly include private `@xxxx` events in `XxxxEvents` types.
- Add missing `EventEmitter` methods.
- Remove useless `@emits xxxx` notation in classes.
@ibc ibc merged commit 4bfdcf6 into v3 Jun 18, 2022
@ibc ibc deleted the improve-enhanced-event-emitter branch June 18, 2022 21:49
@lgrahl
Copy link

lgrahl commented Jul 11, 2022

Correct me if I'm wrong but it seems this introduced a bug: removeAllListeners now requires an eventName. However, it is useful to remove all listeners from all events in some scenarios.

@ibc
Copy link
Member Author

ibc commented Jul 11, 2022

Correct me if I'm wrong but it seems this introduced a bug: removeAllListeners now requires an eventName. However, it is useful to remove all listeners from all events in some scenarios.

I've fixed it in v3 branch right now.

@lgrahl
Copy link

lgrahl commented Jul 11, 2022

Awesome. Faster than light. ⚡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants