From 38dcbdaccfb3fad60b9031cd119bc4365f412850 Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Tue, 23 Jun 2026 05:20:49 -0700 Subject: [PATCH] Export Animated.Numeric type in public API Summary: `Numeric` is defined and exported by `AnimatedImplementation` and re-exported as a named export from `Animated`, but it was missing from the `Animated` namespace object assembled in `AnimatedExports`. We have usages of this in fbsource, therefore export on the public API for parity. Changelog: [General][Added] - **Strict TypeScript API**: Export `Animated.Numeric` Differential Revision: D109430487 --- .../Libraries/Animated/AnimatedExports.js.flow | 2 +- packages/react-native/ReactNativeApi.d.ts | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/react-native/Libraries/Animated/AnimatedExports.js.flow b/packages/react-native/Libraries/Animated/AnimatedExports.js.flow index cacd8c2248a9..7880f98f97af 100644 --- a/packages/react-native/Libraries/Animated/AnimatedExports.js.flow +++ b/packages/react-native/Libraries/Animated/AnimatedExports.js.flow @@ -10,7 +10,7 @@ import AnimatedImplementation from './AnimatedImplementation'; -export type {CompositeAnimation} from './AnimatedImplementation'; +export type {CompositeAnimation, Numeric} from './AnimatedImplementation'; export type {DecayAnimationConfig} from './animations/DecayAnimation'; export type {SpringAnimationConfig} from './animations/SpringAnimation'; export type {TimingAnimationConfig} from './animations/TimingAnimation'; diff --git a/packages/react-native/ReactNativeApi.d.ts b/packages/react-native/ReactNativeApi.d.ts index a41962ac2e77..699c2fff455a 100644 --- a/packages/react-native/ReactNativeApi.d.ts +++ b/packages/react-native/ReactNativeApi.d.ts @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * - * @generated SignedSource<> + * @generated SignedSource<<42200de8ca10d30541e23b67547d9a13>> * * This file was generated by scripts/js-api/build-types/index.js. */ @@ -1275,6 +1275,7 @@ declare type AndroidProps = { declare namespace Animated { export { CompositeAnimation, + AnimatedNumeric as Numeric, DecayAnimationConfig, SpringAnimationConfig, TimingAnimationConfig, @@ -1431,6 +1432,15 @@ declare class AnimatedNode_default { declare type AnimatedNodeConfig = { readonly debugID?: string } +declare type AnimatedNumeric = + | AnimatedAddition_default + | AnimatedDiffClamp_default + | AnimatedDivision_default + | AnimatedInterpolation_default + | AnimatedModulo_default + | AnimatedMultiplication_default + | AnimatedSubtraction_default + | AnimatedValue_default declare type AnimatedProps = LooseOmit< { [K in keyof Props]: K extends NonAnimatedProps @@ -5910,7 +5920,7 @@ export { AlertOptions, // a0cdac0f AlertType, // 5ab91217 AndroidKeyboardEvent, // e03becc8 - Animated, // a81c717c + Animated, // 1ac00401 AppConfig, // 35c0ca70 AppRegistry, // 7ef8e53a AppState, // 12012be5