Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Mismatch between evented off implementation and type signature #2977

Closed
joeldomke opened this issue Sep 19, 2024 · 1 comment · Fixed by #2979
Closed

Mismatch between evented off implementation and type signature #2977

joeldomke opened this issue Sep 19, 2024 · 1 comment · Fixed by #2979

Comments

@joeldomke
Copy link
Contributor

The off function in evented can handle the case where the second parameter is undefined. But the type of the function is off(event: string, handler: AnyHandler): this;

Shouldn't it be off(event: string, handler?: AnyHandler): this;?

There was a similar fix when this package used JS and separate TS types: #1758

If yes I can create a PR for this.

@RobbieTheWagner
Copy link
Member

Yes, you are correct. Please feel free to open a PR!

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

Successfully merging a pull request may close this issue.

2 participants