Skip to content
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

fix record type with branded keys #3810

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

netanelgilad
Copy link

A fix for record types with branded keys being inferred as Partials.
Should fix the case described in #2069

From what I understood the ternary in RecordType verifies that the key is not a literal or an enum, by checking that any string / number / symbol is assignable to K and so it's not a literal.
I extended the ternary to take into account the cases where K is branded, and for that I introduced AnyBrand that will allow me to test for any string / number / symbol with any brand is assignable to K.

Copy link

netlify bot commented Oct 19, 2024

Deploy Preview for guileless-rolypoly-866f8a ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 7cd9b44
🔍 Latest deploy log https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/6713a8c70f4d8b00087a487e
😎 Deploy Preview https://deploy-preview-3810--guileless-rolypoly-866f8a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant