From 38423fd96b9369a701471973f25d5d784db08d49 Mon Sep 17 00:00:00 2001 From: Marco Wang Date: Tue, 10 Mar 2026 14:13:50 -0700 Subject: [PATCH] [flow] Migrate type param bounds from `:` to `extends` in ReactNativeTypes Flow's type parameter bound syntax `` has been deprecated in favor of ``. This updates the 5 occurrences in ReactNativeTypes.js to use the new syntax. This is the source file that gets synced to react-native-github at Libraries/Renderer/shims/ReactNativeTypes.js via the build pipeline. --- packages/react-native-renderer/src/ReactNativeTypes.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/react-native-renderer/src/ReactNativeTypes.js b/packages/react-native-renderer/src/ReactNativeTypes.js index cfd026bc7d08..9205d8120651 100644 --- a/packages/react-native-renderer/src/ReactNativeTypes.js +++ b/packages/react-native-renderer/src/ReactNativeTypes.js @@ -83,7 +83,7 @@ type InspectorDataProps = $ReadOnly<{ }>; type InspectorDataGetter = ( - ( + ( componentOrHandle: React.ElementRef | number, ) => ?number, ) => $ReadOnly<{ @@ -142,10 +142,10 @@ export type RenderRootOptions = { * Provide minimal Flow typing for the high-level RN API and call it a day. */ export type ReactNativeType = { - findHostInstance_DEPRECATED( + findHostInstance_DEPRECATED( componentOrHandle: ?(React.ElementRef | number), ): ?PublicInstance, - findNodeHandle( + findNodeHandle( componentOrHandle: ?(React.ElementRef | number), ): ?number, isChildPublicInstance(parent: PublicInstance, child: PublicInstance): boolean, @@ -171,10 +171,10 @@ export opaque type Node = mixed; export opaque type InternalInstanceHandle = mixed; export type ReactFabricType = { - findHostInstance_DEPRECATED( + findHostInstance_DEPRECATED( componentOrHandle: ?(React.ElementRef | number), ): ?PublicInstance, - findNodeHandle( + findNodeHandle( componentOrHandle: ?(React.ElementRef | number), ): ?number, dispatchCommand(