HomePhabricator
Diffusion Comm ee53780f46f4

[Flow202][native][skip-ci] [20/x] Update Reanimated libdef to match…

Description

[Flow202][native][skip-ci] [20/x] Update Reanimated libdef to match GestureHandler

Summary:
Separating this diff out since there are some significant changes to useAnimatedGestureHandler here, which is a hook from react-native-reanimated.

In fact this hook does not return a function. However, the TypeScript types for react-native-gesture-handler requires that onGestureEvent takes a function. As a result, in the linked code you can see that react-native-reanimated types the return of useAnimatedGestureHandler as a function, even though it is not. We do the same here.

I'll annotate some of the changes in this diff inline.

NOTE: CI will fail on this diff. I considered the possibility of fixing Flow errors BEFORE upgrading Flow, but it wasn't possible... in some cases, the fixes to support the new version of Flow caused errors in the old version. I could have hidden these type errors with $FlowFixMe lines and then later revert those, but that seemed like too much busy work.

Depends on D10003

Test Plan: Confirm the Flow errors go away

Reviewers: tomek, bartek

Reviewed By: tomek

Differential Revision: https://phab.comm.dev/D10004