SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 154 C++

Add Animated.Numeric Flow type

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
M
Moti Zilberman committed
9eb7629ac66abc23b91b81d420891d68bbd4f578
Parent: 79529a1
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 5/3/2022, 7:04:02 PM