Hacker News new | ask | show | jobs
by rezonant 1608 days ago
While I agree with the general sentiment, there's a bit of pedantry for you here: Typescript itself removes all the type information when you compile, it's not about the developer doing that themselves outside the context of the compiler. But that is a moot point with regard to the suitability of the features as the article itself suggests-- TS doesn't break your enums during compilation, a suitable JS representation is emitted.

Occasionally I think I might want to use enums in a place but then find that other solutions like const collection objects or plain constants works fine enough for the purpose at hand. I don't think it's a problem if folks use enums though, it's really not a big deal.