UNPKG

react-native-reanimated

Version:

More powerful alternative to Animated library for React Native.

11 lines (10 loc) 994 B
import type { NextAnimation, StyleLayoutAnimation } from './commonTypes'; import type { AnimatedStyle, SharedValue, AnimatableValue, Animation, AnimationObject } from '../commonTypes'; export type UserUpdater = () => AnimatedStyle; export declare function initialUpdaterRun<T>(updater: () => T): T; type AnimationToDecoration<T extends AnimationObject | StyleLayoutAnimation, U extends AnimationObject | StyleLayoutAnimation> = T extends StyleLayoutAnimation ? Record<string, unknown> : U | (() => U) | AnimatableValue; export declare function defineAnimation<T extends AnimationObject | StyleLayoutAnimation, // type that's supposed to be returned U extends AnimationObject | StyleLayoutAnimation = T>(starting: AnimationToDecoration<T, U>, factory: () => T): T; export declare function cancelAnimation<T>(sharedValue: SharedValue<T>): void; export declare function withStartValue(startValue: AnimatableValue, animation: NextAnimation<AnimationObject>): Animation<AnimationObject>; export {};