From cd40e4e387830fcbdfc06eb0c27eaae74f462726 Mon Sep 17 00:00:00 2001 From: generatedunixname89002005232357 Date: Mon, 6 Jan 2025 22:28:51 -0800 Subject: [PATCH] Revert D67868219 (#48512) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48512 This diff reverts D67868219 Breaking OTA Compatibility Check https://fburl.com/onedetection/m0hqsvjp [General][Changed] - Revert: Mark intersectionRect required in NativeIntersectionObserverEntry to reflect native logic. Reviewed By: lunaleaps Differential Revision: D67882016 fbshipit-source-id: 8cff299ee823f8ef06fe96667e832b68be45666d --- .../intersectionobserver/NativeIntersectionObserver.h | 2 +- .../intersectionobserver/specs/NativeIntersectionObserver.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/react-native/ReactCommon/react/nativemodule/intersectionobserver/NativeIntersectionObserver.h b/packages/react-native/ReactCommon/react/nativemodule/intersectionobserver/NativeIntersectionObserver.h index d0653998093bc8..dcc2a6c3fd60f5 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/intersectionobserver/NativeIntersectionObserver.h +++ b/packages/react-native/ReactCommon/react/nativemodule/intersectionobserver/NativeIntersectionObserver.h @@ -45,7 +45,7 @@ using NativeIntersectionObserverEntry = // rootRect RectAsTuple, // intersectionRect - RectAsTuple, + std::optional, // isIntersectingAboveThresholds bool, // time diff --git a/packages/react-native/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js b/packages/react-native/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js index 7ceba03d7d2a67..e2d9a32efde752 100644 --- a/packages/react-native/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +++ b/packages/react-native/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js @@ -17,7 +17,8 @@ export type NativeIntersectionObserverEntry = { targetInstanceHandle: mixed, targetRect: $ReadOnlyArray, // It's actually a tuple with x, y, width and height rootRect: $ReadOnlyArray, // It's actually a tuple with x, y, width and height - intersectionRect: $ReadOnlyArray, // It's actually a tuple with x, y, width and height + // TODO(T209328432) - Remove optionality of intersectionRect when native changes are released + intersectionRect: ?$ReadOnlyArray, // It's actually a tuple with x, y, width and height isIntersectingAboveThresholds: boolean, time: number, };