this post was submitted on 10 Oct 2023
7 points (88.9% liked)
TypeScript
820 readers
1 users here now
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
To add, turning everything into an enum can make the code nearly unreadable and hard to work with. This isn't Rust, and there's no performance gain for using enums over string unions.