I've just started skimming through this book and it looks like it will be a great resource for the Closure Compiler team as we continue to improve support for ES6 in the Closure Compiler (
https://developers.google.com/closure/compiler/) and encourage more teams inside and outside of Google to use ES6 features in their projects. I look forward to delving into it further.
I just wanted to ask if you had looked at the Closure Compiler's support for ES6 transpilation and typechecking. For transpilation, the command line flags --language_in=ES6_STRICT and --language_out=ES5 are used. We support most of the new language features in ES6 including classes, modules, arrow functions, let/const, generators, rest/spread, for/of, and template strings, and we convert all of those to valid ES5 code (in most cases, valid ES3 code).
To get good typechecking with the Closure Compiler, we recommend you put type information into JSDoc comments (as described in detail at
https://developers.google.com/closure/compiler/docs/js-for-compiler). Since the type annotations are in comments, your code is completely valid JavaScript and no transpilation step is required to run it (unless you're using ES6 features and need to run on a browser that doesn't support them) but you still get high-quality warnings, and type-based optimizations.
Thanks!