Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove prevPosition in SpringState #386

Merged
merged 2 commits into from
Sep 21, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions react-native-reanimated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,18 @@ declare module 'react-native-reanimated' {
...others: Adaptable<number>[]
) => AnimatedNode<T>;

export interface DecayState {
export interface AnimationState {
finished: AnimatedValue<number>;
velocity: AnimatedValue<number>;
position: AnimatedValue<number>;
time: AnimatedValue<number>;
}

export interface PhysicsAnimationState extends AnimationState {
velocity: AnimatedValue<number>;
}

export type DecayState = PhysicsAnimationState;

export interface DecayConfig {
deceleration: Adaptable<number>;
}
Expand All @@ -85,10 +91,7 @@ declare module 'react-native-reanimated' {
stop: () => void;
}

export interface TimingState {
finished: AnimatedValue<number>;
position: AnimatedValue<number>;
time: AnimatedValue<number>;
export interface TimingState extends AnimationState {
frameTime: AnimatedValue<number>;
}
export type EasingFunction = (value: Adaptable<number>) => AnimatedNode<number>;
Expand All @@ -98,13 +101,8 @@ declare module 'react-native-reanimated' {
easing: EasingFunction;
}

export interface SpringState {
finished: AnimatedValue<number>;
velocity: AnimatedValue<number>;
position: AnimatedValue<number>;
prevPosition?: AnimatedValue<number>;
time: AnimatedValue<number>;
}
export type SpringState = PhysicsAnimationState;

export interface SpringConfig {
damping: Adaptable<number>;
mass: Adaptable<number>;
Expand Down