mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
9eb7629ac6
Summary: Changelog: [General][Added] - Add `Animated.Numeric` Flow type Adds a Flow type to represent the various Animated node types that evaluate to numeric values and can be `interpolate()`d. I'm including `AnimatedInterpolation` as "numeric" here even though it can technically evaluate either to a number or to a string, depending on its config. Note that calling `interpolate()` on a string-valued `AnimatedInterpolation` is a runtime error. In a future diff, I'm planning to add a type argument to `AnimatedInterpolation` (and its config type), at which point we can refine `Animated.Numeric` to correctly include only `AnimatedInterpolation<number>`. Reviewed By: javache Differential Revision: D35869375 fbshipit-source-id: 2ff6754f1a5abc68c9da2c6836872c2022b25676