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 8
8
* @flow strict-local
9
9
*/
10
10
11
- import type { HostComponent } from '../../src/private/types/HostComponent' ;
12
11
import type { HostInstance } from '../../src/private/types/HostInstance' ;
13
12
import type {
14
13
InternalInstanceHandle ,
15
14
Node ,
16
15
} from '../Renderer/shims/ReactNativeTypes' ;
17
- import type ReactFabricHostComponent from './ReactFabricPublicInstance/ReactFabricHostComponent' ;
18
16
import type { ElementRef , ElementType } from 'react' ;
19
17
20
18
import {
@@ -136,8 +134,8 @@ export function isProfilingRenderer(): boolean {
136
134
}
137
135
138
136
export function isChildPublicInstance (
139
- parentInstance : ReactFabricHostComponent | HostComponent < empty > ,
140
- childInstance : ReactFabricHostComponent | HostComponent < empty > ,
137
+ parentInstance : HostInstance ,
138
+ childInstance : HostInstance ,
141
139
) : boolean {
142
140
return require ( '../Renderer/shims/ReactNative' ) . default . isChildPublicInstance (
143
141
parentInstance ,
Original file line number Diff line number Diff line change @@ -36,7 +36,19 @@ import typeof deepFreezeAndThrowOnMutationInDev from '../Utilities/deepFreezeAnd
36
36
import typeof deepDiffer from '../Utilities/differ/deepDiffer' ;
37
37
import typeof Platform from '../Utilities/Platform' ;
38
38
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 '../Types/HostInstance' ;
49
+
39
50
export type { PublicRootInstance } from '../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance' ;
51
+ export type PublicTextInstance = ReturnType < createPublicTextInstance > ;
40
52
41
53
// flowlint unsafe-getters-setters:off
42
54
module . exports = {
Original file line number Diff line number Diff line change @@ -6976,8 +6976,8 @@ declare export function unstable_batchedUpdates<T>(
6976
6976
): void;
6977
6977
declare export function isProfilingRenderer(): boolean;
6978
6978
declare export function isChildPublicInstance(
6979
- parentInstance: ReactFabricHostComponent | HostComponent<empty> ,
6980
- childInstance: ReactFabricHostComponent | HostComponent<empty>
6979
+ parentInstance: HostInstance ,
6980
+ childInstance: HostInstance
6981
6981
): boolean;
6982
6982
declare export function getNodeFromInternalInstanceHandle(
6983
6983
internalInstanceHandle: InternalInstanceHandle
You can’t perform that action at this time.
0 commit comments