variant
variant copied to clipboard
Re-explore scoped variants
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 usingfoo.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. -
-
-
/