Re:From Rust to TypeScript
by Jasper_ on Saturday September 12, 2020 @02:16PM
(#24454273)
const enum doesn't work when in transpileOnly mode (e.g. webpack, Parcel), and Babel treats "const enum" the same as "enum". I'd really love a non-broken const enum in TypeScript, though.
[ Parent
| on HN ]
I'd love to see them out of the language. I do not have evidence/document supporting this, but I think it was ultimately a failed attempt of copying the C# feature ignoring the fact that JavaScript works differently.