forked from plus1tv/react-anime
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAnime.d.ts
65 lines (57 loc) · 1.49 KB
/
Anime.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import * as React from 'react';
export type TimingValues = ((el: Element, index?: number, len?: number) => number) | number;
export type Easing =
'easeInSine' |
'easeOutSine' |
'easeInOutSine' |
'easeInCirc' |
'easeOutCirc' |
'easeInOutCirc' |
'easeInElastic' |
'easeOutElastic' |
'easeInOutElastic' |
'easeInBack' |
'easeOutBack' |
'easeInOutBack' |
'easeInBounce' |
'easeOutBounce' |
'easeInOutBounce' |
'easeInQuad' |
'easeOutQuad' |
'easeInOutQuad' |
'easeInCubic' |
'easeOutCubic' |
'easeInOutCubic' |
'easeInQuart' |
'easeOutQuart' |
'easeInOutQuart' |
'easeInQuint' |
'easeOutQuint' |
'easeInOutQuint' |
'easeInExpo' |
'easeOutExpo' |
'easeInOutExpo' |
'linear';
export type AnimationProp =
{ value: string | number, delay: TimingValues, duration?: TimingValues, easing?: Easing } |
string |
number |
(string | number)[] |
((el: Element, index?: number) => string | number);
export interface AnimeProps {
delay?: ((el: Element, index?: number, len?: number) => number) | number,
duration?: ((el: Element, index?: number, len?: number) => number) | number,
autoplay?: boolean,
loop?: number | boolean,
direction?: 'normal' | 'reverse' | 'alternate';
easing?: Easing,
elasticity?: number,
round?: number | boolean,
begin?: Function,
update?: Function,
complete?: Function,
// Objects
[index: string]: AnimationProp | any
}
declare class Anime extends React.Component<AnimeProps, any> { }
export default Anime;