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

Typing: In @types/node v13, NodeJS.EventEmitter is no longer a class #1151

Closed
be5invis opened this issue Jan 15, 2020 · 4 comments
Closed

Typing: In @types/node v13, NodeJS.EventEmitter is no longer a class #1151

be5invis opened this issue Jan 15, 2020 · 4 comments

Comments

@be5invis
Copy link

Source: DefinitelyTyped/DefinitelyTyped#40927

  • BREAKING: Replaced global EventEmitter class with interface as it's purely virtual and only there for global declarations.
    • This required various updates in other package since they sometimes used extends EventEmitter or extends NodeJS.EventEmitter.
@shadowspawn
Copy link
Collaborator

Thanks for report.

Independently, I recently wrote a PR to remove the EventEmitter from our TypeScript to try in Commander 5.x but was not planning for that in 4.x: #1146

I'm not sure what we'll do for 4.x. That PR for DefinitelyTyped is across a LOT of files so that fix is widely applied and will look into that.

@shadowspawn
Copy link
Collaborator

I think Commander may not not affected by this change, as Command is declared as an interface not a class:

interface Command extends NodeJS.EventEmitter {

I tried updating to latest @types/node@13 and was not able to reproduce any problems. Are you seeing issues?

@be5invis
Copy link
Author

@shadowspawn
I tried to update Commander and it seems working now. Maybe I was using old version that caused this? Closed.

@shadowspawn
Copy link
Collaborator

Old version... Digging... #1081

For future readers, this issue is fixed in Commander v4.

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

No branches or pull requests

2 participants