mkuczera / react-native-haptic-feedback

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

feat: strict type on the trigger func argument #116

Closed gronxb closed 1 year ago

gronxb commented 1 year 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