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(); /** * @deprecated does not accept a rejection handler anymore */ then(onFulfilled?: (() => void | Animation | PromiseLike) | undefined | null, onRejected?: (() => void | Animation | PromiseLike) | undefined | null): Animation; /** * @deprecated not supported anymore */ catch(onRejected?: (() => void | Animation | PromiseLike) | undefined | null): Animation; /** * @deprecated not supported anymore */ finally(onFinally?: (() => void | Animation | PromiseLike) | undefined | null): Animation; /** * @deprecated not supported anymore */ static resolve(): Animation; }