4 ms·
Feels hacky as hell, with the string literal in there.
by throw156754228 2y ago
Feels hacky as hell, with the string literal in there.
- IshKebab 2y agoThe string literal doesn't exist at runtime.
- throw156754228 2y agoI know. I'm talking about its lack of elegance.
- IshKebab 2y agoStrings literals are proper singleton types in Typescript. It's not inelegant at all.
- recursive 2y agoYou could use a unique symbol as well.