lukeed/clsxPublic

A tiny (239B) utility for constructing `className` strings conditionally.

Lite Version: Improve Typescript Definition and Support for "moduleResolution": "Node" #94

Closeddroid51closed 2 commits intomasterfromrefs/pull/94/head
  1. DR

    Hey there, thanks for this important module!

    - I added two more Typescript Definitions for Lite Version (only removed ClassDictionary and ClassArray) - I added typesVersions inside package.json to support older moduleResolution at tsconfig.json

    see: https://github.com/lukeed/clsx/issues/92 https://github.com/lukeed/clsx/issues/90 https://github.com/lukeed/clsx/issues/89

    thanks!

    Grettings crazyx13th

  2. BR

    This looks great - could we please look at getting this merged?

  3. AW

    The behavior of the lite version when given a number argument is different from that of the full-featured version: it ignores all number values including the truthy ones. That is why I think `number` should not be included in the lite version's `ClassValue` type.

  4. AW

    On second thoughts, not including it could break code like `clsx(someArray.length && 'someClass')`.

    If the decision is to keep it, then `bigint` should also be included like it is already for the full-featured version.

  5. droid51closedlast year on GitHub