Andrey (azangru) wrote,

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?

  • (no subject)

    This is actually funny, and not aggressively partisan or moralistic:

  • (no subject)

    Someone from JetBrains listing five soft skills: "Number one, communication. Number two, empathy. Number three, respect. Number four, integrity. And…

  • (no subject)

    On the scale of holy fucking shit, it's probably right up there next to Australia. Assuming it's true, of course. That second tweet about male…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.