UNPKG

1.24 kBTypeScriptView Raw
1import type { AnimationCallback, AnimatableValue, ReduceMotion } from '../commonTypes';
2type withRepeatType = <T extends AnimatableValue>(animation: T, numberOfReps?: number, reverse?: boolean, callback?: AnimationCallback, reduceMotion?: ReduceMotion) => T;
3/**
4 * Lets you repeat an animation given number of times or run it indefinitely.
5 *
6 * @param animation - An animation object you want to repeat.
7 * @param numberOfReps - The number of times the animation is going to be
8 * repeated. Defaults to 2.
9 * @param reverse - Whether the animation should run in reverse every other
10 * repetition. Defaults to false.
11 * @param callback - A function called on animation complete.
12 * @param reduceMotion - Determines how the animation responds to the device's
13 * reduced motion accessibility setting. Default to `ReduceMotion.System` -
14 * {@link ReduceMotion}.
15 * @returns An [animation
16 * object](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#animation-object)
17 * which holds the current state of the animation.
18 * @see https://docs.swmansion.com/react-native-reanimated/docs/animations/withRepeat
19 */
20export declare const withRepeat: withRepeatType;
21export {};
22//# sourceMappingURL=repeat.d.ts.map
\No newline at end of file