import type { ComponentProps, ComponentRef, ComponentType, ReactNode, Ref, RefAttributes } from 'react'; import type { FlatList, FlatListProps, TextInput } from 'react-native'; import type { InstanceOrElement, SharedValueDisableContravariance } from '../commonTypes'; import type { CSSCallbackProps } from '../css/types'; import type { AnimatedProps } from '../helperTypes'; import type { AnimatedRef } from '../hook'; import type { ExtractElementRef } from '../hook/commonTypes'; import type { Options } from './AnimatedComponent'; import type { InitialComponentProps } from './commonTypes'; type AnimatedComponentRef = Ref> | (TInstance extends InstanceOrElement ? AnimatedRef : never) | AnimatedRef; export type AnimatedComponentType = { (props: Omit, 'ref'> & CSSCallbackProps & ExtraProps & { ref?: AnimatedComponentRef; }): ReactNode; (props: Omit, 'ref'> & CSSCallbackProps & ExtraProps & RefAttributes>): ReactNode; }; type AnimatableComponent> = C & { jsProps?: string[]; }; /** * Lets you create an Animated version of any React Native component. * * @param Component - The component you want to make animatable. * @param options - Optional configuration object containing: * * - `setNativeProps`: Function to set native props * - `jsProps`: String array to select which props should be animated on JS * * @returns A component that Reanimated is capable of animating. * @see https://docs.swmansion.com/react-native-reanimated/docs/core/createAnimatedComponent */ export declare function createAnimatedComponent>>(Component: TInstance extends typeof FlatList | typeof TextInput ? never : TInstance, options?: Options): AnimatedComponentType>, TInstance>; /** * `text` is the native prop backing `TextInput`'s value. It's not part of * `TextInputProps`, but Reanimated can update it directly, so the animated * `TextInput` accepts it as a shared value. Static strings are still disallowed * - use `value` or `defaultValue` for those. It's added only to the inline * props (not to the base component props) so that `useAnimatedProps`, which * supplies raw values, keeps accepting `{ text: string }`. */ export declare function createAnimatedComponent(Component: typeof TextInput, options?: Options): AnimatedComponentType>, typeof TextInput, { text?: SharedValueDisableContravariance; }>; /** * @deprecated Please use `Animated.FlatList` component instead of calling * `Animated.createAnimatedComponent(FlatList)` manually. */ export declare function createAnimatedComponent(Component: typeof FlatList, options?: Options): AnimatedComponentType>, ComponentRef>>; export {}; //# sourceMappingURL=createAnimatedComponent.d.ts.map