-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Unify events and output single TypeScript declaration #2407
Unify events and output single TypeScript declaration #2407
Conversation
…for single typescript declaration
Hi, thanks for your contribution! |
I'd call that new EventManager EventEmitter and just alias the import. IMHO it would avoid confusion. |
@saghul good idea! All sorted now I think. |
Jenkins please test this please. |
1 similar comment
Jenkins please test this please. |
Generally LGTM but I'd like to hear what @jallamsetty1 and @hristoterezov think. |
Just removed the on/off alias as it was redundant on the EventEmitter as the Node EventEmitter already does this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I'd do another pass (after this PR) and completely get rid of Listenable and EventManager, they really server very little purpose now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Needs rebasing tho!
Sorted! Just fixed the conflict |
* fix(events): unify events to a single EventManager type, add support for single typescript declaration * fix(lint): fix lint * fix(events): fix incorrect instatiation * fix(events): clean up redundant methods * fix(events): keep EventEmitter name, alias NodeEventEmitter * fix(events): fix loose reference * fix(EventEmitter): remove on/off alias as redundant * fix(RTCUtils): bring event handlers under class to use same event emitter * fix(RTCUtils): fix lint
* fix(events): unify events to a single EventManager type, add support for single typescript declaration * fix(lint): fix lint * fix(events): fix incorrect instatiation * fix(events): clean up redundant methods * fix(events): keep EventEmitter name, alias NodeEventEmitter * fix(events): fix loose reference * fix(EventEmitter): remove on/off alias as redundant * fix(RTCUtils): bring event handlers under class to use same event emitter * fix(RTCUtils): fix lint
* fix(events): unify events to a single EventManager type, add support for single typescript declaration * fix(lint): fix lint * fix(events): fix incorrect instatiation * fix(events): clean up redundant methods * fix(events): keep EventEmitter name, alias NodeEventEmitter * fix(events): fix loose reference * fix(EventEmitter): remove on/off alias as redundant * fix(RTCUtils): bring event handlers under class to use same event emitter * fix(RTCUtils): fix lint
* fix(events): unify events to a single EventManager type, add support for single typescript declaration * fix(lint): fix lint * fix(events): fix incorrect instatiation * fix(events): clean up redundant methods * fix(events): keep EventEmitter name, alias NodeEventEmitter * fix(events): fix loose reference * fix(EventEmitter): remove on/off alias as redundant * fix(RTCUtils): bring event handlers under class to use same event emitter * fix(RTCUtils): fix lint
* fix(events): unify events to a single EventManager type, add support for single typescript declaration * fix(lint): fix lint * fix(events): fix incorrect instatiation * fix(events): clean up redundant methods * fix(events): keep EventEmitter name, alias NodeEventEmitter * fix(events): fix loose reference * fix(EventEmitter): remove on/off alias as redundant * fix(RTCUtils): bring event handlers under class to use same event emitter * fix(RTCUtils): fix lint
* fix(events): unify events to a single EventManager type, add support for single typescript declaration * fix(lint): fix lint * fix(events): fix incorrect instatiation * fix(events): clean up redundant methods * fix(events): keep EventEmitter name, alias NodeEventEmitter * fix(events): fix loose reference * fix(EventEmitter): remove on/off alias as redundant * fix(RTCUtils): bring event handlers under class to use same event emitter * fix(RTCUtils): fix lint
* fix(events): unify events to a single EventManager type, add support for single typescript declaration * fix(lint): fix lint * fix(events): fix incorrect instatiation * fix(events): clean up redundant methods * fix(events): keep EventEmitter name, alias NodeEventEmitter * fix(events): fix loose reference * fix(EventEmitter): remove on/off alias as redundant * fix(RTCUtils): bring event handlers under class to use same event emitter * fix(RTCUtils): fix lint
Found a less destructive way than my previous PR #2406
Copy from that PR:
Now the main potentially breaking change is:
Benefits to this
What do you think @saghul ?