-
Notifications
You must be signed in to change notification settings - Fork 47k
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
[compiler] Special-case phi inference for mixed readonly type #30797
Merged
josephsavona
merged 3 commits into
gh/josephsavona/45/base
from
gh/josephsavona/45/head
Aug 23, 2024
Merged
[compiler] Special-case phi inference for mixed readonly type #30797
josephsavona
merged 3 commits into
gh/josephsavona/45/base
from
gh/josephsavona/45/head
Aug 23, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This allows us to handle common operations such as `useFragment(...).edges.nodes ?? []` where we have a `Phi(MixedReadonly, Array)`. The underlying pattern remains general-purpose and not Relay-specific, and any API that returns transitively "mixed" data (primitives, arrays, plain objects) can benefit from the same type refinement. [ghstack-poisoned]
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This was referenced Aug 22, 2024
josephsavona
added a commit
that referenced
this pull request
Aug 23, 2024
This allows us to handle common operations such as `useFragment(...).edges.nodes ?? []` where we have a `Phi(MixedReadonly, Array)`. The underlying pattern remains general-purpose and not Relay-specific, and any API that returns transitively "mixed" data (primitives, arrays, plain objects) can benefit from the same type refinement. ghstack-source-id: d99442d5c5bb4d1a2b7b5e0269c2d6fad0ed0c74 Pull Request resolved: #30797
facebook-github-bot
added
the
React Core Team
Opened by a member of the React Core Team
label
Aug 23, 2024
…ype" This allows us to handle common operations such as `useFragment(...).edges.nodes ?? []` where we have a `Phi(MixedReadonly, Array)`. The underlying pattern remains general-purpose and not Relay-specific, and any API that returns transitively "mixed" data (primitives, arrays, plain objects) can benefit from the same type refinement. [ghstack-poisoned]
josephsavona
added a commit
that referenced
this pull request
Aug 23, 2024
This allows us to handle common operations such as `useFragment(...).edges.nodes ?? []` where we have a `Phi(MixedReadonly, Array)`. The underlying pattern remains general-purpose and not Relay-specific, and any API that returns transitively "mixed" data (primitives, arrays, plain objects) can benefit from the same type refinement. ghstack-source-id: 27c9465ca6648c7b8ac7f08f81ba38b91c22bc97 Pull Request resolved: #30797
…ype" This allows us to handle common operations such as `useFragment(...).edges.nodes ?? []` where we have a `Phi(MixedReadonly, Array)`. The underlying pattern remains general-purpose and not Relay-specific, and any API that returns transitively "mixed" data (primitives, arrays, plain objects) can benefit from the same type refinement. [ghstack-poisoned]
josephsavona
added a commit
that referenced
this pull request
Aug 23, 2024
This allows us to handle common operations such as `useFragment(...).edges.nodes ?? []` where we have a `Phi(MixedReadonly, Array)`. The underlying pattern remains general-purpose and not Relay-specific, and any API that returns transitively "mixed" data (primitives, arrays, plain objects) can benefit from the same type refinement. ghstack-source-id: 51283108942002a14d032613a9d0b8b665ee3a94 Pull Request resolved: #30797
gsathya
approved these changes
Aug 23, 2024
josephsavona
added a commit
that referenced
this pull request
Aug 23, 2024
This allows us to handle common operations such as `useFragment(...).edges.nodes ?? []` where we have a `Phi(MixedReadonly, Array)`. The underlying pattern remains general-purpose and not Relay-specific, and any API that returns transitively "mixed" data (primitives, arrays, plain objects) can benefit from the same type refinement. ghstack-source-id: 51283108942002a14d032613a9d0b8b665ee3a94 Pull Request resolved: #30797
This was referenced Aug 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
This allows us to handle common operations such as
useFragment(...).edges.nodes ?? []
where we have aPhi(MixedReadonly, Array)
. The underlying pattern remains general-purpose and not Relay-specific, and any API that returns transitively "mixed" data (primitives, arrays, plain objects) can benefit from the same type refinement.