Package com.google.javascript.jscomp.ijs
Class ConvertToTypedInterface
- java.lang.Object
-
- com.google.javascript.jscomp.ijs.ConvertToTypedInterface
-
- All Implemented Interfaces:
CompilerPass
public class ConvertToTypedInterface extends java.lang.Object implements CompilerPass
The goal of this pass is to shrink the AST, preserving only typing, not behavior.To do this, it does things like removing function/method bodies, rvalues that are not needed, expressions that are not declarations, etc.
This is conceptually similar to the ijar tool[1] that bazel uses to shrink jars into minimal versions that can be used equivalently for compilation of downstream dependencies. [1] https://github.com/bazelbuild/bazel/blob/master/third_party/ijar/README.txt
-
-
Constructor Summary
Constructors Constructor Description ConvertToTypedInterface(AbstractCompiler compiler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
process(Node externs, Node root)
Process the JS with root node root.
-
-
-
Constructor Detail
-
ConvertToTypedInterface
public ConvertToTypedInterface(AbstractCompiler compiler)
-
-
Method Detail
-
process
public void process(Node externs, Node root)
Description copied from interface:CompilerPass
Process the JS with root node root. Can modify the contents of each Node tree- Specified by:
process
in interfaceCompilerPass
- Parameters:
externs
- Top of external JS treeroot
- Top of JS tree
-
-