export type AnimationOptions = { properties: { [key in keyof T]: { start: number, end: number } }; duration: number; delay?: number; easing?: string | ((progress: number) => number); onTick: (properties: { [key in keyof T]: number }, progress: number) => void; }; /** * @summary Interpolation helper for animations * @description * Implements the Promise API with an additional "cancel" method. * The promise is resolved when the animation is complete and rejected if the animation is cancelled. */ export class Animation implements PromiseLike { constructor(options: AnimationOptions); then(onFulfilled?: ((completed: boolean) => TResult | PromiseLike) | undefined | null): PromiseLike; cancel(); }