UNPKG

947 BTypeScriptView Raw
1import type { AnimationCallback, AnimatableValue } from '../commonTypes';
2import type { SpringConfig } from './springUtils';
3type withSpringType = <T extends AnimatableValue>(toValue: T, userConfig?: SpringConfig, callback?: AnimationCallback) => T;
4/**
5 * Lets you create spring-based animations.
6 *
7 * @param toValue - The value at which the animation will come to rest -
8 * {@link AnimatableValue}
9 * @param config - The spring animation configuration - {@link SpringConfig}
10 * @param callback - A function called on animation complete -
11 * {@link AnimationCallback}
12 * @returns An [animation
13 * object](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/glossary#animation-object)
14 * which holds the current state of the animation
15 * @see https://docs.swmansion.com/react-native-reanimated/docs/animations/withSpring
16 */
17export declare const withSpring: withSpringType;
18export {};
19//# sourceMappingURL=spring.d.ts.map
\No newline at end of file