/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @generated SignedSource<> * * This file was translated from Flow by scripts/js-api/build-types/index.js. * Original file: packages/react-native/Libraries/Animated/createAnimatedComponent.js */ import type { NativeColorValue } from "../StyleSheet/StyleSheetTypes"; import type AnimatedAddition from "./nodes/AnimatedAddition"; import type AnimatedDiffClamp from "./nodes/AnimatedDiffClamp"; import type AnimatedDivision from "./nodes/AnimatedDivision"; import type AnimatedInterpolation from "./nodes/AnimatedInterpolation"; import type AnimatedModulo from "./nodes/AnimatedModulo"; import type AnimatedMultiplication from "./nodes/AnimatedMultiplication"; import type AnimatedNode from "./nodes/AnimatedNode"; import type { AnimatedPropsAllowlist } from "./nodes/AnimatedProps"; import type AnimatedSubtraction from "./nodes/AnimatedSubtraction"; import type AnimatedValue from "./nodes/AnimatedValue"; import { type ViewProps } from "../Components/View/ViewPropTypes"; import * as React from "react"; type Nullable = void | null; type Primitive = string | number | boolean | symbol | void; type Builtin = (...$$REST$$: ReadonlyArray) => unknown | Date | Error | RegExp; export type WithAnimatedValue = T extends Builtin | Nullable ? T : T extends Primitive ? T | AnimatedNode | AnimatedAddition | AnimatedSubtraction | AnimatedDivision | AnimatedMultiplication | AnimatedModulo | AnimatedDiffClamp | AnimatedValue | AnimatedInterpolation | AnimatedInterpolation | AnimatedInterpolation | AnimatedInterpolation : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { readonly [K in keyof T]: WithAnimatedValue } : T; type NonAnimatedProps = "ref" | "innerViewRef" | "scrollViewRef" | "testID" | "disabled" | "accessibilityLabel"; type PassThroughProps = Readonly<{ passthroughAnimatedPropExplicitValues?: ViewProps | null; }>; type LooseOmit = Pick>; export type AnimatedProps = LooseOmit<{ [K in keyof Props]: K extends NonAnimatedProps ? Props[K] : WithAnimatedValue }, "ref"> & PassThroughProps; export type AnimatedBaseProps = LooseOmit<{ [K in keyof Props]: K extends NonAnimatedProps ? Props[K] : WithAnimatedValue }, "ref">; export type AnimatedComponentType = (props: Omit, keyof { ref?: React.Ref; }> & { ref?: React.Ref; }) => React.ReactNode; declare function createAnimatedComponent>(Component: TInstance): AnimatedComponentType>>, React.ComponentRef>; export default createAnimatedComponent; export declare function unstable_createAnimatedComponentWithAllowlist>(Component: TInstance, allowlist: null | undefined | AnimatedPropsAllowlist): AnimatedComponentType>;