Skip to content

fix: allow bigint in typings#96

Merged
lukeed merged 1 commit into
lukeed:masterfrom
ViliamKopecky:master
Apr 23, 2024
Merged

fix: allow bigint in typings#96
lukeed merged 1 commit into
lukeed:masterfrom
ViliamKopecky:master

Conversation

@ViliamKopecky

Copy link
Copy Markdown
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'.

@lukeed

lukeed commented Apr 18, 2024

Copy link
Copy Markdown
Owner

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
@lukeed

lukeed commented Apr 23, 2024

Copy link
Copy Markdown
Owner

Included in 2.1.1

@Sawsqr68

Copy link
Copy Markdown

<span class:list={[ 'hello goodbye', { world: true }, [ 'friend' ] ]} />

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.

3 participants