diff --git a/native/flow-typed/npm/react-native-reanimated_v2.x.x.js b/native/flow-typed/npm/react-native-reanimated_v2.x.x.js --- a/native/flow-typed/npm/react-native-reanimated_v2.x.x.js +++ b/native/flow-typed/npm/react-native-reanimated_v2.x.x.js @@ -625,6 +625,48 @@ (currentValue: T, previousValue: T) => mixed, ) => void; + declare type AddWhitelistedNativeProps = (props: Record) => void; + + declare type DependencyList = Array | void; + + declare type AnimatedPropsAdapterFunction = ( + props: Record + ) => void; + + declare type UseAnimatedProps = ( + updater: () => Partial, + dependencies?: DependencyList | null, + adapters?: + | AnimatedPropsAdapterFunction + | Array + | null, + isAnimatedProps?: boolean + ) => Partial; + + declare class AnimatedComponentRef

extends React.Component

{ + setNativeProps?: (props: Record) => void; + getScrollableNode?: () => AnimatedComponentRef

; + getAnimatableRef?: () => AnimatedComponentRef

; + // Case for SVG components on Web + elementRef?: React.RefObject; + }; + + declare type Options

= { + setNativeProps: (ref: AnimatedComponentRef

, props: P) => void; + }; + + declare type AnimatedProps = Props & { + animatedProps?: Partial; + ... + }; + + declare type AnimateProps = AnimatedProps; + + declare type CreateAnimatedComponent = ( + component: React.ComponentType, + options?: Options + ) => component(animatedProps?: Partial, ...Props); + declare export var Node: typeof NodeImpl; declare export var Value: typeof ValueImpl; declare export var Clock: typeof ClockImpl; @@ -684,6 +726,9 @@ declare export var cancelAnimation: CancelAnimation; declare export var useAnimatedKeyboard: UseAnimatedKeyboard; declare export var useAnimatedReaction: UseAnimatedReaction; + declare export var addWhitelistedNativeProps: AddWhitelistedNativeProps; + declare export var useAnimatedProps: UseAnimatedProps; + declare export var createAnimatedComponent: CreateAnimatedComponent; declare export default { +Node: typeof NodeImpl, @@ -741,6 +786,9 @@ +withTiming: WithTiming, +runOnJS: RunOnJS, +cancelAnimation: CancelAnimation, + +addWhitelistedNativeProps: AddWhitelistedNativeProps, + +useAnimatedProps: UseAnimatedProps, + +createAnimatedComponent: CreateAnimatedComponent, ... };