Rewrite clsx in TypeScript, but
- No default export
- No lite version
ni ts-clsx
import { clsx } from 'ts-clsx'
clsx('foo', [1 && 'bar', { baz: false, bat: null }, ['hello', ['world']]], 'cya')
// => 'foo bar hello world cya'
- VS Code + Tailwind Intellisense Extension
- Add the following to your
settings.json
{
"tailwindCSS.experimental.classRegex": [
["clsx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
]
}