Skip to content

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'.

@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
@lukeed
Copy link
Owner

lukeed commented Apr 23, 2024

Included in 2.1.1

@Sawsqr68
Copy link

<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