A recent blog post explored how TypeScript enums work. In this blog post, we take a look at alternatives to enums. Unions of singleton values # An alternative to creating an enum that maps keys to values, is to create a union of singleton types (one per value). Read on to see how that works. Unions of string literal types # Let’s start with an enum and convert it to a union of string literal typ