Skip to content

Commit cd40e4e

Browse files
generatedunixname89002005232357facebook-github-bot
authored andcommitted
Revert D67868219 (facebook#48512)
Summary: Pull Request resolved: facebook#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
1 parent 65c6a0a commit cd40e4e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

packages/react-native/ReactCommon/react/nativemodule/intersectionobserver/NativeIntersectionObserver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ using NativeIntersectionObserverEntry =
4545
// rootRect
4646
RectAsTuple,
4747
// intersectionRect
48-
RectAsTuple,
48+
std::optional<RectAsTuple>,
4949
// isIntersectingAboveThresholds
5050
bool,
5151
// time

packages/react-native/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ export type NativeIntersectionObserverEntry = {
1717
targetInstanceHandle: mixed,
1818
targetRect: $ReadOnlyArray<number>, // It's actually a tuple with x, y, width and height
1919
rootRect: $ReadOnlyArray<number>, // It's actually a tuple with x, y, width and height
20-
intersectionRect: $ReadOnlyArray<number>, // It's actually a tuple with x, y, width and height
20+
// TODO(T209328432) - Remove optionality of intersectionRect when native changes are released
21+
intersectionRect: ?$ReadOnlyArray<number>, // It's actually a tuple with x, y, width and height
2122
isIntersectingAboveThresholds: boolean,
2223
time: number,
2324
};

0 commit comments

Comments
 (0)