From 01ca498f3384e19556b17450b209ea5bc31dbe6d Mon Sep 17 00:00:00 2001 From: Sirui Li Date: Mon, 24 Dec 2018 12:03:39 +0000 Subject: [PATCH] [react-native] add Animated.subtract --- types/react-native/index.d.ts | 8 ++++++++ types/react-native/test/animated.tsx | 1 + 2 files changed, 9 insertions(+) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 2c8575b211..fd5631ffb9 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -8507,6 +8507,14 @@ export namespace Animated { class AnimatedAddition extends AnimatedInterpolation {} + /** + * Creates a new Animated value composed by subtracting the second Animated + * value from the first Animated value. + */ + export function subtract(a: Animated, b: Animated): AnimatedSubtraction; + + class AnimatedSubtraction extends AnimatedInterpolation {} + /** * Creates a new Animated value composed by dividing the first Animated * value by the second Animated value. diff --git a/types/react-native/test/animated.tsx b/types/react-native/test/animated.tsx index 40f8c37ee7..3a0c82f556 100644 --- a/types/react-native/test/animated.tsx +++ b/types/react-native/test/animated.tsx @@ -53,6 +53,7 @@ function TestAnimatedAPI() { }); Animated.add(v1, v2); + Animated.subtract(v1, v2); Animated.divide(v1, v2); Animated.multiply(v1, v2); Animated.modulo(v1, 2);