FormidableLabs / react-swipeable

React swipe event handler hook
https://commerce.nearform.com/open-source/react-swipeable
MIT License
2k stars 147 forks source link

fix callback type check #218

Closed ArtemAstakhov closed 3 years ago

hartzis commented 3 years ago

@ArtemAstakhov 👋 hi, thanks for opening a PR.

Curious if you could add a bit of context on this change?

It additionally encouraged me to make an issue to for upgrading to TS 4, #220 . Which was recently released.

The "end goal" around this part of the code would be to hopefully avoid the need for the casting's(as) here.

hartzis commented 3 years ago

We closed #220 with #228 and updated TS to v4.1. We also opened a new PR, #232, that is attempting a similar solution, but we are currently have compile issues and need to dig into them.

Thank you again @ArtemAstakhov for this PR to get the 🧠 wheels moving, cheers.