From 2cdd79f4fcc7666745a61edfcdc77891cbbddff9 Mon Sep 17 00:00:00 2001 From: Sam Zhou Date: Wed, 12 Mar 2025 09:10:02 -0700 Subject: [PATCH] Pre-suppress errors ahead of next release Reviewed By: gkz Differential Revision: D71039278 fbshipit-source-id: 5d42ee1707335bfb579fa49beeb597d98eba70c5 --- packages/react-native/Libraries/Alert/Alert.js | 3 +++ packages/react-native/Libraries/Interaction/TaskQueue.js | 1 + packages/react-native/flow/global.js | 1 + 3 files changed, 5 insertions(+) diff --git a/packages/react-native/Libraries/Alert/Alert.js b/packages/react-native/Libraries/Alert/Alert.js index 3629f6b683f..cf08c186db1 100644 --- a/packages/react-native/Libraries/Alert/Alert.js +++ b/packages/react-native/Libraries/Alert/Alert.js @@ -119,12 +119,15 @@ class Alert { if (action === constants.buttonClicked) { if (buttonKey === constants.buttonNeutral) { // $FlowFixMe[incompatible-type] + // $FlowFixMe[incompatible-use] buttonNeutral.onPress && buttonNeutral.onPress(); } else if (buttonKey === constants.buttonNegative) { // $FlowFixMe[incompatible-type] + // $FlowFixMe[incompatible-use] buttonNegative.onPress && buttonNegative.onPress(); } else if (buttonKey === constants.buttonPositive) { // $FlowFixMe[incompatible-type] + // $FlowFixMe[incompatible-use] buttonPositive.onPress && buttonPositive.onPress(); } } else if (action === constants.dismissed) { diff --git a/packages/react-native/Libraries/Interaction/TaskQueue.js b/packages/react-native/Libraries/Interaction/TaskQueue.js index 2b671b8c0fc..ad32b58b04a 100644 --- a/packages/react-native/Libraries/Interaction/TaskQueue.js +++ b/packages/react-native/Libraries/Interaction/TaskQueue.js @@ -117,6 +117,7 @@ class TaskQueue { } catch (e) { e.message = // $FlowFixMe[incompatible-type] + // $FlowFixMe[incompatible-use] 'TaskQueue: Error with task ' + (task.name || '') + ': ' + e.message; throw e; } diff --git a/packages/react-native/flow/global.js b/packages/react-native/flow/global.js index 676f09957d2..4c7f9e25cc2 100644 --- a/packages/react-native/flow/global.js +++ b/packages/react-native/flow/global.js @@ -15,6 +15,7 @@ * when defining the types here. Consider both presence (`?`) as well as * writeability (`+`) when defining types. */ +// $FlowFixMe[libdef-override] declare var global: { // setUpGlobals +window: typeof global,