'use strict'; import type { AnimatableValue, AnimatedStyle, Animation, AnimationCallback, AnimationObject, StyleProps, Timestamp, } from '../commonTypes'; export interface HigherOrderAnimation { isHigherOrder?: boolean; } export type NextAnimation = T | (() => T); export interface ClampAnimation extends Animation, HigherOrderAnimation { current: AnimatableValue; } export interface DelayAnimation extends Animation, HigherOrderAnimation { startTime: Timestamp; started: boolean; previousAnimation: DelayAnimation | null; current: AnimatableValue; } export interface RepeatAnimation extends Animation, HigherOrderAnimation { reps: number; startValue: AnimatableValue; toValue?: AnimatableValue; previousAnimation?: RepeatAnimation; } export interface SequenceAnimation extends Animation, HigherOrderAnimation { animationIndex: number; } export interface StyleLayoutAnimation extends HigherOrderAnimation { current: StyleProps; // eslint-disable-next-line @typescript-eslint/no-explicit-any styleAnimations: AnimatedStyle; onFrame: (animation: StyleLayoutAnimation, timestamp: Timestamp) => boolean; onStart: ( nextAnimation: StyleLayoutAnimation, // eslint-disable-next-line @typescript-eslint/no-explicit-any current: AnimatedStyle, timestamp: Timestamp, previousAnimation: StyleLayoutAnimation ) => void; callback?: AnimationCallback; }