diff --git a/packages/dev-middleware/src/inspector-proxy/Device.js b/packages/dev-middleware/src/inspector-proxy/Device.js
index 2fa4695caebb..e128c8a8726c 100644
--- a/packages/dev-middleware/src/inspector-proxy/Device.js
+++ b/packages/dev-middleware/src/inspector-proxy/Device.js
@@ -809,6 +809,8 @@ export default class Device {
}
if (
+ /* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
+ * roll out. See https://fburl.com/workplace/4oq3zi07. */
payload.method === 'Runtime.executionContextCreated' &&
this.#isLegacyPageReloading
) {
diff --git a/packages/react-native-codegen/src/generators/components/GenerateTests.js b/packages/react-native-codegen/src/generators/components/GenerateTests.js
index 5ec224a2f49a..2a00f4b13042 100644
--- a/packages/react-native-codegen/src/generators/components/GenerateTests.js
+++ b/packages/react-native-codegen/src/generators/components/GenerateTests.js
@@ -105,6 +105,8 @@ function getTestCasesForProp(
propValue: typeAnnotation.default != null ? typeAnnotation.default : true,
});
// $FlowFixMe[incompatible-type]
+ /* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
+ * roll out. See https://fburl.com/workplace/4oq3zi07. */
} else if (typeAnnotation.type === 'IntegerTypeAnnotation') {
cases.push({
propName,
diff --git a/packages/react-native-codegen/src/parsers/flow/components/commands.js b/packages/react-native-codegen/src/parsers/flow/components/commands.js
index 592be4d8a824..d6a680fd5bdf 100644
--- a/packages/react-native-codegen/src/parsers/flow/components/commands.js
+++ b/packages/react-native-codegen/src/parsers/flow/components/commands.js
@@ -105,6 +105,8 @@ function buildCommandSchema(
break;
case 'Array':
case '$ReadOnlyArray':
+ /* $FlowFixMe[invalid-compare] Error discovered during Constant
+ * Condition roll out. See https://fburl.com/workplace/4oq3zi07. */
if (!paramValue.type === 'GenericTypeAnnotation') {
throw new Error(
'Array and $ReadOnlyArray are GenericTypeAnnotation for array',
diff --git a/packages/react-native-codegen/src/parsers/typescript/components/commands.js b/packages/react-native-codegen/src/parsers/typescript/components/commands.js
index 2f8ebd83e052..272eeb3be2c1 100644
--- a/packages/react-native-codegen/src/parsers/typescript/components/commands.js
+++ b/packages/react-native-codegen/src/parsers/typescript/components/commands.js
@@ -76,6 +76,8 @@ function buildCommandSchemaInternal(
break;
case 'Array':
case 'ReadOnlyArray':
+ /* $FlowFixMe[invalid-compare] Error discovered during Constant
+ * Condition roll out. See https://fburl.com/workplace/4oq3zi07. */
if (!paramValue.type === 'TSTypeReference') {
throw new Error(
'Array and ReadOnlyArray are TSTypeReference for array',
diff --git a/packages/react-native/Libraries/Animated/nodes/AnimatedStyle.js b/packages/react-native/Libraries/Animated/nodes/AnimatedStyle.js
index 0d68f7c7b375..23d12957f910 100644
--- a/packages/react-native/Libraries/Animated/nodes/AnimatedStyle.js
+++ b/packages/react-native/Libraries/Animated/nodes/AnimatedStyle.js
@@ -102,6 +102,8 @@ export default class AnimatedStyle extends AnimatedWithChildren {
const [nodeKeys, nodes, style] = createAnimatedStyle(
flatStyle,
allowlist,
+ /* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
+ * roll out. See https://fburl.com/workplace/4oq3zi07. */
Platform.OS !== 'web',
);
if (nodes.length === 0) {
diff --git a/packages/react-native/Libraries/AppState/AppState.js b/packages/react-native/Libraries/AppState/AppState.js
index 3d2da93401d3..7c018733ff7e 100644
--- a/packages/react-native/Libraries/AppState/AppState.js
+++ b/packages/react-native/Libraries/AppState/AppState.js
@@ -134,9 +134,13 @@ class AppStateImpl {
// $FlowFixMe[invalid-tuple-arity] Flow cannot refine handler based on the event type
const focusOrBlurHandler: () => void = handler;
return emitter.addListener('appStateFocusChange', hasFocus => {
+ /* $FlowFixMe[invalid-compare] Error discovered during Constant
+ * Condition roll out. See https://fburl.com/workplace/4oq3zi07. */
if (type === 'blur' && !hasFocus) {
focusOrBlurHandler();
}
+ /* $FlowFixMe[invalid-compare] Error discovered during Constant
+ * Condition roll out. See https://fburl.com/workplace/4oq3zi07. */
if (type === 'focus' && hasFocus) {
focusOrBlurHandler();
}
diff --git a/packages/react-native/Libraries/Debugging/DebuggingOverlayRegistry.js b/packages/react-native/Libraries/Debugging/DebuggingOverlayRegistry.js
index 24da5fa088b9..b8cba9961420 100644
--- a/packages/react-native/Libraries/Debugging/DebuggingOverlayRegistry.js
+++ b/packages/react-native/Libraries/Debugging/DebuggingOverlayRegistry.js
@@ -124,6 +124,8 @@ class DebuggingOverlayRegistry {
let iterator: ?ReadOnlyElement = instance;
while (iterator != null) {
for (const subscriber of this.#registry) {
+ /* $FlowFixMe[invalid-compare] Error discovered during Constant
+ * Condition roll out. See https://fburl.com/workplace/4oq3zi07. */
if (subscriber.rootViewRef.current === iterator) {
return subscriber;
}
diff --git a/packages/react-native/Libraries/Pressability/HoverState.js b/packages/react-native/Libraries/Pressability/HoverState.js
index 9b6bae1a4a47..cfa3f2fd59a8 100644
--- a/packages/react-native/Libraries/Pressability/HoverState.js
+++ b/packages/react-native/Libraries/Pressability/HoverState.js
@@ -14,6 +14,8 @@ let isEnabled = false;
/* $FlowFixMe[incompatible-type] Error found due to incomplete typing of
* Platform.flow.js */
+/* $FlowFixMe[invalid-compare] Error discovered during Constant Condition roll
+ * out. See https://fburl.com/workplace/4oq3zi07. */
if (Platform.OS === 'web') {
const canUseDOM = Boolean(
typeof window !== 'undefined' &&
diff --git a/packages/react-native/Libraries/Utilities/ReactNativeTestTools.js b/packages/react-native/Libraries/Utilities/ReactNativeTestTools.js
index 535acc0d5c5c..c49d47cec85f 100644
--- a/packages/react-native/Libraries/Utilities/ReactNativeTestTools.js
+++ b/packages/react-native/Libraries/Utilities/ReactNativeTestTools.js
@@ -38,13 +38,21 @@ function byClickable(): Predicate {
node =>
// note: lazy-mounts press handlers after the first press,
// so this is a workaround for targeting text nodes.
+ /* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
+ * roll out. See https://fburl.com/workplace/4oq3zi07. */
(node.type === Text &&
node.props &&
typeof node.props.onPress === 'function') ||
// note: Special casing since it doesn't use touchable
+ /* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
+ * roll out. See https://fburl.com/workplace/4oq3zi07. */
(node.type === Switch && node.props && node.props.disabled !== true) ||
+ /* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
+ * roll out. See https://fburl.com/workplace/4oq3zi07. */
(node.type === View &&
node?.props?.onStartShouldSetResponder?.testOnly_pressabilityConfig) ||
+ /* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
+ * roll out. See https://fburl.com/workplace/4oq3zi07. */
(node.type === TouchableWithoutFeedback &&
node.props &&
typeof node.props.onPress === 'function') ||
@@ -174,8 +182,12 @@ function renderWithStrictMode(element: React.Node): ReactTestRendererType {
function tap(instance: ReactTestInstance) {
const touchable = instance.find(byClickable());
+ /* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
+ * roll out. See https://fburl.com/workplace/4oq3zi07. */
if (touchable.type === Text && touchable.props && touchable.props.onPress) {
touchable.props.onPress();
+ /* $FlowFixMe[invalid-compare] Error discovered during Constant Condition
+ * roll out. See https://fburl.com/workplace/4oq3zi07. */
} else if (touchable.type === Switch && touchable.props) {
const value = !touchable.props.value;
const {onChange, onValueChange} = touchable.props;
diff --git a/packages/rn-tester/js/examples/ScrollView/ScrollViewExample.js b/packages/rn-tester/js/examples/ScrollView/ScrollViewExample.js
index ad15022251f7..8f175a5437bf 100644
--- a/packages/rn-tester/js/examples/ScrollView/ScrollViewExample.js
+++ b/packages/rn-tester/js/examples/ScrollView/ScrollViewExample.js
@@ -693,9 +693,13 @@ const SnapToOptions = () => {
/>