Skip to content

[Lexical]Refactor: Change UnionToIntersection flow type - #7643

Merged
lilshady merged 1 commit into
mainfrom
yunclu/fix_flow
Jun 24, 2025
Merged

lilshady merged 1 commit into
mainfrom
yunclu/fix_flow

Conversation

@lilshady

@lilshady lilshady commented Jun 24, 2025 •

Copy link
Copy Markdown
Contributor

Description

The any type in UnionToIntersection caused a flow error at meta internally.

In Flow, mixed is the preferred top type (similar to TypeScript's unknown), while any is less type-safe.

The any in (x: infer R) => any is kept unchanged because it's only used for the return type of the function type pattern, and we're only interested in extracting the parameter type R.

Test plan

existing tests

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 24, 2025
@vercel

vercel Bot commented Jun 24, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 24, 2025 3:10am
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 24, 2025 3:10am

@lilshady lilshady added extended-tests Run extended e2e tests on a PR and removed CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. labels Jun 24, 2025
@lilshady
lilshady added this pull request to the merge queue Jun 24, 2025
Merged via the queue into main with commit fd22bc2 Jun 24, 2025
@lilshady
lilshady deleted the yunclu/fix_flow branch June 24, 2025 03:38
@etrepum etrepum mentioned this pull request Jul 3, 2025

This branch was successfully deployed

2 active deployments
Preview – lexical-playground — 03313ae0 Deployed Jun 24, 2025 by vercel[bot]
Preview – lexical — 03313ae0 Deployed Jun 24, 2025 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extended-tests Run extended e2e tests on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants