From db2159d0b3fd57556383eff68d32d32246dd9081 Mon Sep 17 00:00:00 2001 From: Yunyu Lin Date: Mon, 2 Jul 2018 13:26:38 -0700 Subject: [PATCH] Fix some classes of incorrect Flow errors for Animated Summary: Replace the union with a spread Reviewed By: blairvanderhoof Differential Revision: D8715694 fbshipit-source-id: 3b1ce893a065bfc7395b576e485a79f09bacc999 --- Libraries/Animated/src/Animated.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Libraries/Animated/src/Animated.js b/Libraries/Animated/src/Animated.js index f25d2a0796a..8678b21f14b 100644 --- a/Libraries/Animated/src/Animated.js +++ b/Libraries/Animated/src/Animated.js @@ -16,14 +16,10 @@ const ScrollView = require('ScrollView'); const Text = require('Text'); const View = require('View'); -const Animated = { +module.exports = { + ...AnimatedImplementation, View: AnimatedImplementation.createAnimatedComponent(View), Text: AnimatedImplementation.createAnimatedComponent(Text), Image: AnimatedImplementation.createAnimatedComponent(Image), ScrollView: AnimatedImplementation.createAnimatedComponent(ScrollView), }; - -Object.assign((Animated: Object), AnimatedImplementation); - -module.exports = ((Animated: any): typeof AnimatedImplementation & - typeof Animated);