Skip to content

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.

2 participants