88 */
99
1010import type { Node , HostComponent } from './ReactNativeTypes' ;
11- import type { PublicInstance as FabricPublicInstance } from './ReactFiberConfigFabric' ;
12- import type { PublicInstance as PaperPublicInstance } from './ReactFiberConfigNative' ;
1311import type { ElementRef , ElementType } from 'react' ;
1412
1513// Modules provided by RN:
@@ -225,6 +223,11 @@ export function getNodeFromInternalInstanceHandle(
225223 ) ;
226224}
227225
226+ // Should have been PublicInstance from ReactFiberConfigFabric
227+ type FabricPublicInstance = mixed ;
228+ // Should have been PublicInstance from ReactFiberConfigNative
229+ type PaperPublicInstance = HostComponent < mixed > ;
230+
228231// Remove this once Paper is no longer supported and DOM Node API are enabled by default in RN.
229232export function isChildPublicInstance (
230233 parentInstance : FabricPublicInstance | PaperPublicInstance ,
@@ -251,8 +254,10 @@ export function isChildPublicInstance(
251254 }
252255
253256 const parentInternalInstanceHandle =
257+ // $FlowExpectedError[incompatible-call] PublicInstance from ReactNativeTypes is opaque, treat it as PublicInstance from ReactFiberConfigFabric.
254258 getInternalInstanceHandleFromPublicInstance ( parentInstance ) ;
255259 const childInternalInstanceHandle =
260+ // $FlowExpectedError[incompatible-call] PublicInstance from ReactNativeTypes is opaque, treat it as PublicInstance from ReactFiberConfigFabric.
256261 getInternalInstanceHandleFromPublicInstance ( childInstance ) ;
257262
258263 // Fabric
0 commit comments