make AnimatedValueXY constructor input value immutable

Reviewed By: furdei

Differential Revision: D6741521

fbshipit-source-id: e8401982fbb3c3d6cd4bcc2581358fd4a5de12f9
This commit is contained in:
Jiajie Zhu 2018-01-18 10:31:13 -08:00 committed by Facebook Github Bot
parent b5e19adc02
commit 52ffa5d13e

View File

@ -33,7 +33,7 @@ class AnimatedValueXY extends AnimatedWithChildren {
_listeners: {[key: string]: {x: string, y: string}};
constructor(
valueIn?: ?{x: number | AnimatedValue, y: number | AnimatedValue},
valueIn?: ?{+x: number | AnimatedValue, +y: number | AnimatedValue},
) {
super();
const value: any = valueIn || {x: 0, y: 0}; // @flowfixme: shouldn't need `: any`