66 *
77 * @noformat
88 * @flow strict
9- * @generated SignedSource<<265b342f0d29323bebb711ba0bc882ec >>
9+ * @generated SignedSource<<4df0c7d45c633ce1409906d78ee6813c >>
1010 *
1111 * This file was sync'd from the facebook/react repository.
1212 */
@@ -98,7 +98,23 @@ export type PartialViewConfig = $ReadOnly<{
9898 validAttributes ?: PartialAttributeConfiguration ,
9999} > ;
100100
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 < { |
102118 blur ( ) : void ,
103119 focus ( ) : void ,
104120 measure ( callback : MeasureOnSuccessCallback ) : void ,
@@ -109,7 +125,11 @@ export type NativeMethods = $ReadOnly<{
109125 onFail ?: ( ) => void ,
110126 ) : void ,
111127 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 ) ;
113133
114134export type HostComponent < T > = AbstractComponent < T , $ReadOnly < NativeMethods >> ;
115135
@@ -195,6 +215,8 @@ export type ReactNativeType = {
195215 ...
196216} ;
197217
218+ export opaque type Node = mixed ;
219+
198220export type ReactFabricType = {
199221 findHostInstance_DEPRECATED < TElementType : ElementType > (
200222 componentOrHandle : ?( ElementRef < TElementType > | number ) ,
@@ -218,18 +240,7 @@ export type ReactFabricType = {
218240 concurrentRoot : ?boolean ,
219241 ) : ?ElementRef < ElementType > ,
220242 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 ,
233244 ...
234245} ;
235246
0 commit comments