DEV Community

Discussion on: Refactoring: My 6 favorite patterns

Collapse
 
lexlohr profile image
Alex Lohr

For #4, TypeScript has enums, which are a lightweight and legible alternative to let a class do the heavy lifting.