All Classes and Interfaces

Class
Description
Implementations of AbstractCommandLineRunner translate flags into Java API calls on the Compiler.
Configurations for the command line configs.
Set of options that can be used with the --formatting flag.
A pair from flag to its value.
Represents a specification for a serving chunk.
Representation of a source file from an encoded json stream input
Flag types for JavaScript source files.
An abstract compiler, to help remove the circular dependency of passes on JSCompiler.
What point in optimizations we're in.
Abstract message formatter providing default behavior for implementations of MessageFormatter needing a SourceExcerptProvider.
Scope contains information about a variable scope in JavaScript.
Used by Scope to store information about variables.
Helper functions for computing the visibility of names and properties in JavaScript source code.
A minimal graph interface.
An extension of WarningsGuard that provides functionality to maintain a list of warnings (allowlist).
All type, representing all values.
Renames unrelated properties to the same name, using Colors provided by the typechecker.
Object that has an annotation.
Information that can be annotated to a GraphNode or Graph.GraphEdge.
An error manager that pipes warnings and errors properly into the Ant task infrastructure.
Class that applies suggested fixes to code or files.
 
 
 
Logic for answering questions about portions of the AST.
Utilities to abstract away certain common AST manipulations
This class walks the AST and validates that the structure is correct.
Violation handler
Represents an await expression.
A utility class for working with Base64 values.
We encode our variable length numbers as base64 encoded strings with the least significant digit coming first.
A simple interface for advancing through a sequence of characters, that communicates that advance back to the source.
Basic Transpiler implementation for outputting ES5 code.
The source together with the additional compilation results.
Wraps the Compiler into a more relevant interface, making it easy to test the Transpiler without depending on implementation details of the Compiler itself.
Deprecated.
BigInt type.
 
Represents a variable bound by an import or export statement, or goog.require.
An ErrorManager that silently swallows all messages.
 
A set in the domain {true,false}.
Boolean type.
Instrument branch coverage for javascript.
 
Resolution algorithm for Browsers.
Limited superset of the BrowserModuleResolver that allows for replacing some path prefixes before resolving.
An implementation of a WarningsGuard that can modify the CheckLevel based on the file that caused the warning, and whether this file matches a set of paths (specified either as include or exclude of path name parts).
A Transformer that caches output from a delegate transformer.
A transpiler implementation that delegates to a lower-level implementation on a cache miss.
 
Implements the ECMAScript 5 Canonicalize operation used to specify how case-insensitive regular expressions match.
 
 
Chainable reverse abstract interpreter providing basic functionality.
A Class to assist in AST change tracking verification.
Lints against passing arrays to goog.object methods with the intention of iterating over them as though with a for-in loop, which is discouraged with arrays.
Provides a framework for checking code against a set of user configured conformance rules.
 
A condition that must be true for a rule to possibly match a node.
 
