@@ -174,6 +174,25 @@ export type TouchedViewDataAtPoint = $ReadOnly<{
174
174
...InspectorData ,
175
175
} > ;
176
176
177
+ export type RenderRootOptions = {
178
+ onUncaughtError ?: (
179
+ error : mixed ,
180
+ errorInfo : { + componentStack ?: ?string } ,
181
+ ) => void ,
182
+ onCaughtError ?: (
183
+ error : mixed ,
184
+ errorInfo : {
185
+ + componentStack ?: ?string ,
186
+ // $FlowFixMe[unclear-type] unknown props and state.
187
+ + errorBoundary ?: ?React$Component < any , any > ,
188
+ } ,
189
+ ) => void ,
190
+ onRecoverableError ?: (
191
+ error : mixed ,
192
+ errorInfo : { + componentStack ?: ?string } ,
193
+ ) => void ,
194
+ } ;
195
+
177
196
/**
178
197
* Flat ReactNative renderer bundles are too big for Flow to parse efficiently.
179
198
* Provide minimal Flow typing for the high-level RN API and call it a day.
@@ -202,6 +221,7 @@ export type ReactNativeType = {
202
221
element : Element < ElementType > ,
203
222
containerTag : number ,
204
223
callback : ?( ) => void ,
224
+ options : ?RenderRootOptions ,
205
225
) : ?ElementRef < ElementType> ,
206
226
unmountComponentAtNode ( containerTag : number ) : void ,
207
227
unmountComponentAtNodeAndRemoveContainer ( containerTag : number ) : void ,
@@ -215,24 +235,6 @@ export opaque type InternalInstanceHandle = mixed;
215
235
type PublicInstance = mixed ;
216
236
type PublicTextInstance = mixed ;
217
237
218
- export type RenderRootOptions = {
219
- onUncaughtError ?: (
220
- error : mixed ,
221
- errorInfo : { + componentStack ?: ?string } ,
222
- ) => void ,
223
- onCaughtError ?: (
224
- error : mixed ,
225
- errorInfo : {
226
- + componentStack ?: ?string ,
227
- + errorBoundary ?: ?React$Component < any , any > ,
228
- } ,
229
- ) => void ,
230
- onRecoverableError ?: (
231
- error : mixed ,
232
- errorInfo : { + componentStack ?: ?string } ,
233
- ) => void ,
234
- } ;
235
-
236
238
export type ReactFabricType = {
237
239
findHostInstance_DEPRECATED < TElementType : ElementType > (
238
240
componentOrHandle: ?(ElementRef< TElementType > | number),
0 commit comments