The Philosophy of TypeScript Enums
I'm a pretty big fan of TypeScript, probably best described as a statically typed language that transpiles to standard JavaScript. I've written about it before.
People who have worked with me in the past may be surprised at my admiration, given the rancour I occasionally direct at something like the Google Web Toolkit (GWT), a Java-to-JavaScript transpiler, which to the casual eye seems to be in a similar vein.
The similarities, however, are superficial; TypeScript and GWT are quite different beasts. Something like GWT is used in web development in order to avoid writing JavaScript. TypeScript, on the other hand, is best viewed as JavaScript extended with an optional static typing system. The optional part is key; in theory, any JavaScript program is also a valid TypeScript program. In other words, TypeScript doesn't try to hide the fact that it's merely an enhanced version of JavaScript.