import { type Ref } from 'vue'; type TickCallback = () => void; /** * 基于单个 requestAnimationFrame 的共享循环,多个动画共用同一帧循环。 */ export declare const ticker: { add(callback: TickCallback): void; remove(callback: TickCallback): void; }; type EasingName = 'easeOutCubic' | 'easeOutQuint'; export interface AnimateNumberOptions { /** 动画时长,单位毫秒 */ duration?: number; /** 缓动函数名或自定义缓动函数 */ easing?: EasingName | ((k: number) => number); /** 取整因子,每帧值会被舍入为 Math.round(value * round) / round */ round?: number; /** 每帧更新后回调 */ update?: () => void; /** 动画结束回调 */ complete?: () => void; } export interface Animation { /** 暂停动画,暂停后不会触发 complete */ pause: () => void; } /** * 将数字 ref 的 value 从当前值缓动到目标值,创建后自动播放。 */ export declare function animateNumber(ref: Ref, to: number, options?: AnimateNumberOptions): Animation; export {};