From 19fc1c75d4cbfb3d8ba6780b1a977aff77fb1282 Mon Sep 17 00:00:00 2001 From: Panos Vekris Date: Tue, 8 Oct 2024 10:28:56 -0700 Subject: [PATCH] replace '$TEMPORARY$object' with '$ReadOnly' [1/n] (#46879) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46879 * `js1 flow-runner codemod flow/replaceTempObjWithReadOnly` * Suppress errors Changelog: [internal] Reviewed By: SamChou19815 Differential Revision: D64019269 fbshipit-source-id: 811deeff3be2f9ebed750719da67a4e87a074a67 --- .../Libraries/LogBox/UI/LogBoxInspectorStackFrames.js | 2 +- packages/rn-tester/js/components/RNTesterNavbar.js | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/react-native/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js b/packages/react-native/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js index e82d65093a4..b3473bc03c1 100644 --- a/packages/react-native/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +++ b/packages/react-native/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js @@ -138,7 +138,7 @@ function StackFrameList(props: { } function StackFrameFooter( - props: $TEMPORARY$object<{message: string, onPress: () => void}>, + props: $ReadOnly<{message: string, onPress: () => void}>, ) { return ( diff --git a/packages/rn-tester/js/components/RNTesterNavbar.js b/packages/rn-tester/js/components/RNTesterNavbar.js index 3b112b14970..e67d7f55fd6 100644 --- a/packages/rn-tester/js/components/RNTesterNavbar.js +++ b/packages/rn-tester/js/components/RNTesterNavbar.js @@ -8,8 +8,8 @@ * @flow strict-local */ -import type {RNTesterTheme} from './RNTesterTheme'; import type {ScreenTypes} from '../types/RNTesterTypes'; +import type {RNTesterTheme} from './RNTesterTheme'; import {RNTesterThemeContext} from './RNTesterTheme'; import * as React from 'react'; @@ -56,7 +56,7 @@ const ComponentTab = ({ isComponentActive, handleNavBarPress, theme, -}: $TEMPORARY$object<{ +}: $ReadOnly<{ handleNavBarPress: NavBarOnPressHandler, isComponentActive: boolean, theme: RNTesterTheme, @@ -77,7 +77,7 @@ const PlaygroundTab = ({ isComponentActive, handleNavBarPress, theme, -}: $TEMPORARY$object<{ +}: $ReadOnly<{ handleNavBarPress: NavBarOnPressHandler, isComponentActive: boolean, theme: RNTesterTheme, @@ -98,7 +98,7 @@ const APITab = ({ isAPIActive, handleNavBarPress, theme, -}: $TEMPORARY$object<{ +}: $ReadOnly<{ handleNavBarPress: NavBarOnPressHandler, isAPIActive: boolean, theme: RNTesterTheme,