Interface CompilerOptions.AliasTransformation

Enclosing class:
CompilerOptions

public static interface CompilerOptions.AliasTransformation
A Role Specific Interface for the JS Compiler to report aliases used to change the code during a compile.

While aliases defined by goog.scope are expected to by only 1 per file, and the only top-level structure in the file, this is not enforced.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addAlias(String alias, String definition)
    Adds an alias definition to the AliasTransformation instance.
  • Method Details

    • addAlias

      void addAlias(String alias, String definition)
      Adds an alias definition to the AliasTransformation instance.

      Last definition for a given alias is kept if an alias is inserted multiple times (since this is generally the behavior in JavaScript code).

      Parameters:
      alias - the name of the alias.
      definition - the definition of the alias.