From a8b39a237c2459a774e4ad9f4a514d0941b03169 Mon Sep 17 00:00:00 2001 From: Nedunchezhiyan-M Date: Mon, 13 Apr 2026 04:20:47 -0700 Subject: [PATCH] Fix typo and missing space in AnimatedInterpolation error messages (#56378) Summary: Fix two error message issues in `AnimatedInterpolation.js`: 1. **Typo**: "Cannot interpolation an input which is not a number" - should be "Cannot interpolate" 2. **Missing space**: Range validation message was missing a space between the variable name and "cannot", producing malformed output like `outputRangecannot be ]-infinity;+infinity[` ## Changelog: [GENERAL] [FIXED] - Fix typo "interpolation" to "interpolate" and add missing space in AnimatedInterpolation error messages Pull Request resolved: https://github.com/facebook/react-native/pull/56378 Test Plan: 1. Trigger the interpolation input validation by passing a non-number input to an interpolation config - verify the error message reads "Cannot interpolate an input which is not a number" 2. Trigger the range validation by passing an infinite range - verify the error message has proper spacing between the parameter name and "cannot" Reviewed By: zeyap Differential Revision: D100328205 Pulled By: javache fbshipit-source-id: ae2eba5404dd7b16bf430c26bc161a83821fa920 --- .../Libraries/Animated/nodes/AnimatedInterpolation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-native/Libraries/Animated/nodes/AnimatedInterpolation.js b/packages/react-native/Libraries/Animated/nodes/AnimatedInterpolation.js index 951657fd59f..891d4393b34 100644 --- a/packages/react-native/Libraries/Animated/nodes/AnimatedInterpolation.js +++ b/packages/react-native/Libraries/Animated/nodes/AnimatedInterpolation.js @@ -73,7 +73,7 @@ function createNumericInterpolation( return input => { invariant( typeof input === 'number', - 'Cannot interpolation an input which is not a number', + 'Cannot interpolate an input which is not a number', ); const range = findRange(input, inputRange); @@ -345,7 +345,7 @@ function checkInfiniteRange< * etc. If you really mean this implicit string conversion, you can do * something like String(myThing) */ // $FlowFixMe[unsafe-addition] - name + 'cannot be ]-infinity;+infinity[ ' + arr, + name + ' cannot be ]-infinity;+infinity[ ' + arr, ); }