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: allow bigint in typings #96

Merged
merged 1 commit into from Apr 23, 2024
Merged

fix: allow bigint in typings #96

merged 1 commit into from Apr 23, 2024

Conversation

ViliamKopecky
Copy link
Contributor

ReactNode from @types/react now includes bigint (and its 0n zero which is falsy) and that is incompatible with clsx in these scenarios:

declare const x: ReactNode

const className = clsx(x && 'some-class')
// Argument of type 'false | "" | 0 | 0n | "some-class" | null | undefined' is not assignable to parameter of type 'ClassValue'.
//  Type '0n' is not assignable to type 'ClassValue'.

@Netail
Copy link

Netail commented Apr 17, 2024

@lukeed :)

@lukeed
Copy link
Owner

lukeed commented Apr 18, 2024

Thanks! I’ll merge and publish tomorrow. Traveling for work right now & haven’t had a chance to open laptop

@lukeed lukeed merged commit 3d960ab into lukeed:master Apr 23, 2024
6 checks passed
@lukeed
Copy link
Owner

lukeed commented Apr 23, 2024

Included in 2.1.1

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.

None yet

3 participants