Which doesn't support const enum correctly and god knows what else without erroring.
Also TS enums are flawed: https://blog.logrocket.com/why-typescript-enums-suck/
> Enums in TypeScript are a very useful addition to the JavaScript language when used properly.
So, just like any language feature.
I like Typescript enums generally, my only complaint is that they are kept in the final build as big objects, especially in the scenario where you don't enumerate them. I use a replace function with terser to replace them with inlined constants to make my fine build smaller.
That’s because its main job is not transpiling to JS, but as a compiler it actually checks the correctness of the code, which is probably the main reason typescript exists in the first place.
You can actually run tsc without emitting JS at all in particular configurations.