Re:Node.js adds experimental support for TypeScript
by shepherdjerred on Thursday July 25, 2024 @01:01AM
(#41064874)
100% agree. Coming from Java I really wanted an Enum type, but string literals/discriminated unions fill that niche just fine.
Enums are one of the very few things in typescript that seem to not have turned out that well, but it's relatively easy to work without them with string-literable types and such, derived from some const in case they're also needed at runtime.