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

feat: on multiple events accept array #163

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

legau
Copy link

@legau legau commented Jun 20, 2021

Hi,

The type definition for Joystick.on and JoystickManager.on accepts arrays of events or only one event as a string. However this is not the case for the real on function which accepts only strings. So it's not possible to use multiple events correctly in TypeScript. This PR adds support for arrays of events.

@yoannmoinet
Copy link
Owner

Why not simply fix the type instead?
I think the mistake is with the type, not the implementation as the documentation is also referring to only strings.

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

Successfully merging this pull request may close these issues.

None yet

2 participants