Blame view

天文台pc/tianwentai-ui/node_modules/dom-helpers/esm/animate.d.ts 902 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  import { EventHandler } from './addEventListener';
  import { TransformValue } from './isTransform';
  import { Property } from './types';
  declare type AnimateProperties = Record<Property | TransformValue, string>;
  interface Options {
      node: HTMLElement;
      properties: AnimateProperties;
      duration?: number;
      easing?: string;
      callback?: EventHandler<'transitionend'>;
  }
  interface Cancel {
      cancel(): void;
  }
  declare function animate(options: Options): Cancel;
  declare function animate(node: HTMLElement, properties: AnimateProperties, duration: number): Cancel;
  declare function animate(node: HTMLElement, properties: AnimateProperties, duration: number, callback: EventHandler<'transitionend'>): Cancel;
  declare function animate(node: HTMLElement, properties: AnimateProperties, duration: number, easing: string, callback: EventHandler<'transitionend'>): Cancel;
  export default animate;