From 45f9c68718da75b3e9dc2b1e3320bbaa544e6cc5 Mon Sep 17 00:00:00 2001 From: Sam Zhou Date: Wed, 2 Dec 2026 09:23:43 -0800 Subject: [PATCH] Upgrade Flow in fbsource (#60485) Summary: Changelog: [Internal] Reviewed By: panagosg7 Differential Revision: D135655324 --- .../Libraries/Components/Pressable/Pressable.js | 5 ++++- private/react-native-fantom/src/index.js | 8 +++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/react-native/Libraries/Components/Pressable/Pressable.js b/packages/react-native/Libraries/Components/Pressable/Pressable.js index bced2044a881..e78a6cee07f1 100644 --- a/packages/react-native/Libraries/Components/Pressable/Pressable.js +++ b/packages/react-native/Libraries/Components/Pressable/Pressable.js @@ -362,7 +362,10 @@ function Pressable({ ref={mergedRef} style={typeof style === 'function' ? style({pressed}) : style} collapsable={false}> - {typeof children === 'function' ? children({pressed}) : children} + { + // $FlowFixMe[incompatible-use] + typeof children === 'function' ? children({pressed}) : children + } {__DEV__ ? : null} ); diff --git a/private/react-native-fantom/src/index.js b/private/react-native-fantom/src/index.js index d58bdf8c783f..73641869a5e3 100644 --- a/private/react-native-fantom/src/index.js +++ b/private/react-native-fantom/src/index.js @@ -372,9 +372,11 @@ export function getDefinedEventHandlers( return []; } // WARNING: This uses React private API (fiber internals). - const memoizedProps = ( - instanceHandle as {memoizedProps?: {[key: string]: unknown}} - ).memoizedProps; + const memoizedProps = // $FlowFixMe[incompatible-indexer] + // $FlowFixMe[incompatible-variance] + // $FlowFixMe[incompatible-type] + (instanceHandle as {memoizedProps?: {[key: string]: unknown}}) + .memoizedProps; if (memoizedProps == null) { return []; }