paarthenon / variant

Variant types in TypeScript
https://paarthenon.github.io/variant
Mozilla Public License 2.0
184 stars 3 forks source link

Expand documentation for the catalog function with integration examples #40

Open paarthenon opened 2 years ago

paarthenon commented 2 years ago

The catalog function is documented, but only its behavior. Ideally it should also show:

  1. How to use a pre-existing catalog as the basis for a variant's keys. This can be done manually, and likely also with the augment() function.
  2. Why TS's enum implementation is sort of problematic. It's ostensibly opaque, but that opaqueness can be leaky in a way that makes working with string literals the more honest way to go about things.