https://linear.app/comm/issue/ENG-10079/add-react-native-gesture-handler-v2-flow-definitions
This diff adds Flow types for basic react-native-gesture-handler v2 gestures: tap, pan and pinch needed for Reanimated migrations.
Differences between original ts types and Flow definitions:
- some methods were skipped because they're internal or we don't use them, for example methods in BaseGesture, configs in (Tap|Pan|Pinch)Gesture
- originally the type for BaseGesture is: class BaseGesture<EventPayloadT extends Record<string, unknown>>. I think the Flow would be class BaseGesture<EventPayloadT: {[string]: mixed}> but for some reason it doesn’t work. I’ve got errors like:
number [1] is incompatible with mixed [2] in property absoluteX of type argument EventPayloadT. [incompatible-type-arg]
skipping : {[string]: mixed} works and I don’t think it’s a big issue
- abstract classes are normal classes because there is no support for them in Flow?