diff --git a/native/components/swipeable.js b/native/components/swipeable.js --- a/native/components/swipeable.js +++ b/native/components/swipeable.js @@ -8,6 +8,7 @@ import Button from './button.react.js'; import { useSelector } from '../redux/redux-utils.js'; import { useStyles } from '../themes/colors.js'; +import type { AnimatedInterpolation } from '../types/react-native.js'; type Props = { +buttonWidth: number, @@ -37,7 +38,7 @@ } = props; const renderRightActions = React.useCallback( - progress => { + (progress: AnimatedInterpolation) => { const actions = rightActions.map( ({ key, content, color, onPress }, i) => { const translation = progress.interpolate({ diff --git a/native/types/react-native.js b/native/types/react-native.js --- a/native/types/react-native.js +++ b/native/types/react-native.js @@ -1,5 +1,6 @@ // @flow +import AnimatedInterpolation from 'react-native/Libraries/Animated/nodes/AnimatedInterpolation.js'; import type ReactNativeAnimatedValue from 'react-native/Libraries/Animated/nodes/AnimatedValue.js'; import type { ViewToken } from 'react-native/Libraries/Lists/ViewabilityHelper.js'; @@ -40,3 +41,5 @@ +width: number, +threadID: string, }; + +export type { AnimatedInterpolation };