File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
react-native-renderer/src Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 99 * @flow strict
1010 */
1111
12- import type { ElementRef , ElementType , MixedElement } from 'react' ;
12+ import type {
13+ Component as ReactComponent ,
14+ ElementRef ,
15+ ElementType ,
16+ MixedElement ,
17+ RefSetter ,
18+ } from 'react' ;
1319// $FlowFixMe[nonstrict-import] TODO(@rubennorte)
1420import { type PublicRootInstance } from 'react-native/Libraries/ReactPrivate/ReactNativePrivateInterface' ;
1521
@@ -135,7 +141,7 @@ declare const ensureNativeMethodsAreSynced: NativeMethods;
135141
136142export type HostInstance = NativeMethods ;
137143export type HostComponent < Config : { ...} > = component (
138- ref : React$ RefSetter< HostInstance > ,
144+ ref : RefSetter < HostInstance > ,
139145 ...Config
140146) ;
141147
@@ -188,7 +194,8 @@ export type RenderRootOptions = {
188194 errorInfo : {
189195 + componentStack ?: ?string ,
190196 // $FlowFixMe[unclear-type] unknown props and state.
191- + errorBoundary ?: ?React$Component < any , any > ,
197+ // $FlowFixMe[value-as-type] Component in react repo is any-typed, but it will be well typed externally.
198+ + errorBoundary ?: ?ReactComponent < any , any > ,
192199 } ,
193200 ) => void ,
194201 onRecoverableError ?: (
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export type Key = React$Key;
1717export type Node = React$Node ;
1818export type Context < T > = React$Context < T > ;
1919export type Portal = React$Portal ;
20+ export type RefSetter < - I > = React$RefSetter < I > ;
2021export type ElementProps < C > = React$ElementProps < C > ;
2122export type ElementConfig < C > = React$ElementConfig < C > ;
2223export type ElementRef < C > = React$ElementRef < C > ;
You can’t perform that action at this time.
0 commit comments