diff --git a/Libraries/Renderer/REVISION b/Libraries/Renderer/REVISION index b808372b01808f..0fe2ddb1ca6ae2 100644 --- a/Libraries/Renderer/REVISION +++ b/Libraries/Renderer/REVISION @@ -1 +1 @@ -fccf3a9fba5fd778c678657c556344b333111cfb \ No newline at end of file +f828bad387f573c462d2a58afb38aea8bdbe9cb5 \ No newline at end of file diff --git a/Libraries/Renderer/shims/ReactNativeTypes.js b/Libraries/Renderer/shims/ReactNativeTypes.js index 403452ef41a5d6..7ae1c1f788f857 100644 --- a/Libraries/Renderer/shims/ReactNativeTypes.js +++ b/Libraries/Renderer/shims/ReactNativeTypes.js @@ -6,7 +6,7 @@ * * @noformat * @flow strict - * @generated SignedSource<<265b342f0d29323bebb711ba0bc882ec>> + * @generated SignedSource<<4df0c7d45c633ce1409906d78ee6813c>> * * 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,8 @@ export type ReactNativeType = { ... }; +export opaque type Node = mixed; + export type ReactFabricType = { findHostInstance_DEPRECATED( componentOrHandle: ?(ElementRef | number), @@ -218,18 +240,7 @@ export type ReactFabricType = { concurrentRoot: ?boolean, ): ?ElementRef, unmountComponentAtNode(containerTag: number): void, - ... -}; - -export type ReactNativeEventTarget = { - node: {...}, - canonical: { - _nativeTag: number, - viewConfig: ViewConfig, - currentProps: {...}, - _internalInstanceHandle: {...}, - ... - }, + getNodeFromInternalInstanceHandle(internalInstanceHandle: mixed): ?Node, ... };