variant icon indicating copy to clipboard operation
variant copied to clipboard

Re-explore scoped variants

Open paarthenon opened this issue 2 years ago • 1 comments

Scoped variants, while functional, were created before TS had template literal types. Now that we live in that world, there are most likely better ways to implement scoped variants and more powerful functionality we can include. Perhaps better support for arbitrary separators.

There's also a conversation to be had on what would make the best separators. Some candidates would be

  • ., probably my current favorite. It's clear and concise, but because it's so commonly used to scope things people may already be in the habit of using foo.bar.baz as a key. That would break the functionality intended to separate variant scopes, so another separator might be preferred.
  • ::, classic from C++ and more.
  • | I personally enjoy the aesthetic but more commonly used to pipeline.
  • -
  • /

paarthenon avatar Jul 15 '22 01:07 paarthenon