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

Tweak hasDefinedValue typing #121

Merged
merged 1 commit into from
May 9, 2023

Conversation

pedr0fontoura
Copy link
Contributor

This PR improves the typing of the hasDefinedValue helper, narrowing the facet value type if it has a defined value.

Without this change, the type of the facet value after unwrapping is a union that includes typeof NO_VALUE, which is not assignable to ReactNode.

Code_z2IIDDJfAr

Copy link
Contributor

@vb vb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @pedr0fontoura! 💯

@vb vb merged commit ef76953 into Mojang:main May 9, 2023
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.

2 participants