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

Add Typescript definitions for listenToKeyboardEvents #399

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

Conversation

leonid-shevtsov
Copy link

@leonid-shevtsov leonid-shevtsov commented Oct 22, 2019

It's great that this package ships with TS definitions, but the function was missing from them.

It's tricky to properly type a HOC that returns a component with an API; but I found a way that works.

One inconvenience is that with a curried HOC Typescript cannot infer the types of the props, and you would have to define them explicitly:

listenToKeyboardEvents<ScrollViewProps>(options)(ScrollView)

@anthowm
Copy link

anthowm commented May 12, 2021

Could we merge this one for fix type issues ?

@pelayomartinez
Copy link

Would also love to see this merged!

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.

3 participants