Package com.google.javascript.jscomp
Class InjectTranspilationRuntimeLibraries
java.lang.Object
com.google.javascript.jscomp.InjectTranspilationRuntimeLibraries
- All Implemented Interfaces:
CompilerPass
Injects JS library code that may be needed by the transpiled form of the input source code.
The intention here is to add anything that could be needed and rely on RemoveUnusedCode to remove the parts that don't end up getting used. This pass should run before
type checking so the type checking code can add type information to the injected JavaScript for
checking and optimization purposes.
TODO(b/120486392): consider merging this pass with InjectRuntimeLibraries and RewritePolyfills.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
InjectTranspilationRuntimeLibraries
-
-
Method Details
-
process
Description copied from interface:CompilerPassProcess the JS with root node root. Can modify the contents of each Node tree- Specified by:
processin interfaceCompilerPass- Parameters:
externs- Top of external JS treeroot- Top of JS tree
-