The big M just announced TypeScript… it is defined as a superset of JavaScript that compiles JS.
Here is the great thing: JS allow to write everything you want, but at the same time you have no control and no easy debug, this kid allows you to use a real languarge in a real development environment and then, compiled, you have 100% pure JS…
Here is a fast video introduction from one of the creators, enjoy: http://www.typescriptlang.org/
…almost forgot: you can clearly import all you existing JS code and that will be compiled with no problem… gotta try this!