6
6
*
7
7
* @noformat
8
8
* @flow strict
9
- * @generated SignedSource<<265b342f0d29323bebb711ba0bc882ec >>
9
+ * @generated SignedSource<<4df0c7d45c633ce1409906d78ee6813c >>
10
10
*
11
11
* This file was sync'd from the facebook/react repository.
12
12
*/
@@ -98,7 +98,23 @@ export type PartialViewConfig = $ReadOnly<{
98
98
validAttributes ?: PartialAttributeConfiguration ,
99
99
} > ;
100
100
101
- export type NativeMethods = $ReadOnly < {
101
+ /**
102
+ * Current usages should migrate to this definition
103
+ */
104
+ export interface INativeMethods {
105
+ blur ( ) : void ;
106
+ focus ( ) : void ;
107
+ measure ( callback : MeasureOnSuccessCallback ) : void ;
108
+ measureInWindow ( callback : MeasureInWindowOnSuccessCallback ) : void ;
109
+ measureLayout (
110
+ relativeToNativeNode : number | ElementRef < HostComponent < mixed >> ,
111
+ onSuccess : MeasureLayoutOnSuccessCallback ,
112
+ onFail ?: ( ) => void ,
113
+ ) : void ;
114
+ setNativeProps ( nativeProps : { ...} ) : void ;
115
+ }
116
+
117
+ export type NativeMethods = $ReadOnly < { |
102
118
blur ( ) : void ,
103
119
focus ( ) : void ,
104
120
measure ( callback : MeasureOnSuccessCallback ) : void ,
@@ -109,7 +125,11 @@ export type NativeMethods = $ReadOnly<{
109
125
onFail ?: ( ) => void ,
110
126
) : void ,
111
127
setNativeProps ( nativeProps : { ...} ) : void ,
112
- } > ;
128
+ | } > ;
129
+
130
+ // This validates that INativeMethods and NativeMethods stay in sync using Flow!
131
+ declare var ensureNativeMethodsAreSynced : NativeMethods ;
132
+ ( ensureNativeMethodsAreSynced : INativeMethods ) ;
113
133
114
134
export type HostComponent < T > = AbstractComponent < T , $ReadOnly < NativeMethods >> ;
115
135
@@ -195,6 +215,8 @@ export type ReactNativeType = {
195
215
...
196
216
} ;
197
217
218
+ export opaque type Node = mixed ;
219
+
198
220
export type ReactFabricType = {
199
221
findHostInstance_DEPRECATED < TElementType : ElementType > (
200
222
componentOrHandle : ?( ElementRef < TElementType > | number ) ,
@@ -218,18 +240,7 @@ export type ReactFabricType = {
218
240
concurrentRoot : ?boolean ,
219
241
) : ?ElementRef < ElementType > ,
220
242
unmountComponentAtNode ( containerTag : number ) : void ,
221
- ...
222
- } ;
223
-
224
- export type ReactNativeEventTarget = {
225
- node : { ...} ,
226
- canonical : {
227
- _nativeTag : number ,
228
- viewConfig : ViewConfig ,
229
- currentProps : { ...} ,
230
- _internalInstanceHandle : { ...} ,
231
- ...
232
- } ,
243
+ getNodeFromInternalInstanceHandle ( internalInstanceHandle : mixed ) : ?Node ,
233
244
...
234
245
} ;
235
246
0 commit comments