Class LateEs6ToEs3Converter

  • All Implemented Interfaces:
    CompilerPass, NodeTraversal.Callback

    public final class LateEs6ToEs3Converter
    extends java.lang.Object
    implements NodeTraversal.Callback, CompilerPass
    Converts ES6 code to valid ES5 code. This class does most of the transpilation, and https://github.com/google/closure-compiler/wiki/ECMAScript6 lists which ES6 features are supported. Other classes that start with "Es6" do other parts of the transpilation.

    In most cases, the output is valid as ES3 (hence the class name) but in some cases, if the output language is set to ES5, we rely on ES5 features such as getters, setters, and Object.defineProperties.