O'Reilly logo

Mastering JavaScript Design Patterns by Simon Timms

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Traceur

An alternative to TypeScript is to use the Traceur compiler. This is a project sponsored by Google to compile ES6 to equivalent ES5 JavaScript. A lot of the changes put in place for ES6 are syntactic niceties so they can actually be represented in ES5 JavaScript, although not as succinctly or as pleasantly. We've seen that already with using class-like structures in ES5. Traceur is written in JavaScript which means that the compilation from ES6 to ES5 is possible directly on a web page. Of course, as seems to be the trend with compilers, the source code for Traceur makes use of ES6 constructs, so Traceur must be used to compile Traceur.

At the time of writing, the list of ES6 functions that are supported by Traceur is extensive:

  • Arrow functions ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required