Skip to content

Conversation

@lance
Copy link
Member

@lance lance commented Feb 25, 2021

This change modifies Emitter so that it does not directly extend the Node.js
EventEmitter class. Instead, it holds a singleton instance of an EventEmitter
but is not an instance of EventEmitter itself.

This commit also updates the typescript example to use a modern version of
@types/node and typescript.

Finally there are a few minor formatting changes picked up by eslint.

@loopingz if you have a chance to review this, that would be great. Thanks!

Fixes: #385

Signed-off-by: Lance Ball [email protected]

This change modifies Emitter so that it does not directly extend the Node.js
EventEmitter class. Instead, it holds a singleton instance of an EventEmitter
but is not an instance of EventEmitter itself.

This commit also updates the typescript example to use a modern version of
@types/node and typescript.

Finally there are a few minor formatting changes picked up by eslint.

Fixes: #385

Signed-off-by: Lance Ball <[email protected]>
@lance lance added type/fix A change that fixes something that is broken module/lib Related to the main source code version/4.x Issues related to the 4.0 release of this library labels Feb 25, 2021
@lance lance requested a review from a team February 25, 2021 15:03
@lance lance self-assigned this Feb 25, 2021
Copy link
Contributor

@loopingz loopingz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A part from the 2 small comments, it looks good to me.

Thanks

@lance lance merged commit b006b90 into main Feb 28, 2021
@lance lance deleted the lance/385-fix-emitter branch February 28, 2021 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module/lib Related to the main source code type/fix A change that fixes something that is broken version/4.x Issues related to the 4.0 release of this library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Class static side 'typeof Emitter' incorrectly extends base class static side 'typeof EventEmitter'

5 participants