Fix flow typing of TimingAnimationConfig

Summary: @​public
Make the flow type of TimingAnimationConfig and TimingAnimation the same as SpringAnimationConfig and SpringAnimation.
This is a more accurate flow type as both are multiplexed through maybeVectorAnim().

Reviewed By: @sahrens

Differential Revision: D2410166
This commit is contained in:
Bill Fisher 2015-09-09 23:52:41 -07:00 коммит произвёл facebook-github-bot-2
Родитель ac9471f2cd
Коммит 493cb35966
1 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -131,7 +131,14 @@ function _flush(rootNode: AnimatedValue): void {
}
type TimingAnimationConfig = {
toValue: number;
toValue: number | AnimatedValue | {x: number, y: number} | AnimatedValueXY;
easing?: (value: number) => number;
duration?: number;
delay?: number;
};
type TimingAnimationConfigSingle = {
toValue: number | AnimatedValue;
easing?: (value: number) => number;
duration?: number;
delay?: number;
@ -142,7 +149,7 @@ var easeInOut = Easing.inOut(Easing.ease);
class TimingAnimation extends Animation {
_startTime: number;
_fromValue: number;
_toValue: number;
_toValue: any;
_duration: number;
_delay: number;
_easing: (value: number) => number;
@ -151,7 +158,7 @@ class TimingAnimation extends Animation {
_timeout: any;
constructor(
config: TimingAnimationConfig,
config: TimingAnimationConfigSingle,
) {
super();
this._toValue = config.toValue;