TypeScript’s have Enums, which is a great language feature. However when you’re writing libraries and exposing functions that try and require Enums it can make for a bad user experience.
Instead you should use regular ol’ JavaScript objects - but super charged with TypeScript!
#typescript #enums