-
manageClosureDependencies
boolean manageClosureDependencies
-
languageIn
CompilerOptions.LanguageMode languageIn
The JavaScript language version accepted.
-
languageOut
CompilerOptions.LanguageMode languageOut
-
acceptConstKeyword
boolean acceptConstKeyword
Whether the compiler accepts the `const' keyword.
-
assumeStrictThis
boolean assumeStrictThis
Whether the compiler should assume that a function's "this" value
never needs coercion (for example in non-strict "null" or "undefined" will
be coerced to the global "this" and primitives to objects).
-
ideMode
boolean ideMode
Configures the compiler for use as an IDE backend. In this mode:
- No optimization passes will run.
- The last time custom passes are invoked is
CustomPassExecutionTime.BEFORE_OPTIMIZATIONS
- The compiler will always try to process all inputs fully, even
if it encounters errors.
- The compiler may record more information than is strictly
needed for codegen.
-
saveDataStructures
boolean saveDataStructures
-
inferTypes
boolean inferTypes
Even if checkTypes is disabled, clients might want to still infer types.
This is mostly used when ideMode is enabled.
-
skipAllPasses
boolean skipAllPasses
Configures the compiler to skip as many passes as possible.
-
nameAnonymousFunctionsOnly
boolean nameAnonymousFunctionsOnly
If true, name anonymous functions only. All others passes will be skipped.
-
devMode
com.google.javascript.jscomp.CompilerOptions.DevMode devMode
Configures the compiler to run expensive sanity checks after
every pass. Only intended for internal development.
-
checkDeterminism
boolean checkDeterminism
Configures the compiler to log a hash code of the AST after
every pass. Only intended for internal development.
-
dependencyOptions
DependencyOptions dependencyOptions
-
checkSymbols
boolean checkSymbols
Checks that all symbols are defined
-
aggressiveVarCheck
CheckLevel aggressiveVarCheck
-
checkSuspiciousCode
boolean checkSuspiciousCode
Checks for suspicious statements that have no effect
-
checkControlStructures
boolean checkControlStructures
Checks for invalid control structures
-
checkTypes
boolean checkTypes
Checks types on expressions
-
tightenTypes
boolean tightenTypes
-
reportMissingOverride
CheckLevel reportMissingOverride
-
reportUnknownTypes
CheckLevel reportUnknownTypes
-
checkRequires
CheckLevel checkRequires
Checks for missing goog.require() calls
-
checkProvides
CheckLevel checkProvides
-
checkGlobalNamesLevel
CheckLevel checkGlobalNamesLevel
-
brokenClosureRequiresLevel
CheckLevel brokenClosureRequiresLevel
-
checkGlobalThisLevel
CheckLevel checkGlobalThisLevel
-
checkMissingGetCssNameLevel
CheckLevel checkMissingGetCssNameLevel
-
checkMissingGetCssNameBlacklist
String checkMissingGetCssNameBlacklist
Regex of string literals that may only appear in goog.getCssName arguments.
-
checkCaja
boolean checkCaja
Checks that the syntactic restrictions of Caja are met.
-
extraAnnotationNames
Set<E> extraAnnotationNames
A set of extra annotation names which are accepted and silently ignored
when encountered in a source file. Defaults to null which has the same
effect as specifying an empty set.
-
foldConstants
boolean foldConstants
Folds constants (e.g. (2 + 3) to 5)
-
deadAssignmentElimination
boolean deadAssignmentElimination
Remove assignments to values that can not be referenced
-
inlineConstantVars
boolean inlineConstantVars
Inlines constants (symbols that are all CAPS)
-
inlineFunctions
boolean inlineFunctions
Inlines global functions
-
inlineLocalFunctions
boolean inlineLocalFunctions
Inlines functions defined in local scopes
-
assumeClosuresOnlyCaptureReferences
boolean assumeClosuresOnlyCaptureReferences
More aggressive function inlining
-
inlineProperties
boolean inlineProperties
Inlines properties
-
crossModuleCodeMotion
boolean crossModuleCodeMotion
Move code to a deeper module
-
coalesceVariableNames
boolean coalesceVariableNames
Merge two variables together as one.
-
crossModuleMethodMotion
boolean crossModuleMethodMotion
Move methods to a deeper module
-
inlineGetters
boolean inlineGetters
Inlines trivial getters
-
inlineVariables
boolean inlineVariables
Inlines variables
-
inlineLocalVariables
boolean inlineLocalVariables
Inlines variables
-
flowSensitiveInlineVariables
boolean flowSensitiveInlineVariables
-
smartNameRemoval
boolean smartNameRemoval
Removes code associated with unused global names
-
removeDeadCode
boolean removeDeadCode
Removes code that will never execute
-
checkUnreachableCode
CheckLevel checkUnreachableCode
-
checkMissingReturn
CheckLevel checkMissingReturn
-
extractPrototypeMemberDeclarations
boolean extractPrototypeMemberDeclarations
Extracts common prototype member declarations
-
removeUnusedPrototypeProperties
boolean removeUnusedPrototypeProperties
Removes unused member prototypes
-
removeUnusedPrototypePropertiesInExterns
boolean removeUnusedPrototypePropertiesInExterns
Tells AnalyzePrototypeProperties it can remove externed props.
-
removeUnusedClassProperties
boolean removeUnusedClassProperties
Removes unused member properties
-
removeUnusedVars
boolean removeUnusedVars
Removes unused variables
-
removeUnusedLocalVars
boolean removeUnusedLocalVars
Removes unused variables in local scope.
-
aliasExternals
boolean aliasExternals
Adds variable aliases for externals to reduce code size
-
aliasableGlobals
String aliasableGlobals
-
unaliasableGlobals
String unaliasableGlobals
-
collapseVariableDeclarations
boolean collapseVariableDeclarations
Collapses multiple variable declarations into one
-
groupVariableDeclarations
boolean groupVariableDeclarations
Group multiple variable declarations into one
-
collapseAnonymousFunctions
boolean collapseAnonymousFunctions
Collapses anonymous function declarations into named function
declarations
-
aliasableStrings
Set<E> aliasableStrings
If set to a non-empty set, those strings literals will be aliased to a
single global instance per string, to avoid creating more objects than
necessary.
-
aliasStringsBlacklist
String aliasStringsBlacklist
A blacklist in the form of a regular expression to block strings that
contains certain words from being aliased.
If the value is the empty string, no words are blacklisted.
-
aliasAllStrings
boolean aliasAllStrings
Aliases all string literals to global instances, to avoid creating more
objects than necessary (if true, overrides any set of strings passed in
to aliasableStrings)
-
outputJsStringUsage
boolean outputJsStringUsage
Print string usage as part of the compilation log.
-
convertToDottedProperties
boolean convertToDottedProperties
Converts quoted property accesses to dot syntax (a['b'] -> a.b)
-
rewriteFunctionExpressions
boolean rewriteFunctionExpressions
Reduces the size of common function expressions.
-
optimizeParameters
boolean optimizeParameters
Remove unused and constant parameters.
-
optimizeReturns
boolean optimizeReturns
Remove unused return values.
-
optimizeCalls
boolean optimizeCalls
Remove unused parameters from call sites.
-
optimizeArgumentsArray
boolean optimizeArgumentsArray
Provide formal names for elements of arguments array.
-
chainCalls
boolean chainCalls
Chains calls to functions that return this.
-
variableRenaming
VariableRenamingPolicy variableRenaming
Controls which variables get renamed.
-
propertyRenaming
PropertyRenamingPolicy propertyRenaming
Controls which properties get renamed.
-
propertyAffinity
boolean propertyAffinity
Should we use affinity information when generating property names.
-
labelRenaming
boolean labelRenaming
Controls label renaming.
-
reserveRawExports
boolean reserveRawExports
Reserve property names on the global this object.
-
shadowVariables
boolean shadowVariables
Should shadow variable names in outer scope.
-
generatePseudoNames
boolean generatePseudoNames
Generate pseudo names for variables and properties for debugging purposes.
-
renamePrefix
String renamePrefix
Specifies a prefix for all globals
-
renamePrefixNamespace
String renamePrefixNamespace
Specifies the name of an object that will be used to store all non-extern
globals.
-
aliasKeywords
boolean aliasKeywords
Aliases true, false, and null to variables with shorter names.
-
collapseProperties
boolean collapseProperties
Flattens multi-level property names (e.g. a$b = x)
-
collapseObjectLiterals
boolean collapseObjectLiterals
Split object literals into individual variables when possible.
-
collapsePropertiesOnExternTypes
boolean collapsePropertiesOnExternTypes
Flattens multi-level property names on extern types (e.g. String$f = x)
-
devirtualizePrototypeMethods
boolean devirtualizePrototypeMethods
Devirtualize prototype method by rewriting them to be static calls that
take the this pointer as their first argument
-
computeFunctionSideEffects
boolean computeFunctionSideEffects
Use @nosideeffects annotations, function bodies and name graph
to determine if calls have side effects. Requires --check_types.
-
debugFunctionSideEffectsPath
String debugFunctionSideEffectsPath
Where to save debug report for compute function side effects.
-
disambiguateProperties
boolean disambiguateProperties
Rename properties to disambiguate between unrelated fields based on
type information.
-
ambiguateProperties
boolean ambiguateProperties
Rename unrelated properties to the same name to reduce code size.
-
anonymousFunctionNaming
AnonymousFunctionNamingPolicy anonymousFunctionNaming
Give anonymous functions names for easier debugging
-
inputAnonymousFunctionNamingMap
VariableMap inputAnonymousFunctionNamingMap
Input anonymous function renaming map.
-
inputVariableMap
VariableMap inputVariableMap
Input variable renaming map.
-
inputPropertyMap
VariableMap inputPropertyMap
Input property renaming map.
-
exportTestFunctions
boolean exportTestFunctions
Whether to export test functions.
-
specializeInitialModule
boolean specializeInitialModule
-
replaceMessagesWithChromeI18n
boolean replaceMessagesWithChromeI18n
Replace UI strings with chrome.i18n.getMessage calls.
Used by Chrome extensions/apps.
-
tcProjectId
String tcProjectId
-
runtimeTypeCheck
boolean runtimeTypeCheck
Inserts run-time type assertions for debugging.
-
runtimeTypeCheckLogFunction
String runtimeTypeCheckLogFunction
A JS function to be used for logging run-time type assertion
failures. It will be passed the warning as a string and the
faulty expression as arguments.
-
codingConvention
CodingConvention codingConvention
A CodingConvention to use during the compile.
-
ignoreCajaProperties
boolean ignoreCajaProperties
-
syntheticBlockStartMarker
String syntheticBlockStartMarker
-
syntheticBlockEndMarker
String syntheticBlockEndMarker
-
locale
String locale
Compiling locale
-
markAsCompiled
boolean markAsCompiled
Sets the special "COMPILED" value to true
-
removeTryCatchFinally
boolean removeTryCatchFinally
Removes try...catch...finally blocks for easier debugging
-
closurePass
boolean closurePass
Processes goog.provide() and goog.require() calls
-
jqueryPass
boolean jqueryPass
Processes jQuery aliases
-
angularPass
boolean angularPass
Processes AngularJS-specific annotations
-
removeAbstractMethods
boolean removeAbstractMethods
Remove goog.abstractMethod assignments.
-
removeClosureAsserts
boolean removeClosureAsserts
Remove goog.asserts calls.
-
gatherCssNames
boolean gatherCssNames
Gather CSS names (requires closurePass)
-
stripTypes
Set<E> stripTypes
Names of types to strip
-
stripNameSuffixes
Set<E> stripNameSuffixes
Name suffixes that determine which variables and properties to strip
-
stripNamePrefixes
Set<E> stripNamePrefixes
Name prefixes that determine which variables and properties to strip
-
stripTypePrefixes
Set<E> stripTypePrefixes
Qualified type name prefixes that determine which types to strip
-
markNoSideEffectCalls
boolean markNoSideEffectCalls
Mark no side effect calls
-
defineReplacements
Map<K,V> defineReplacements
Replacements for @defines. Will be Boolean, Numbers, or Strings
-
tweakProcessing
CompilerOptions.TweakProcessing tweakProcessing
What kind of processing to do for goog.tweak functions.
-
tweakReplacements
Map<K,V> tweakReplacements
Replacements for tweaks. Will be Boolean, Numbers, or Strings
-
moveFunctionDeclarations
boolean moveFunctionDeclarations
Move top-level function declarations to the top
-
instrumentationTemplate
String instrumentationTemplate
Instrumentation template to use with #recordFunctionInformation
-
appNameStr
String appNameStr
-
recordFunctionInformation
boolean recordFunctionInformation
Record function information
-
generateExports
boolean generateExports
-
cssRenamingMap
CssRenamingMap cssRenamingMap
Map used in the renaming of CSS class names.
-
cssRenamingWhitelist
Set<E> cssRenamingWhitelist
Whitelist used in the renaming of CSS class names.
-
processObjectPropertyString
boolean processObjectPropertyString
Process instances of goog.testing.ObjectPropertyString.
-
replaceIdGenerators
boolean replaceIdGenerators
Replace id generators
-
idGenerators
Set<E> idGenerators
Id generators to replace.
-
idGeneratorsMapSerialized
String idGeneratorsMapSerialized
A previous map of ids (serialized to a string by a previous compile).
This will be used as a hint during the ReplaceIdGenerators pass, which
will attempt to reuse the same ids.
-
replaceStringsFunctionDescriptions
List<E> replaceStringsFunctionDescriptions
Configuration strings
-
replaceStringsPlaceholderToken
String replaceStringsPlaceholderToken
-
replaceStringsReservedStrings
Set<E> replaceStringsReservedStrings
-
replaceStringsInputMap
VariableMap replaceStringsInputMap
-
propertyInvalidationErrors
Map<K,V> propertyInvalidationErrors
List of properties that we report invalidation errors for.
-
transformAMDToCJSModules
boolean transformAMDToCJSModules
Transform AMD to CommonJS modules.
-
processCommonJSModules
boolean processCommonJSModules
Rewrite CommonJS modules so that they can be concatenated together.
-
commonJSModulePathPrefix
String commonJSModulePathPrefix
CommonJS module prefix.
-
prettyPrint
boolean prettyPrint
Output in pretty indented format
-
lineBreak
boolean lineBreak
Line break the output a bit more aggressively
-
preferLineBreakAtEndOfFile
boolean preferLineBreakAtEndOfFile
Prefer line breaks at end of file
-
printInputDelimiter
boolean printInputDelimiter
Prints a separator comment before each JS script
-
inputDelimiter
String inputDelimiter
The string to use as the separator for printInputDelimiter
-
preferSingleQuotes
boolean preferSingleQuotes
-
trustedStrings
boolean trustedStrings
-
reportPath
String reportPath
-
tracer
CompilerOptions.TracerMode tracer
-
colorizeErrorOutput
boolean colorizeErrorOutput
-
errorFormat
ErrorFormat errorFormat
-
warningsGuard
ComposeWarningsGuard warningsGuard
-
summaryDetailLevel
int summaryDetailLevel
-
lineLengthThreshold
int lineLengthThreshold
-
externExports
boolean externExports
-
externExportsPath
String externExportsPath
The output path for the created externs file.
-
nameReferenceReportPath
String nameReferenceReportPath
-
nameReferenceGraphPath
String nameReferenceGraphPath
-
sourceMapOutputPath
String sourceMapOutputPath
The output path for the source map.
-
sourceMapDetailLevel
SourceMap.DetailLevel sourceMapDetailLevel
The detail level for the generated source map.
-
sourceMapFormat
SourceMap.Format sourceMapFormat
The source map file format
-
sourceMapLocationMappings
List<E> sourceMapLocationMappings
-
outputCharset
String outputCharset
Charset to use when generating code. If null, then output ASCII.
This needs to be a string because CompilerOptions is serializable.
-
looseTypes
boolean looseTypes
Whether the named objects types included 'undefined' by default.
-
protectHiddenSideEffects
boolean protectHiddenSideEffects
When set, assume that apparently side-effect free code is meaningful.