December 26th, 2020

(no subject)



I strongly prefer string unions over enums. Perhaps because my first type system was Flow.

One argument against regular enums in typescript is that they transpile into an unholy mess. On the other hand, this has been fixed with the "const enum" syntax. But then, why even go there if string unions work just as well?