File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed
packages/react-native/Libraries Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 88 * @flow strict-local
99 */
1010
11- import type { HostComponent } from '../../src/private/types/HostComponent' ;
1211import type { HostInstance } from '../../src/private/types/HostInstance' ;
1312import type {
1413 InternalInstanceHandle ,
1514 Node ,
1615} from '../Renderer/shims/ReactNativeTypes' ;
17- import type ReactFabricHostComponent from './ReactFabricPublicInstance/ReactFabricHostComponent' ;
1816import type { ElementRef , ElementType } from 'react' ;
1917
2018import {
@@ -136,8 +134,8 @@ export function isProfilingRenderer(): boolean {
136134}
137135
138136export function isChildPublicInstance (
139- parentInstance : ReactFabricHostComponent | HostComponent < empty > ,
140- childInstance : ReactFabricHostComponent | HostComponent < empty > ,
137+ parentInstance : HostInstance ,
138+ childInstance : HostInstance ,
141139) : boolean {
142140 return require ( '../Renderer/shims/ReactNative' ) . default . isChildPublicInstance (
143141 parentInstance ,
Original file line number Diff line number Diff line change @@ -36,7 +36,19 @@ import typeof deepFreezeAndThrowOnMutationInDev from '../Utilities/deepFreezeAnd
3636import typeof deepDiffer from '../Utilities/differ/deepDiffer' ;
3737import typeof Platform from '../Utilities/Platform' ;
3838
39+ // Expose these types to the React renderer
40+ export type {
41+ HostInstance as PublicInstance ,
42+
43+ // These types are only necessary for Paper
44+ INativeMethods as LegacyPublicInstance ,
45+ MeasureOnSuccessCallback ,
46+ MeasureInWindowOnSuccessCallback ,
47+ MeasureLayoutOnSuccessCallback ,
48+ } from '../../src/private/types/HostInstance' ;
49+
3950export type { PublicRootInstance } from '../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance' ;
51+ export type PublicTextInstance = ReturnType < createPublicTextInstance > ;
4052
4153// flowlint unsafe-getters-setters:off
4254module . exports = {
Original file line number Diff line number Diff line change @@ -6976,8 +6976,8 @@ declare export function unstable_batchedUpdates<T>(
69766976): void;
69776977declare export function isProfilingRenderer(): boolean;
69786978declare export function isChildPublicInstance(
6979- parentInstance: ReactFabricHostComponent | HostComponent<empty> ,
6980- childInstance: ReactFabricHostComponent | HostComponent<empty>
6979+ parentInstance: HostInstance ,
6980+ childInstance: HostInstance
69816981): boolean;
69826982declare export function getNodeFromInternalInstanceHandle(
69836983 internalInstanceHandle: InternalInstanceHandle
You can’t perform that action at this time.
0 commit comments