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

types: make ThemeExtract not infer booleans as objects #7

Merged
merged 3 commits into from
Sep 16, 2024

Conversation

ericrav
Copy link
Owner

@ericrav ericrav commented Sep 16, 2024

incorrect types are returned for themes that use a boolean as a value — booleans in JS have a valueOf property, so the conditional type was seeing the boolean as an object type instead of a primitive.

The solution is to check that the theme object value also extends object which excludes all primitive types

@ericrav ericrav merged commit cdf2e28 into main Sep 16, 2024
1 check passed
@ericrav ericrav deleted the type-fix-for-booleans branch September 16, 2024 18:24
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