Skip to content

Commit ed70677

Browse files
committed
Update ReactNativeTypes for root options (part 2) (#28857)
Forgot to push a change before mergin #28850 DiffTrain build for commit b5e5ce8.
1 parent 6130570 commit ed70677

File tree

2 files changed

+22
-20
lines changed

2 files changed

+22
-20
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
da6ba53b10d8240fc251ba14a3e5878604d3dc7d
1+
b5e5ce8e0a899345dab1ce71c74bc1d1c28c6a0d

compiled-rn/facebook-fbsource/xplat/js/react-native-github/Libraries/Renderer/shims/ReactNativeTypes.js

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noformat
88
* @flow strict
99
* @nolint
10-
* @generated SignedSource<<f33ee88cc50bb00a16d281dce9952e21>>
10+
* @generated SignedSource<<c41f61379973354629ee7bf55ba92541>>
1111
*/
1212

1313
import type {ElementRef, ElementType, Element, AbstractComponent} from 'react';
@@ -176,6 +176,25 @@ export type TouchedViewDataAtPoint = $ReadOnly<{
176176
...InspectorData,
177177
}>;
178178

179+
export type RenderRootOptions = {
180+
onUncaughtError?: (
181+
error: mixed,
182+
errorInfo: {+componentStack?: ?string},
183+
) => void,
184+
onCaughtError?: (
185+
error: mixed,
186+
errorInfo: {
187+
+componentStack?: ?string,
188+
// $FlowFixMe[unclear-type] unknown props and state.
189+
+errorBoundary?: ?React$Component<any, any>,
190+
},
191+
) => void,
192+
onRecoverableError?: (
193+
error: mixed,
194+
errorInfo: {+componentStack?: ?string},
195+
) => void,
196+
};
197+
179198
/**
180199
* Flat ReactNative renderer bundles are too big for Flow to parse efficiently.
181200
* Provide minimal Flow typing for the high-level RN API and call it a day.
@@ -204,6 +223,7 @@ export type ReactNativeType = {
204223
element: Element<ElementType>,
205224
containerTag: number,
206225
callback: ?() => void,
226+
options: ?RenderRootOptions,
207227
): ?ElementRef<ElementType>,
208228
unmountComponentAtNode(containerTag: number): void,
209229
unmountComponentAtNodeAndRemoveContainer(containerTag: number): void,
@@ -217,24 +237,6 @@ export opaque type InternalInstanceHandle = mixed;
217237
type PublicInstance = mixed;
218238
type PublicTextInstance = mixed;
219239

220-
export type RenderRootOptions = {
221-
onUncaughtError?: (
222-
error: mixed,
223-
errorInfo: {+componentStack?: ?string},
224-
) => void,
225-
onCaughtError?: (
226-
error: mixed,
227-
errorInfo: {
228-
+componentStack?: ?string,
229-
+errorBoundary?: ?React$Component<any, any>,
230-
},
231-
) => void,
232-
onRecoverableError?: (
233-
error: mixed,
234-
errorInfo: {+componentStack?: ?string},
235-
) => void,
236-
};
237-
238240
export type ReactFabricType = {
239241
findHostInstance_DEPRECATED<TElementType: ElementType>(
240242
componentOrHandle: ?(ElementRef<TElementType> | number),

0 commit comments

Comments
 (0)