From 7f646a5b68c6d54893c06de599b9a9091b0c9bec Mon Sep 17 00:00:00 2001 From: Peter Argany Date: Tue, 5 Feb 2019 15:35:54 -0800 Subject: [PATCH] Remove AnimatedImplementation spread from AnimatedMock Summary: Follow up to address Spencer's feedback on D13811035 With the spread of AnimatedImplementation, it's impossible to tell whether AnimatedMock gets out of date. This change coupled with D13953915 forces anyone adding to AnimatedImplementation to consider the mock. Reviewed By: sahrens Differential Revision: D13965249 fbshipit-source-id: e324364a75abd42d89d6222151453021618bcd5d --- Libraries/Animated/src/AnimatedMock.js | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/Libraries/Animated/src/AnimatedMock.js b/Libraries/Animated/src/AnimatedMock.js index fcd57b90d..a30825351 100644 --- a/Libraries/Animated/src/AnimatedMock.js +++ b/Libraries/Animated/src/AnimatedMock.js @@ -9,9 +9,15 @@ */ 'use strict'; +const {AnimatedEvent, attachNativeEvent} = require('./AnimatedEvent'); const AnimatedImplementation = require('AnimatedImplementation'); -const AnimatedValueXY = require('./nodes/AnimatedValueXY'); +const AnimatedInterpolation = require('./nodes/AnimatedInterpolation'); +const AnimatedNode = require('./nodes/AnimatedNode'); +const AnimatedProps = require('./nodes/AnimatedProps'); const AnimatedValue = require('./nodes/AnimatedValue'); +const AnimatedValueXY = require('./nodes/AnimatedValueXY'); + +const createAnimatedComponent = require('./createAnimatedComponent'); import type {EndCallback} from './animations/Animation'; import type {TimingAnimationConfig} from './animations/TimingAnimation'; @@ -104,14 +110,29 @@ const event = function(argMapping: Array, config?: EventConfig): any { }; module.exports = { - ...AnimatedImplementation, + Value: AnimatedValue, + ValueXY: AnimatedValueXY, + Interpolation: AnimatedInterpolation, + Node: AnimatedNode, decay, timing, spring, + add: AnimatedImplementation.add, + subtract: AnimatedImplementation.subtract, + divide: AnimatedImplementation.divide, + multiply: AnimatedImplementation.multiply, + modulo: AnimatedImplementation.modulo, + diffClamp: AnimatedImplementation.diffClamp, delay, sequence, parallel, stagger, loop, event, + createAnimatedComponent, + attachNativeEvent, + forkEvent: AnimatedImplementation.forkEvent, + unforkEvent: AnimatedImplementation.unforkEvent, + Event: AnimatedEvent, + __PropsOnlyForTests: AnimatedProps, };