Deriving enums from objects with TypeScript
TypeScript enums have some issues
https://react-typescript-cheatsheet.netlify.app/docs/basic/troubleshooting/types/#enum-types
Often a string union is sufficient
To simplify code, we can derive type unions from objects!
https://youtu.be/6M9aZzm-kEc?t...
fullchee.hashnode.dev1 min read