react-native-reanimated
Version:
More powerful alternative to Animated library for React Native.
23 lines (22 loc) • 822 B
TypeScript
import type { EasingFn, EasingFactoryFn } from '../Easing';
import type { Animation, AnimationCallback, Timestamp, AnimatableValue } from '../commonTypes';
interface TimingConfig {
duration?: number;
easing?: EasingFn | EasingFactoryFn;
}
export interface TimingAnimation extends Animation<TimingAnimation> {
type: string;
easing: EasingFn;
startValue: AnimatableValue;
startTime: Timestamp;
progress: number;
toValue: AnimatableValue;
current: AnimatableValue;
}
export interface InnerTimingAnimation extends Omit<TimingAnimation, 'toValue' | 'current'> {
toValue: number;
current: number;
}
type withTimingType = <T extends AnimatableValue>(toValue: T, userConfig?: TimingConfig, callback?: AnimationCallback) => T;
export declare const withTiming: withTimingType;
export {};