mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-06-16 12:39:32 +08:00
make AnimatedValueXY constructor input value immutable
Reviewed By: furdei Differential Revision: D6741521 fbshipit-source-id: e8401982fbb3c3d6cd4bcc2581358fd4a5de12f9
This commit is contained in:
committed by
Facebook Github Bot
parent
b5e19adc02
commit
52ffa5d13e
@@ -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`
|
||||
|
||||
Reference in New Issue
Block a user