Skip to content

Write TouchedViewDataAtPoint as one object type (#38544) - #60557

Merged
meta-codesync[bot] merged 1 commit into
mainfrom
export-D136068580
Dec 4, 2026
Merged

meta-codesync[bot] merged 1 commit into
mainfrom
export-D136068580

Conversation

@SamChou19815

Copy link
Copy Markdown
Member

Summary:

Summary

TouchedViewDataAtPoint intersects two exact object types that have
different properties: {pointerY, touchedViewTag?, frame, closestPublicInstance?} & InspectorData. No object is an instance of
both, so the intersection can't be satisfied, and Flow's
experimental.normalize_intersections option reports it
(invalid-exact: property frame is missing in exact object
InspectorData).

This writes the type as one object that spreads InspectorData, with
the same properties. Type-only change.

How did you test this change?

  • Flow 0.317.0 on the generated fabric config (what yarn flow fabric
    runs): 0 errors before and after.
  • prettier --check and eslint on the file: clean.
  • The same change in React Native's copy
    (packages/react-native/Libraries/Renderer/shims/ReactNativeTypes.js),
    checked with Flow 0.343: no new errors or warnings, and with
    experimental.normalize_intersections=true the invalid-exact error is
    gone.

DiffTrain build for 65cb72f3257a847b44b8f318f9d81b275681f294

Reviewed By: panagosg7

Differential Revision: D136068580

Summary:
## Summary

`TouchedViewDataAtPoint` intersects two exact object types that have
different properties: `{pointerY, touchedViewTag?, frame,
closestPublicInstance?} & InspectorData`. No object is an instance of
both, so the intersection can't be satisfied, and Flow's
`experimental.normalize_intersections` option reports it
(`invalid-exact`: property `frame` is missing in exact object
`InspectorData`).

This writes the type as one object that spreads `InspectorData`, with
the same properties. Type-only change.

## How did you test this change?

- Flow 0.317.0 on the generated `fabric` config (what `yarn flow fabric`
runs): 0 errors before and after.
- `prettier --check` and `eslint` on the file: clean.
- The same change in React Native's copy
(`packages/react-native/Libraries/Renderer/shims/ReactNativeTypes.js`),
checked with Flow 0.343: no new errors or warnings, and with
`experimental.normalize_intersections=true` the `invalid-exact` error is
gone.

DiffTrain build for [65cb72f3257a847b44b8f318f9d81b275681f294](react/react@65cb72f)

Reviewed By: panagosg7

Differential Revision: D136068580
@meta-codesync

meta-codesync Bot commented Dec 4, 2026

Copy link
Copy Markdown

@SamChou19815 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D136068580.

@meta-codesync
meta-codesync Bot merged commit 1b5f3b5 into main Dec 4, 2026
92 of 95 checks passed
@react-native-bot

Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @SamChou19815 in 1b5f3b5

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Dec 4, 2026
@SamChou19815
SamChou19815 deleted the export-D136068580 branch December 4, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged This PR has been merged. meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants