1 | import { EventHandler } from './addEventListener';
|
2 | import { TransformValue } from './isTransform';
|
3 | import { Property } from './types';
|
4 | declare type AnimateProperties = Record<Property | TransformValue, string>;
|
5 | interface Options {
|
6 | node: HTMLElement;
|
7 | properties: AnimateProperties;
|
8 | duration?: number;
|
9 | easing?: string;
|
10 | callback?: EventHandler<'transitionend'>;
|
11 | }
|
12 | interface Cancel {
|
13 | cancel(): void;
|
14 | }
|
15 | declare function animate(options: Options): Cancel;
|
16 | declare function animate(node: HTMLElement, properties: AnimateProperties, duration: number): Cancel;
|
17 | declare function animate(node: HTMLElement, properties: AnimateProperties, duration: number, callback: EventHandler<'transitionend'>): Cancel;
|
18 | declare function animate(node: HTMLElement, properties: AnimateProperties, duration: number, easing: string, callback: EventHandler<'transitionend'>): Cancel;
|
19 | export default animate;
|