Class BaseTranspiler

java.lang.Object
com.google.javascript.jscomp.transpile.BaseTranspiler
All Implemented Interfaces:
Transpiler

public final class BaseTranspiler extends Object implements Transpiler
Basic Transpiler implementation for outputting ES5 code.
  • Field Details

    • LATEST_TRANSPILER

      public static final BaseTranspiler LATEST_TRANSPILER
    • ES5_TRANSPILER

      public static final BaseTranspiler ES5_TRANSPILER
  • Constructor Details

  • Method Details

    • transpile

      public TranspileResult transpile(URI path, String code)
      Description copied from interface: Transpiler
      Transforms the given chunk of code. The input should be an entire file worth of code.
      Specified by:
      transpile in interface Transpiler
    • runtime

      public String runtime()
      Description copied from interface: Transpiler
      Returns any necessary runtime code as a string. This should include everything that could possibly be required at runtime, regardless of whether it's actually used by any of the code that will be transpiled.
      Specified by:
      runtime in interface Transpiler
    • to

      public static final BaseTranspiler to(FeatureSet featureSet, String runtime)
    • to

      public static final BaseTranspiler to(FeatureSet featureSet)