Skip to content

Commit 6206b0b

Browse files
huntiemeta-codesync[bot]
authored andcommitted
Export Animated.Numeric type in public API (#57309)
Summary: Pull Request resolved: #57309 `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 fbshipit-source-id: 3202271cefceb21c6e687b7ecd87c97d8846fb6e
1 parent fa8fad8 commit 6206b0b

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

packages/react-native/Libraries/Animated/AnimatedExports.js.flow

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import AnimatedImplementation from './AnimatedImplementation';
1212

13-
export type {CompositeAnimation} from './AnimatedImplementation';
13+
export type {CompositeAnimation, Numeric} from './AnimatedImplementation';
1414
export type {DecayAnimationConfig} from './animations/DecayAnimation';
1515
export type {SpringAnimationConfig} from './animations/SpringAnimation';
1616
export type {TimingAnimationConfig} from './animations/TimingAnimation';

packages/react-native/ReactNativeApi.d.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<b039d3ad12debfc2af81bc7dc85fb584>>
7+
* @generated SignedSource<<42200de8ca10d30541e23b67547d9a13>>
88
*
99
* This file was generated by scripts/js-api/build-types/index.js.
1010
*/
@@ -1275,6 +1275,7 @@ declare type AndroidProps = {
12751275
declare namespace Animated {
12761276
export {
12771277
CompositeAnimation,
1278+
AnimatedNumeric as Numeric,
12781279
DecayAnimationConfig,
12791280
SpringAnimationConfig,
12801281
TimingAnimationConfig,
@@ -1431,6 +1432,15 @@ declare class AnimatedNode_default {
14311432
declare type AnimatedNodeConfig = {
14321433
readonly debugID?: string
14331434
}
1435+
declare type AnimatedNumeric =
1436+
| AnimatedAddition_default
1437+
| AnimatedDiffClamp_default
1438+
| AnimatedDivision_default
1439+
| AnimatedInterpolation_default<number>
1440+
| AnimatedModulo_default
1441+
| AnimatedMultiplication_default
1442+
| AnimatedSubtraction_default
1443+
| AnimatedValue_default
14341444
declare type AnimatedProps<Props extends {}> = LooseOmit<
14351445
{
14361446
[K in keyof Props]: K extends NonAnimatedProps
@@ -5910,7 +5920,7 @@ export {
59105920
AlertOptions, // a0cdac0f
59115921
AlertType, // 5ab91217
59125922
AndroidKeyboardEvent, // e03becc8
5913-
Animated, // a81c717c
5923+
Animated, // 1ac00401
59145924
AppConfig, // 35c0ca70
59155925
AppRegistry, // 7ef8e53a
59165926
AppState, // 12012be5

0 commit comments

Comments
 (0)