diff --git a/packages/react-native/Libraries/Renderer/REVISION b/packages/react-native/Libraries/Renderer/REVISION index b808372b01808f..179dc6976b4c06 100644 --- a/packages/react-native/Libraries/Renderer/REVISION +++ b/packages/react-native/Libraries/Renderer/REVISION @@ -1 +1 @@ -fccf3a9fba5fd778c678657c556344b333111cfb \ No newline at end of file +3554c8852fe209ad02380ebd24d32f56d6399906 \ No newline at end of file diff --git a/packages/react-native/Libraries/Renderer/shims/ReactNativeTypes.js b/packages/react-native/Libraries/Renderer/shims/ReactNativeTypes.js index 403452ef41a5d6..fd44305c67842f 100644 --- a/packages/react-native/Libraries/Renderer/shims/ReactNativeTypes.js +++ b/packages/react-native/Libraries/Renderer/shims/ReactNativeTypes.js @@ -6,7 +6,7 @@ * * @noformat * @flow strict - * @generated SignedSource<<265b342f0d29323bebb711ba0bc882ec>> + * @generated SignedSource<<7dc3ed81183377055bac08760fcd775b>> * * This file was sync'd from the facebook/react repository. */ @@ -98,7 +98,23 @@ export type PartialViewConfig = $ReadOnly<{ validAttributes?: PartialAttributeConfiguration, }>; -export type NativeMethods = $ReadOnly<{ +/** + * Current usages should migrate to this definition + */ +export interface INativeMethods { + blur(): void; + focus(): void; + measure(callback: MeasureOnSuccessCallback): void; + measureInWindow(callback: MeasureInWindowOnSuccessCallback): void; + measureLayout( + relativeToNativeNode: number | ElementRef>, + onSuccess: MeasureLayoutOnSuccessCallback, + onFail?: () => void, + ): void; + setNativeProps(nativeProps: {...}): void; +} + +export type NativeMethods = $ReadOnly<{| blur(): void, focus(): void, measure(callback: MeasureOnSuccessCallback): void, @@ -109,7 +125,11 @@ export type NativeMethods = $ReadOnly<{ onFail?: () => void, ): void, setNativeProps(nativeProps: {...}): void, -}>; +|}>; + +// This validates that INativeMethods and NativeMethods stay in sync using Flow! +declare var ensureNativeMethodsAreSynced: NativeMethods; +(ensureNativeMethodsAreSynced: INativeMethods); export type HostComponent = AbstractComponent>; @@ -195,6 +215,10 @@ export type ReactNativeType = { ... }; +export opaque type Node = mixed; +type InternalInstanceHandle = mixed; +type PublicInstance = mixed; + export type ReactFabricType = { findHostInstance_DEPRECATED( componentOrHandle: ?(ElementRef | number), @@ -218,18 +242,12 @@ export type ReactFabricType = { concurrentRoot: ?boolean, ): ?ElementRef, unmountComponentAtNode(containerTag: number): void, - ... -}; - -export type ReactNativeEventTarget = { - node: {...}, - canonical: { - _nativeTag: number, - viewConfig: ViewConfig, - currentProps: {...}, - _internalInstanceHandle: {...}, - ... - }, + getNodeFromInternalInstanceHandle( + internalInstanceHandle: InternalInstanceHandle, + ): ?Node, + getPublicInstanceFromInternalInstanceHandle( + internalInstanceHandle: InternalInstanceHandle, + ): PublicInstance, ... };