Andrey (azangru) wrote,
Andrey
azangru



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?
Subscribe

  • (no subject)

    A conversation with Justin Fagnani about what's coming for LitHTML and LitElement. New directives seem reasonable. "Controllers" for reusable chunks…

  • (no subject)

    I have only recently become aware of the audience engagement techniques that twitch streamers are using. They would create automatic overlays that…

  • (no subject)

    From an article on Lenin's medical history: Of the three [Lenin's siblings] who survived past young adulthood, a sister died of a stroke at age 71,…

  • Post a new comment

    Error

    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.
  • 0 comments