mkuczera / react-native-haptic-feedback

React-Native Haptic Feedback for iOS with Android similar behaviour.
MIT License
855 stars 103 forks source link

feat: strict type on the trigger func argument #116

Closed gronxb closed 9 months ago

gronxb commented 10 months ago

Modified the method parameter type from a generic string to a stricter type definition. This stricter type definition allows developers to intuitively understand available methods without referring to external documentation. As a result, this enhances code readability, improves DX, and minimizes the chances of bugs due to incorrect method invocations.

as-is:

image

to-be: image