react-native-keyboard-aware-scroll-view icon indicating copy to clipboard operation
react-native-keyboard-aware-scroll-view copied to clipboard

Add Typescript definitions for listenToKeyboardEvents

Open leonid-shevtsov opened this issue 5 years ago • 2 comments

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)

leonid-shevtsov avatar Oct 22 '19 20:10 leonid-shevtsov

Could we merge this one for fix type issues ?

anthowm avatar May 12 '21 15:05 anthowm

Would also love to see this merged!

pelayomartinez avatar Jul 14 '22 15:07 pelayomartinez