Skip to content

Change TouchedViewDataAtPoint type in ReactNativeTypes to use supported by Flow tooling syntax #32382

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

coado
Copy link
Contributor

@coado coado commented Feb 14, 2025

Summary

The flow-api-translator from the hermes repo does not support flow type spreads. It is currently not able to digest the ReactNativeTypes file as it contains unsupported syntax. The simplest solution is to change the type of the TouchedViewDataAtPoint to equivalent, yet supported by the Flow tooling. In this case the intersection can be used as
the TouchedViewDataAtPoint and InspectorData have no common property.

How did you test this change?

Run yarn flow native

@react-sizebot
Copy link

Comparing: a53da6a...bcb10b7

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 515.71 kB 515.71 kB = 92.09 kB 92.09 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 562.25 kB 562.25 kB = 100.08 kB 100.08 kB
facebook-www/ReactDOM-prod.classic.js = 636.70 kB 636.70 kB = 112.08 kB 112.08 kB
facebook-www/ReactDOM-prod.modern.js = 627.02 kB 627.02 kB = 110.49 kB 110.49 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
react-native/shims/ReactNativeTypes.js +0.25% 8.55 kB 8.57 kB +0.62% 2.27 kB 2.28 kB

Generated by 🚫 dangerJS against 2b9afae

@hoxyq hoxyq merged commit e670e72 into facebook:main Feb 14, 2025
192 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 14, 2025
…ed by Flow tooling syntax (#32382)

## Summary

The `flow-api-translator` from the `hermes` repo does not support flow
type spreads. It is currently not able to digest the ReactNativeTypes
file as it contains unsupported syntax. The simplest solution is to
change the type of the `TouchedViewDataAtPoint` to equivalent, yet
supported by the Flow tooling. In this case the intersection can be used
as
the `TouchedViewDataAtPoint` and `InspectorData` have no common
property.

## How did you test this change?

Run yarn flow native

DiffTrain build for [e670e72](e670e72)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants