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);