vue-devui
Version:
DevUI components based on Vite and Vue3
43 lines (42 loc) • 1.08 kB
TypeScript
export interface fromType {
value: number;
}
export interface toType {
value: number;
}
export type easingType = 'easeOutCubic' | 'linear' | 'easeOutExpo' | 'easeInOutExpo';
export type formAndToAttributesType = 'value' | unknown;
export type startFunc = (key: number) => number;
export type updateFunc = (key: toType) => void;
export type finishFunc = (key: toType) => void;
export interface AnimationOptions {
from: fromType;
to: toType;
duration?: number;
delay?: number;
easing?: easingType;
onStart?: startFunc;
onUpdate?: updateFunc;
onFinish?: finishFunc;
}
export declare class Tween {
from: fromType;
to: toType;
duration?: number;
delay?: number;
easing?: easingType;
onStart?: startFunc;
onUpdate?: updateFunc;
onFinish?: finishFunc;
startTime?: number;
started?: boolean;
finished?: boolean;
timer?: null | number;
time?: number;
elapsed?: number;
keys?: toType;
constructor(options: AnimationOptions);
update(): void;
start(): void;
stop(): void;
}