This pass looks for module-level variable declarations that use CONSTANT_CASE, according to the Google style guide, and verifies that they are also annotated @const or are in a const clause.
This pass looks for properties that are not modified and ensures they use the @const annotation.
Check for duplicate case labels in a switch statement Eg: switch (foo) { case 1: case 1: }
Check for empty statements (i.e.
Checks the following: Whether there are duplicate values in enums.
Checks the file structure of ES6 modules.
Miscellaneous checks for style in ES6 modules.
Walks the AST looking for usages of qualified names, and 'goog.require's of those names.
A PassConfig to only run the CheckExtraRequires linter rule.
Checks that goog.module statement matches the generated TypeScript module namespace, which is based on the file path.
Checks for errors related to interfaces.
Checks for various JSDoc-related style issues, such as function definitions without JsDoc, params with no corresponding @param annotation, coding conventions not being respected, etc.
Controls checking levels of certain options.
A pass to detect references to fully qualified Closure namespaces.
Check for statements that should end with a semicolon according to the Google style guide.
Checks if code has a module-level static property assignment (`X.Y`) inside a `goog.module`.
Checks that exports of ES6 modules are not mutated outside of module initialization.
Checks for missing or redundant nullability modifiers.
See constructor, CheckPathsBetweenNodes(DiGraph, DiGraphNode, DiGraphNode, Predicate, Predicate), for a description of this algorithm.
Check for explicit creation of the object equivalents of primitive types (e.g.
Checks when a mutable property is assigned to a prototype.
Checks that goog.provide statements are sorted and deduplicated, exposing the necessary information to produce a suggested fix.
Operation modes.
Checks that Closure import statements (goog.require, goog.requireType, and goog.forwardDeclare) are sorted and deduplicated, exposing the necessary information to produce a suggested fix.
Operation modes.
Checks for invalid code references to type-only imports (i.e., goog.requireType).
A warnings guard that demotes the errors found in type summary files to be less severe, leaving only the errors found in the original source.
Check for unused labels blocks.
This pass looks for properties that are never read.
Check for useless blocks.
Check for `var` (prefer `const` or `let`).
Coding convention used by the Chrome team to compile Chrome's JS.
Compiler pass for Chrome-specific needs.
 
A utility class to assist in creating JS bundle files.
Checks that goog.module() is used correctly.
This describes the Closure-specific JavaScript coding conventions.
Enum of primitive functions that the compiler recognizes
Common errors for Closure primitives that are reported in multiple passses.
A reverse abstract interpreter (RAI) for specific closure patterns such as goog.isObject.
A warnings guard that suppresses warnings that are spurious for code that is unaware of Closure compiler's requirements.
Abstracted consumer of the CodeGenerator output.
CodeGenerator generates codes from a parse tree, sending it to the specified CodeConsumer.
Information on the current context.
CodePrinter prints out JS code in either pretty format or compact format.
 
 
Specifies a format for code generation.
License Trackers are responsible for ensuring that any licensing information attached to nodes is retained in the final output of JSCompiler.
SourceAndMappings bundles together the source and generated SourceMap Mappings for that source.
Class that represents a set of changes to make to the code.
CodingConvention defines a set of hooks to customize the behavior of the Compiler for a specific team/company.
This stores a relation from either name or Closure Primitive to assertion function
A description of a JavaScript function that will throw an exception when either: One of its parameters does not match the return type of the function One of its parameters is falsy.
 
 
Bind class
Cache class
Delegates provides a mechanism and structure for identifying where classes can call out to optional code to augment their functionality.
An object literal cast provides a mechanism to cast object literals to other types without a warning.
Record subclass relations
Specify the kind of inheritance
Helper classes for dealing with coding conventions.
A convention that wraps another.
A simplified version of a Closure or TS type for use by optimizations
Builder for a singleton color.
A probablistically unique ID for a Color.
A set of Colors reconstructed from possibly many TypePool protos.
Collects TypePools and other data into ColorPool.ShardViews and then reconciles them into a single ColorPool.
A view of the pool based on one of the input shards.
Stores "out of band" information about the set of Colors in use by a compilation.
Builder
 
CommandLineRunner translates flags into Java API calls on the Compiler.
Set of options that can be used with the --formatting flag.
placeholder class
 
A CompilationLevel represents the level of optimization that should be applied when compiling JavaScript code.
Interface used by `AbstractCompilerRunner` to report metrics about the compilation action it performs.
Compiler (and the other classes in this package) does the following: parses JS code checks for undefined variables performs optimizations such as constant folding and constants inlining renames variables (to short names) outputs compact JavaScript code External variables are declared in 'externs' files.
An implementation of a license tracker to be used when licenses can be de-duped among Chunks (because licenses might be loaded by a chunk's transitive dependencies.
Stores a buffer of text to which more can be appended.
Serializable state of the compiler specific to multistage binary builds
Subclasses are responsible for loading sources that were not provided as explicit inputs to the compiler.
A license tracker implementation that emits all licenses attached to script nodes, regardless of if the content of that script is used anywhere in the compilation.
A license tracker implementation that only retains licenses for which there are useful nodes in a binary.
A source transformer base class.
The source together with the additional compilation results.
Wraps the Compiler into a more relevant interface, making it easy to test the CompilerBasedTransformer without depending on implementation details of the Compiler itself.
A class for the internal representation of an input to the compiler.
JavaScript module type.
A provider mapping a InputId to a CompilerInput.
Compiler options
A mode enum used to indicate the alias strings policy for the AliasStrings pass
A Role Specific Interface for the JS Compiler to report aliases used to change the code during a compile.
A Role Specific Interface for JS Compiler that represents a data holder object which is used to store goog.scope alias code changes to code made during a compile.
Format for compiler output when multiple chunks are requested.
When to do the extra validity checks
An environment specifies the built-in externs that are loaded for a given compilation.
How ES modules should be transformed.
Options to force transpile specific features for performance experiments.
 
 
An option to determine what level of code instrumentation is performed, if any
What kind of isolation is going to be used
A mode enum used to indicate whether J2clPass should be enabled, disabled, or enabled automatically if there is any J2cl source file (i.e.
A language mode applies to the whole compilation job.
What type of JS file should be output by this compilation
 
A common enum for compiler passes that can run either globally or locally.
How much tracing we want to do
Option for the ProcessTweaks pass
Checks for combinations of options that are incompatible, i.e.
Exception to indicate incompatible options in the CompilerOptions.
Interface for classes that can compile JS.
This class implements a simple Ant task to do almost the same as CommandLineRunner.
WarningsGuard that represents just a chain of other guards.
 
 
 
 
Represents a computed property in an object literal.
Tree for public comptuted property fields
 
 
 
Rewrites static inheritance to explicitly copy inherited properties from superclass to subclass so that the optimizer knows the subclass has those properties.
 
Configuration for the AST factory.
Builder for a Config.
Whether to parse the descriptions of JsDoc comments.
JavaScript mode
Whether to keep going after encountering a parse error.
Level of language strictness required for the input source code.
Creates or updates conformance allowlist/whitelist entries.
Runs only the user-supplied conformance checks and any earlier passes required by conformance.
Standard conformance rules.
A conformance rule implementation to support things common to all rules such as allowlisting and reporting.
Ban goog.dom.createDom and goog.dom.DomHelper#createDom with parameters specified in value in the format tagname.attribute, e.g.
Bans document.createElement and similar methods with string literal parameter specified in value, e.g.
Ban Element#setAttribute with attribute names specified in value or any dynamic string.
Ban Document#execCommand with command names specified in value or any dynamic string.
Banned for/of loops
Banned global var declarations.
Checks that file does not include an @enhance annotation for a banned namespace.
Checks that file does not include an @mods annotation for a banned namespace regex.
Banned non-literal arguments passed to goog.string.Const.from.
Banned dereferencing null or undefined types.
Can be used to ban any function like Element#setAttribute which takes two parameters, an attribute name and a value.
Checks that this is not being referenced directly within a static member function.
Banned throw of non-error object types.
Banned unknown type references of the form "this.prop" unless it is immediately cast, it is a @template type (until template type restricts are enabled) or the value is unused.
Banned unknown "this" types.
Banned unknown type references of the form "instance.prop" unless (a) it is immediately cast/asserted, or (b) it is a @template type (until template type restrictions are enabled), or (c) the value is unused, or (d) the source object type is unknown (to avoid error cascades)
Banned accessing properties from objects that are unresolved forward-declared type names.
Possible check check results
Classes extending AbstractRule must return ConformanceResult from their checkConformance implementation.
Require "use strict" rule
Checks nodes for conformance with banning the setting of attributes that are on the blocklist.
Ban any use of unresolved forward-declared types
 
This class computes a ControlFlowGraph for a given AST
Configures a ControlFlowAnalysis instance then computes the ControlFlowGraph
Control flow graph.
Abstract callback to visit a control flow graph node without going into subtrees of the node that are also represented by other control flow graph nodes.
The edge object for the control flow graph.
The goal of this pass is to shrink the AST, preserving only typing, not behavior.
Pass to convert JSType objects from TypeChecking that are attached to the AST into Color objects whose sole use is to enable running optimizations and delete all other references to JSTypes.
This code implements the instrumentation pass over the AST (returned by JSCompiler).
Configures which statements in the AST should be instrumented
A source transformer for instrmenting code for coverage data collection.
Supply options for coverage.
Move prototype methods into later chunks.
Collects global variable references for use by CrossChunkCodeMotion.
Interface used by ReplaceCssNames to substitute CSS class names.
ByPart renaming map
ByWhole renaming map
Kind of renaming map
Custom pass type.
An optimization pass that finds and removes dead property assignments within functions and classes.
 
 
Class for resolving Closure dependencies.
Contains information on default externs files.
A simple class for generating unique JavaScript variable/property names.
 
Pass factories and meta-data for native JSCompiler passes.
SourceFile containing dependency information.
A data structure for JS dependency information for a single .js file.
A dependency link between two files, e.g.
 
Utility methods.
Options for how to manage dependencies between input files.
Describes how the compiler should manage dependencies.
Interface for DependencyResolver to keep in line with DefaultDependencyResolver, which doesn't provide an interface.
A parser that can extract dependency information from existing deps.js files.
Generates deps.js files by scanning JavaScript files for calls to goog.provide(), goog.require() and goog.addDependency().
 
Represents a single target inside a destructuring pattern, whether another pattern or a lhs expression.
Group a set of related diagnostic types together, so that they can be toggled on and off as one unit.
A warnings guard that suppresses warnings for a particular diagnostic group for a file that contains the specified substring.
Named groups of DiagnosticTypes exposed by Compiler.
Sets the level for a particular DiagnosticGroup.
Used to print a map from diagnostic id to suppression.
The type of a compile or analysis error.
A generic directed graph.
A generic directed graph edge.
A generic directed graph node.
Assembles the various parts of the diambiguator to execute them as a compiler pass.
DotFormatter prints out a dot file of the Abstract Syntax Tree.
 
 
A do-nothing metrics recorder that `AbstractCompilerRunner` uses by default.
Represents a dynamic import expression.
An implementation of MessageBundle that has no translations.
 
The type of individual elements of an enum type (see EnumType).
An enum type representing a branded collection of elements.
Builder
Error formats available.
The error handler is any generic sink for warnings and errors, after they've passed through any filtering WarningsGuards.
The error manager is in charge of storing, organizing and displaying errors and warnings generated by the compiler.
A conduit for reporting errors and warnings to the user.
This is interface defines a protocol for the reporting of errors during JavaScript translation or execution.
Maps a JSError to a list of SuggestedFixes, if possible.
Checks that ES6 Modules are used correctly, and do not reference undefined keywords or features.
Converts super.method() calls and adds constructors to any classes that lack them.
Converts super() calls.
Extracts ES6 classes defined in function calls to local constants.
Converts ES6 "for of" loops to ES5.
Normalizes shorthand object properties.
Rewrites ES6 import paths to be relative after resolving according to the compiler's module resolver.
Renames variables declared in function bodies so they don't shadow any variable referenced in the param list.
Converts ES6 arrow functions to standard anonymous ES3 functions.
Rewrite "let"s and "const"s as "var"s.
Rewrite block-scoped function declarations as "let"s.
Converts ES6 classes to valid ES5 or ES3 code.
Extracts ES6 class extends expressions and creates an alias.
Rewrites destructuring patterns and default parameters to valid ES3 code or to a different form of destructuring.
Rewrites a ES6 module into a form that can be safely concatenated.
Rewrites an ES6 module to a CommonJS-like module for the sake of per-file transpilation + bunlding (e.g.
Converts REST parameters and SPREAD expressions.
Rewrites a script which was imported as a module into an ES6 module.
Splits variable declarations that declare multiple variables into separate declarations, if at least one of the declarations is a destructuring declaration.
Replaces the ES7 `**` and `**=` operators to calls to `Math.pow`.
Collects information related to and resolves ES imports and exports.
An exported name in a module.
 
 
Generates goog.exportSymbol for test functions, so they can be recognized by the test runner, even if the code is compiled.
 
Walks the AST looking for usages of qualified names, and 'goog.require's of those names.
Represents various aspects of language version and support.
Specific features that can be included in a FeatureSet.
Tree for public property fields
Represents a position in a source file.
 
Find and update any direct dependencies of an input.
A utility class for doing fixed-point computations.
Edge callback
An error manager that finds a SuggestedFix for all errors if possible.
An exception thrown when command-line flags are used incorrectly.
A symbol table for inferring types during data flow analysis.
Represents a for-await-of statement, which was added in ES2018
Warns at any usage of Dynamic Import expressions that they are unable to be transpiled.
 
 
 
 
 
 
A builder for the list representing FunctionType Parameters
This derived type provides extended information about a function, including its return type and argument types.
A builder class for function and arrow types.
Models a single JavaScript parameter.
Finds getter and setter properties in the AST.
Gathers metadata around modules that is useful for checking imports / requires and creates a ModuleMetadataMap.
Generates goog.exportSymbol/goog.exportProperty for the @export annotation.
 
Replaces goog.bind(..., this) with arrow functions.
Utilties for ES imports for Closure files, for example import array from 'goog:goog.array';.
This describes the Google-specific JavaScript coding conventions.
An JsMessage.IdGenerator designed to play nicely with Google's Translation systems.
The base generic class for graph-like data structure and algorithms in the compiler.
A generic edge.
Annotates the graph with a color in a way that no connected node will have the same color.
The color of a node
Greedily assign nodes with high degree unique colors.
A generic node.
Computes all the reachable nodes.
Represents a Source Node and an Edge.
A graph that can be dumped to a Graphviz DOT file.
A Graphviz edge.
A Graphviz node.
An immutable sorted map with efficient (persistent) updates.
Contains a JsMessage representing an ICU template message and information about the goog.i18n.messages.declareIcuTemplate() call from which it was extracted.
 
JS identifier parsing utilities.
A token representing an identifier.
Id generator used in CrossModuleMotion.
A utility class for generating and parsing id mappings held by ReplaceIdGenerators.
 
IJS-related errors occurring outside the ConvertToTypedInterface pass.
 
 
 
 
 
Warn about types in JSDoc that are implicitly nullable.
Represents the types of implicit nullability errors caught by this pass: a) implicitly nonnull (missing a "!"), and b) implicitly nullable (missing a "?").
Information to represent a single "implicit nullability result", including the JSDoc string node that needs a "!" or "?" to be explicit, as well as an enum indicating which of the two nullability cases were found ("!" or "?").
An imported name in a module.
 
Represents 'new.target'.
 
Injects JS library code that may be needed by the transpiled form of the input source code.
An id used uniquely identify a CompilerInput
Instruments await and yield for the AsyncContext polyfill.
Keeps track of "invalidating types" that force type-based optimizations to back off.
Builder
An AST construction helper class
 
 
An optimization pass to remove J2CL Asserts.$assert.
Performs correctness checks which are specific to J2CL-generated patterns.
An optimization pass to prune J2CL clinits.
An optimization pass for J2CL-generated code to hoist some constant assignments out clinit method to declaration phase so they could be used by other optimization passes for static evaluation.
An optimization pass to re-write J2CL Equality.$same.
A normalization pass to inline some J2CL calls to enable other optimizations.
This pass targets J2CL output.
A warnings guard that suppresses some warnings incompatible with J2CL.
A normalization pass to re-write Util.$getDefine calls to make them work in compiled mode.
A JavaScript chunk has a unique name, consists of a list of compiler inputs, and can depend on other chunks.
A JSChunk dependency graph that assigns a depth to each chunk and can answer depth-related queries about them.
Exception class for declaring when the chunks being fed into a JSChunkGraph as input aren't in dependence order, and so can't be processed for caching of various dependency-related queries.
Another exception class
Basic double functions used by JSComp.
Basic Object functions used by JSComp.
Basic String functions used by JSComp.
JSDoc information describing JavaScript code.
A builder for JSDocInfo objects.
Defines a class for containing the parsing information for this JSDocInfo.
A piece of information (found in a marker) which contains a position with a name node.
A piece of information (found in a marker) which contains a position with a string.
A piece of information (found in a marker) which contains a position with a type expression syntax tree.
Visibility categories.
A parser for JSDoc comments.
How to handle unexpected JSDoc format
Prints a JSDocInfo, used for preserving type annotations in ES6 transpilation.
Utilities for serializing and deserializing JSDoc necessary for optimzations.
This class implements the scanner for JsDoc strings.
Compile error description.
A parser that extracts dependency information from a .js file, including goog.require, goog.provide, goog.module, import/export statements, and JSDoc annotations related to dependency management.
The dependency information contained in a .js source file.
The module system declared by the file, e.g.
Interface for reporting errors.
Base class for classes that parse JavaScript sources on a line-by-line basis.
A parser that can extract dependency information from a .js file, including goog.require, goog.provide, goog.module, import statements, and export statements.
Utility class to hold isJSIdentifier.
A representation of a translatable message in JavaScript source code.
Contains functionality for creating JS messages.
ID generator
Represents part of a message.
Thrown when parsing a message string into parts fails because of a misformatted place holder.
A reference to a placeholder in a translatable message.
Represents a literal string part of a message.
Container class that holds a JsMessage and information about the goog.getMsg() call it was built from.
Extracts messages and message comments from JS code.
Locates JS code that is intended to declare localizable messages.
Represents the contents of a object literal Node in the AST.
An error report generator that prints error and warning data to the print stream as an array of JSON objects.
A Matcher that can take arbitrary JS source code and use it as a template to find matches in other source code.
Represents JavaScript value types.
A tristate value returned from canPropertyBeDefined.
Specifies how to express nullability of reference types in annotation strings and error messages.
In files translated from Java, we typecheck null and undefined loosely.
Represents a pair of types.
A type with source information.
When parsing a jsdoc, a type-annotation string is parsed to a type AST.
Constants corresponding to types that are built into a JavaScript engine and other types that occur very often in the type system.
The type registry is used to resolve named types.
A tristate value returned from canPropertyBeDefined.
A state machine for resolving all JSType instances.
The JavaScript keywords.
 
Converts ES6 code to valid ES5 code.
A lattice element.
A DependencyInfo class that determines load flags by parsing the AST just-in-time.
Annotation on methods that still call the deprecated `CompilerOptions.legacySetOutputFeatureSet` API.
Lightweight message formatter.
A directed graph using ArrayLists within nodes to store edge information.
A directed graph edge that stores the source and destination nodes at each edge.
A directed graph node that stores outgoing edges and incoming edges as an list within the node itself.
A deterministic drop-in replacement for IdentityHashMap.
A deterministic drop-in replacement for
invalid reference
Sets.newIdentityHashSet
.
An undirected graph using linked list within nodes to store edge information.
Tool for running just the lint checks which can be run on a single file at a time.
Builder for a Linter that allows some customization.
Minimal binary that just runs the "lint" checks which can be run on a single file at a time.
 
A token representing a javascript literal.
A simple interface for writing to a human readable log file.
An interface allowing streaming JSON to a LogFile via a JsonWriter
An error manager that logs errors and warnings using a logger in addition to collecting them in memory.
A Gson instance tailored to generating logs output.
A conversion to a preferred logging representation.
Implements a lowest common ancestor search algorithm.
An abstraction for LowestCommonAncestorFinder::new.
Emitted when deserialization sees a TypedAst with semantic errors.
Prints out a map from diagnostic id to suppression.
Object that contains the information for a given match.
Interface for a class that knows how to match a Node for a specific pattern.
Class that contains common Matchers that are useful to everyone.
 
 
An interface for providing alternative values for user-visible messages in JavaScript code.
Format warnings and errors.
 
 
 
Information for modules, particularly ES modules, that is useful for rewriting.
Builder for Module.
Basic information on an entry point module.
Provides compile-time locate semantics for ES6 and CommonJS modules.
Builder
An enum used to specify what algorithm to use to locate non path-based modules
Indicates whether to escape characters in paths.
An enum indicating whether to absolutize paths.
Standard path base resolution algorithms that are accepted as a command line flag.
A map containing information about all modules in the compilation.
Creates a ModuleMap.
Contains metadata around modules (or scripts) that is useful for checking imports / requires.
Struct containing basic information about a module/script including its type and goog namespaces.
Various types of Javascript modules and scripts that can be found in the JS Compiler.
Static methods related to module names.
Resolves requests for other modules.
Base class for algorithms that resolve JavaScript module references to input files.
Error message constants.
A NamedType is a named reference to some other type.
A class that generates unique JavaScript variable/property names.
 
Represents 'new.target'.
This class implements the root of the intermediate representation.
Iterator to go up the ancestor tree.
A helper class for getting and setting invocation side-effect flags.
Class that holds metadata (or meta objects) for use by JsFlume that aren't contained within the Node itself.
Resolution algorithm for NodeJS.
Factory for NodeModuleResolver.
NodeTraversal allows an iteration through the nodes in the parse tree, and facilitates the optimizations on the parse tree.
An traversal base class that tracks and caches the ControlFlowGraph (CFG) during the traversal.
Callback that fires on changed scopes.
Abstract callback that knows when a global script, goog.provide file, goog.module, goog.loadModule, ES module or CommonJS module is entered or exited.
Abstract callback to visit all nodes in postorder.
Abstract callback to visit all nodes in postorder.
Abstract callback to visit all nodes in preorder.
Abstract scoped callback to visit all nodes in postorder.
Abstract callback to visit all nodes but not traverse into function bodies.
Abstract callback to visit all structure and statement nodes but doesn't traverse into functions or expressions.
Builder
Callback for tree-based traversals
Abstract callback to visit all non-extern nodes in postorder.
Callback that also knows about scope changes
NodeUtil contains generally useful AST utilities.
Represents a goog.require'd namespace and property inside a module.
 
Interface for use with the visit method.
Builder interface for declaring properties on class-like (nominal) types.
Minimal class holding information about a nonJSDoc comment's source location and contents
The bottom Object type, representing the subclass of all objects.
An unresolved type that was forward declared.
Bottom type, representing the subclass of any value or object.
Represents a null parse tree element.
Null type.
Number type.
 
 
 
 
Object type.
Creates a OptChainCallExpressionTree that represents a call expression within an optional chain.
Creates a OptionalMemberExpressionTree that represents a getprop expression within an optional chain.
Creates a OptionalMemberExpressionTree that represents a getprop expression within an optional chain.
An enum for representing boolean outcomes.
An enum for representing truthiness and nullishness of outcomes.
 
Parses a javascript file.
 
 
parser runner
Holds results of parsing.
An abstract syntax tree for JavaScript parse trees.
The types of concrete parse trees.
Utility functions for parsing that don't depend on the compiler.
Pass factories and meta-data for native Compiler passes.
Different ways to split optimization passes.
An implementation of PassConfig that just proxies all its method calls into an inner class.
A factory for creating JSCompiler passes based on the Options injected.
A builder for a PassFactory.
This class exists to funnel the list of passes through a central mechanism to ensure that the PassFactory can define and enforce conditions that much be met in order for the pass they create to be added to the compilation process.
If the name of a pass is used in more than one place in the source, it's good to create a symbolic name here.
Utility methods for manipulation of UNIX-like paths.
A PerformanceTracker collects statistics about the runtime of each pass, and how much a pass impacts the size of the compiled output, before and after gzip.
A Stats object contains statistics about a pass run, such as running time, size changes, etc
A minimal interface for null-hostile, persistent immutable maps.
The set of all non-keyword, non-reserved words used in javascript.
Deprecated.
, Please use the {#SortingErrorManger} with a {#PrintStreamErrorReportGenerator} instead.
An error report generator that prints errors and warnings to the print stream provided.
Rewrites a CommonJS module http://wiki.commonjs.org/wiki/Modules/1.1.1 into a form that can be safely concatenated.
 
A property slot of an object.
A property instance associated with particular owner type.
 
Policies to determine how properties should be renamed.
The object type represents instances of JavaScript objects such as Object, Date, Function.
An object type which uses composition to delegate all calls.
Abstraction over a qualified name.
A class for generating unique, randomized JavaScript variable/property names.
A record (structural) type.
A builder for record types.
Primary driver of a refactoring.
 
Utility methods for refactoring Java code.
Represents a single declaration or reference to a variable.
A collection of references.
A helper class for passes that want to access all information about where a variable is referenced and declared at once and then make a decision as to how it should be handled, possibly inlining, reordering, or generating warnings.
Way for callers to add specific behavior during traversal that utilizes the built-up reference information.
Maps Vars to their references.
An AST for JavaScript regular expressions.
Represents the possibilities ["foo", "bar" ] for a RegExp /foo|bar/
Represents an anchor, namely ^ or $.
Represents a reference to a previous group such as \1 or \2
Represents a capturing group such as (asdf)
Represents a set of possible characters structured as [a-zA-Z] or [^a-zA-Z]
Represents a series of nodes chained one after another such as (?:...)[a-z]*(...)
Represents an empty portion of a RegExp such as the middle of "||"
Represents a lookahead assertion such as (?=...) or (?!...)
Represents a lookbehind assertion such as (?<=...) or (?<!...)
Represents a reference to a previous named group
Represents a named capture group
Represents a node that never has children such as an anchor or charset.
Represents a repeating item such as ...+, ...*, or ...{0,1}
Represents a run of non-special characters such as "foobar"
Represents a Unicode Property Escape such as in /\p{Script=Greek}/u
Represents \b or \B
Source code region.
Normalizes all CAST nodes out of the AST.
Interface used by to substitute names.
A decoder for strings encoded by the ReplaceStrings JS compiler pass.
ReplaceMessages replaces user-visible messages with alternatives.
Holds information about the protected form of a translatable message that appears in the AST.
Constants that need to be shared between `ReplaceMessages` and other passes.
Class that helps to decode reports received from JS binaries that have been instrumented.
Looks for presence of features that are not supported for transpilation (mostly new RegExp features and bigint literal).
Utility class that handles resource loading.
Compilation results
 
This interface defines what reversed abstract interpreters provide.
Converts async functions to valid ES6 generator functions code.
Converts async generator functions into a function returning a new $jscomp.AsyncGenWrapper around the original block and awaits/yields converted to yields of ActionRecords.
Replaces the ES2022 class fields and class static blocks with constructor declaration.
Rewrite dynamic import expressions to account for bundling and module rewriting.
Looks for references to Closure's goog.js file and globalizes.
Possible traversal modes - either linting or linting+rewriting.
Rewrites a JSON file to be a module export.
Replaces the ES2020 `||=`, `invalid input: '&'invalid input: '&'=`, and `??=` operators.
Replaces the ES2020 `??` operator with conditional (?:).
Converts object spread to valid ES2017 code.
Injects polyfill libraries to ensure that ES6+ library functions are available.
An interning pool for strings used by the Rhino package.
A list of strings that is lazily interned into a RhinoStringPool as they are accessed.
Scans javascript source code into tokens.
Class that developers should implement to perform a JsFlume refactoring.
 
Scope contains information about a variable scope in JavaScript.
A summary of a script for use during fixes.
A reverse abstract interpreter using the semantics of the JavaScript language as a means to reverse interpret computations.
Configuration options for serialization time.
A compiler pass intended to serialize the types in the AST.
An exception thrown by the compilation service.
 
Control whether warnings should be restricted or suppressed for specified paths.
Controls whether warnings should be restricted to a specified path or suppressed within the specified path.
A class to hold JS dependency information for a single .js file.
Builder for constructing instances of SimpleDependencyInfo.
This is a hacked apart version of the Apache Harmony String.format class with all parts outside of the GWT subset removed.
A simple immutable reference.
Simple region.
The minimum implementation of StaticTypedSlot.
A simple implementation of StaticSourceFile for testing.
A sorted list of inputs following the ES6 module ordering spec.
 
A customizable error manager that sorts all errors and warnings reported to it, and has customizable output through the SortingErrorManager.ErrorReportGenerator interface.
Strategy for customizing the output format of the error report
An abstract representation of a source file.
Builder for Source instances.
An automorphic transformation on sources.
A factory for Escaper instances used to escape strings for safe use in various common programming languages.
A source excerpt provider is responsible for building source code excerpt of specific locations, such as a specific line or a region around a given line number.
A excerpt formatter is responsible of formatting source excerpts.
Source excerpt variety.
An interface for representing source files for the Compilation Service.
A source file.
An abstract representation of a source file that provides access to language-neutral features.
A builder interface for source files.
A SourceFileMapping maps a source file, line, and column into an Mapping.OriginalMapping.
Annotates nodes with information from their original input file before the compiler performs work that changes this information (such as its original location, its original name, etc).
Collects information mapping the generated (compiled) source back to its original source for debugging purposes.
Source maps can be very large different levels of detail can be specified.
An enumeration of available source map formats
Function that mape a "destination" location to use within the source map.
Maintains a mapping from a given node to the position in the source code at which its generated form was placed.
Simple SourceMap.LocationMapping that strips a prefix from a location.
A SourceMapConsumer is a SourceMapping provide that can parse from a raw string.
Detect and parse the provided source map.
Class for parsing version 3 of the SourceMap format, as produced by the Closure Compiler, etc.
 
A list of currently support SourceMap format revisions.
Collects information mapping the generated (compiled) source back to its original source for debugging purposes
 
Collects information mapping the generated (compiled) source back to its original source for debugging purposes.
This interface provides the merging strategy when an extension conflict appears because of merging two source maps on method SourceMapGeneratorV3.mergeMapSection(int, int, java.lang.String).
A lazy-loaded SourceMapConsumerV3 instance.
Wraps a JsonObject to provide a V3 source map.
Java implementation of the source map parser.
Throw if an invalid or unknown source map is encountered.
Interface for provide a way of mapping (line, column) positions back to positions in the original (uncompiled) source code.
A SourceMappingReversable is a SourceMapping that can provide the reverse (source → target) source mapping.
Utility class for resolving source maps and files referenced in source maps.
A class representing a partial source map.
 
A class for mapping source map names to the actual contents.
A position in a source string - includes offset, line and column.
Represents a position in some piece of source code, with an associated item of type T found at that position.
A range of positions in a source string.
Colors that are expected to be referencable as part of any compilation.
A Union-Find implementation.
The StaticRef tells us all the ways that a StaticSlot is used in a program.
The StaticScope interface must be implemented by any object that defines variables for the purposes of static analysis.
The StaticSlot interface must be implemented by variables that can appear as members of a StaticScope.
The StaticSourceFile contains information about a compiler input.
Source kinds.
Lookup references by the symbols that they refer to.
The StaticTypedRef tells us all the ways that a StaticTypedSlot is used in a program.
The StaticTypedScope interface must be implemented by any object that defines variables for the purposes of static analysis.
The StaticTypedSlot interface must be implemented by variables that can appear as members of a StaticTypedScope.
All warnings should be reported as errors.
A single or double quoted JavaScript string literal.
Aggregates strings into a StringPool
Builder
String type.
An interface representing a subgraph that provides adjacency calculation to a node.
Object representing the fixes to apply to the source code to create the refactoring CL.
Builder class for SuggestedFix that contains helper functions to manipulate JS nodes.
Information about the node that was matched for the suggested fix.
 
 
A symbol table for people that want to use Closure Compiler as an indexer.
Reference
A symbol-table entry
Scope of a symbol
Symbol type.
The syntactic scope creator scans the parse tree to create a Scope object containing all the variable declarations in that scope.
A matcher that can take an arbitrary AST and use it as a template to find matches in another.
Template literal production in ES6.
A production representing a literal portion of a template literal.
A token representing a javascript template literal substring.
A production representing the expression to be evaluated and substituted into a template literal.
A placeholder type, used as keys in TemplateTypeMaps.
Manages a mapping from TemplateType to its resolved JSType.
Specializes TemplatizedTypes according to provided bindings.
An object type with declared template types, such as Array<string>.
 
A simple delegating ErrorManager that provides a thread-safe wrapper for the one being delegated.
 
A Token in a javascript file.
This class implements the JavaScript scanner.
This class implements the JavaScript scanner.
 
Helper methods for parsing JavaScript.
An unchecked exception thrown when transpilation fails due to one or more errors in the input script.
Provides a single place to manage transpilation passes.
Util functions for transpilation passes
A source transformer for lowering JS language versions.
Common interface for a transpiler.
Basic Transpiler implementation for outputting ES5 code.
The result of transpiling a single file.
An enum for ternary logic.
 
Checks the types of JS expressions against any declared type information.
Deserializes a list of TypedAst protos into the JSCompiler AST structure.
The result of deserializing a TypedAst.List
An AST construction helper class for Node
TypedScope contains information about variables and their types.
AbstractVar subclass for use with TypedScope.
The different strategies for matching the JSType of nodes.
The result of comparing two different JSType instances.
Signals that the first type and the second type have been used interchangeably.
A parser for the type transformation expressions (TTL-Exp) as in @template T := TTL-Exp =:
Keywords of the type transformation language
The classification of the keywords
 
A generic undirected graph.
A generic undirected graph edge.
A generic undirected graph node.
Union-Find is a classical algorithm used to find connected components in graph theory.
A type that may be any one of a set of types, and thus has the intersection of the properties of those types.
Implements type unioning logic, since UnionTypes only actually need to perform unioning operations when being (re)built.
Generates unique String Ids when requested via a compiler instance.
 
The Unknown type.
Represents UpdateExpression productions from the spec.
Position of the operator relative to the operand.
 
Used by Scope to store information about variables.
 
 
Stores the mapping from original variable name to new variable names.
Policies to determine which variables should be renamed.
 
Class used to represent a "virtual" file.
A vistor for JSTypes.
A type visitor with a default behaviour.
Void type whose only element is the undefined value.
Simple representation of a warning flag in Ant
Convert the warnings level to an Options object.
Class that allows to flexibly manage what to do with a reported warning/error.
Priority
Resolution algorithm for Webpack.
Uses a lookup map provided by webpack to locate modules from a numeric id used during import
 
Replicates the effect of ClosureBundler in whitespace-only mode and wraps goog.modules in goog.loadModule calls.
 
A simple utility for shortening identifiers in a stable way.
Strategy for selecting the underlying hash code function to be used by Xid.
A MessageBundle that parses messages from an XML Translation Bundle (XTB) file.