Skip to content

Commit 63dd85f

Browse files
committed
Add ReactNativeTypes for root options (#28850)
Flow should have failed for this but didn't, we need these options sync'd over in the types too. DiffTrain build for commit 657428a.
1 parent 8017f27 commit 63dd85f

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0347fcd0073cf529f67a05be86a0545c3efab8e2
1+
657428a9e960cc9c208498be7d2e293007d85cbd

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

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

1313
import type {ElementRef, ElementType, Element, AbstractComponent} from 'react';
@@ -217,6 +217,24 @@ export opaque type InternalInstanceHandle = mixed;
217217
type PublicInstance = mixed;
218218
type PublicTextInstance = mixed;
219219

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+
220238
export type ReactFabricType = {
221239
findHostInstance_DEPRECATED<TElementType: ElementType>(
222240
componentOrHandle: ?(ElementRef<TElementType> | number),
@@ -239,6 +257,7 @@ export type ReactFabricType = {
239257
containerTag: number,
240258
callback: ?() => void,
241259
concurrentRoot: ?boolean,
260+
options: ?RenderRootOptions,
242261
): ?ElementRef<ElementType>,
243262
unmountComponentAtNode(containerTag: number): void,
244263
getNodeFromInternalInstanceHandle(

0 commit comments

Comments
 (0)