1- import  *  as  easing  from  './easing' ; 
2- 
3- export  type  easingType  =  'easeOutCubic'  |  'linear'  |  'easeOutExpo'  |  'easeInOutExpo' ; 
4- export  type  startFunc  =  ( key : number )  =>  number ; 
5- export  type  updateFunc  =  ( key : any )  =>  any ; 
6- export  type  finishFunc  =  ( key : any )  =>  any ; 
1+ import  easing  from  './easing' ; 
72export  interface  fromType  { 
83 value : number ; 
94} 
105export  interface  toType  { 
116 value : number ; 
127} 
8+ 
9+ export  type  easingType  =  'easeOutCubic'  |  'linear'  |  'easeOutExpo'  |  'easeInOutExpo' ; 
10+ export  type  formAndToAttributesType  =  'value'  |  unknown ; 
11+ export  type  startFunc  =  ( key : number )  =>  number ; 
12+ export  type  updateFunc  =  ( key : toType )  =>  void ; 
13+ export  type  finishFunc  =  ( key : toType )  =>  void ; 
14+ 
1315export  interface  AnimationOptions  { 
1416 from : fromType ; 
1517 to : toType ; 
@@ -36,9 +38,9 @@ export class Tween {
3638 timer ?: null  |  number ; 
3739 time ?: number ; 
3840 elapsed ?: number ; 
39-  keys ?: any ; 
41+  keys ?: toType ; 
4042 constructor ( options : AnimationOptions )  { 
41-  const  {  from,  to,  duration,  delay,  easing,  onStart,  onUpdate,  onFinish }  =  options ; 
43+  const  {  from,  to,  duration,  delay,  easing :  easingValue ,  onStart,  onUpdate,  onFinish }  =  options ; 
4244 for  ( const  key  in  from )  { 
4345 if  ( to [ key ]  ===  undefined )  { 
4446 to [ key ]  =  from [ key ] ; 
@@ -55,7 +57,7 @@ export class Tween {
5557 this . to  =  to ; 
5658 this . duration  =  duration ; 
5759 this . delay  =  delay ; 
58-  this . easing  =  easing ; 
60+  this . easing  =  easingValue ; 
5961 this . onStart  =  onStart ; 
6062 this . onUpdate  =  onUpdate ; 
6163 this . onFinish  =  onFinish ; 
0 commit comments