Class CompilerOptions
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumA mode enum used to indicate the alias strings policy for the AliasStrings passstatic enumFormat for compiler output when multiple chunks are requested.static enumHow @closureUnaware code blocks should be handled.static enumWhether to respect the library-level non-allowlisted conformance behavior specified in the conformance config.static enumWhen to do the extra validity checksstatic enumAn environment specifies the built-in externs that are loaded for a given compilation.static enumHow ES modules should be transformed.static enumConfigures the transpiled output for ES6 classes when targeting ES5.static enumOptions to force transpile specific features for performance experiments.static enumstatic enumstatic enumAn option to determine what level of code instrumentation is performed, if anystatic enumWhat kind of isolation is going to be usedstatic enumA mode enum used to indicate whether J2clPass should be enabled, disabled, or enabled automatically if there is any J2cl source file (i.e.static enumA language mode applies to the whole compilation job.static enumWhat type of JS file should be output by this compilationstatic enumstatic enumA common enum for compiler passes that can run either globally or locally.static enumWhat segment of the compilation to run.static enumHow much tracing we want to dostatic enumOption for the ProcessTweaks pass -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCustomPass(CustomPassExecutionTime time, CompilerPass customPass) voidaddUnknownDefinesToIgnore(com.google.common.collect.ImmutableList<String> unknownDefinesToIgnore) voidaddWarningsGuard(WarningsGuard guard) Add a guard to the set of warnings guards.booleanbooleanvoidbooleanbooleanstatic com.google.common.collect.ImmutableSet<Character> booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanfinal com.google.common.collect.ImmutableList<com.google.javascript.jscomp.ConformanceConfig> com.google.common.base.Optional<Pattern> @Nullable PathReturns the map of define replacements.Set the alias name for dynamic import expressions@Nullable Stringcom.google.common.collect.ImmutableList<CompilerOptions.ExperimentalForceTranspile> @Nullable StringbooleanGets the inferTypes flag.Get the function inlining policy for the compiler.booleanbooleanbooleanintbooleanbooleanGets the set of features that can appear in the output.static com.google.common.collect.ImmutableSet<Character> booleancom.google.common.collect.ImmutableSet<String> com.google.common.collect.ImmutableSet<Character> com.google.common.collect.ImmutableSet<Character> booleanbooleanbooleancom.google.common.collect.ImmutableSet<String> Deprecated.StripCode is deprecated.@Nullable com.google.common.collect.ImmutableSet<String> boolean@Nullable PatternbooleanChecks JSDoc documentation will be parsed.booleanbooleanbooleanbooleanvoidlegacySetOutputFeatureSet(FeatureSet featureSet) booleanneedsTranspilationFrom(FeatureSet languageLevel) booleanneedsTranspilationOf(FeatureSet.Feature feature) voidReset the warnings guard.voidsetAliasStringsMode(CompilerOptions.AliasStringsMode aliasStringsMode) voidsetAllowDynamicImport(boolean value) Whether to enable support for dynamic import expressionsvoidsetAlwaysGatherSourceMapInfo(boolean shouldAlwaysGatherSourceMapInfo) voidsetAmbiguateProperties(boolean ambiguateProperties) voidsetAngularPass(boolean angularPass) voidsetApplyInputSourceMaps(boolean applyInputSourceMaps) voidsetAssumeClosuresOnlyCaptureReferences(boolean enable) Whether to assume closures capture only what they reference.voidsetAssumeForwardDeclaredForMissingTypes(boolean assumeForwardDeclaredForMissingTypes) Iftrue, considers all missing types to be forward declared (useful for partial compilation).voidsetAssumeGettersArePure(boolean x) voidsetAssumePropertiesAreStaticallyAnalyzable(boolean x) voidsetAssumeStaticInheritanceIsNotUsed(boolean x) voidsetAssumeStrictThis(boolean enable) If true, enables enables additional optimizations.voidWhether to enable the bad module rewriting before typechecking that we want to get rid ofvoidsetBrowserFeaturesetYear(int year) voidsetBrowserFeaturesetYear(com.google.javascript.jscomp.CompilerOptions.BrowserFeaturesetYear year) voidsetBrowserResolverPrefixReplacements(com.google.common.collect.ImmutableMap<String, String> browserResolverPrefixReplacements) voidsetCheckDeterminism(boolean checkDeterminism) voidDeprecated.voidsetChecksOnly(boolean checksOnly) voidsetCheckSuspiciousCode(boolean checkSuspiciousCode) voidsetCheckSymbols(boolean checkSymbols) voidsetCheckTypes(boolean checkTypes) voidsetChromePass(boolean chromePass) voidsetChunkIdHashFunction(Xid.HashFunction chunkIdHashFunction) Sets the hash function to use for chunk ID generationvoidsetChunkOutputType(CompilerOptions.ChunkOutputType chunkOutputType) voidsetChunksToPrintAfterEachPassRegexList(List<String> chunkPathRegexList) voidsetClosurePass(boolean closurePass) voidOpts into experimental support for transpiling/optimizing @closureUnaware code blocks, rather than just passing them through compilation unchanged.voidsetCoalesceVariableNames(boolean coalesceVariableNames) voidsetCodingConvention(CodingConvention codingConvention) voidsetCollapseAnonymousFunctions(boolean enabled) voidsetCollapseObjectLiterals(boolean enabled) voidsetCollapseProperties(boolean fullyCollapse) Deprecated.voidvoidsetCollapseVariableDeclarations(boolean enabled) voidsetColorizeErrorOutput(boolean colorizeErrorOutput) voidsetCommonJSModulePathPrefix(String commonJSModulePathPrefix) Sets a path prefix for CommonJS modules (maps tosetModuleRoots(List)).voidsetComputeFunctionSideEffects(boolean computeFunctionSideEffects) voidsetConformanceConfig(com.google.javascript.jscomp.ConformanceConfig conformanceConfig) Deprecated.See go/binary-level-conformance-deprecated.voidsetConformanceConfigs(List<com.google.javascript.jscomp.ConformanceConfig> configs) Deprecated.See go/binary-level-conformance-deprecated.voidsetConformanceRemoveRegexFromPath(com.google.common.base.Optional<Pattern> pattern) voidvoidsetContinueAfterErrors(boolean continueAfterErrors) voidsetConvertToDottedProperties(boolean convertToDottedProperties) voidsetCrossChunkCodeMotion(boolean crossChunkCodeMotion) voidsetCrossChunkCodeMotionNoStubMethods(boolean crossChunkCodeMotionNoStubMethods) voidsetCrossChunkMethodMotion(boolean crossChunkMethodMotion) voidsetCssRenamingMap(CssRenamingMap cssRenamingMap) voidsetCssRenamingSkiplist(Set<String> skiplist) voidsetDeadAssignmentElimination(boolean deadAssignmentElimination) voidsetDeadPropertyAssignmentElimination(boolean deadPropertyAssignmentElimination) voidsetDebugLogDirectory(@Nullable Path dir) voidsetDebugLogFilter(String filter) voidsetDefineReplacements(Map<String, Object> defineReplacements) voidsetDefineToBooleanLiteral(String defineName, boolean value) Sets the value of the@definevariable in JS to a boolean literal.voidsetDefineToDoubleLiteral(String defineName, double value) Sets the value of the@definevariable in JS to a number literal.voidsetDefineToNumberLiteral(String defineName, int value) Sets the value of the@definevariable in JS to a number literal.voidsetDefineToStringLiteral(String defineName, String value) Sets the value of the@definevariable in JS to a String literal.voidsetDependencyOptions(DependencyOptions dependencyOptions) Sets the dependency management options.voidsetDevirtualizeMethods(boolean devirtualizeMethods) voidsetDevMode(CompilerOptions.DevMode devMode) voidsetDisambiguateProperties(boolean disambiguateProperties) voidsetDoLateLocalization(boolean doLateLocalization) voidsetDynamicImportAlias(String value) Set the alias name for dynamic import expressionssetEmitUseStrict(boolean emitUseStrict) voidsetEnableModuleRewriting(boolean enable) Experimental option to disable all Closure and ES module and goog.provide rewritingvoidsetEnableZonesDefineName(@Nullable String enableZonesDefineName) voidsetEnvironment(CompilerOptions.Environment environment) Set which set of builtin externs to use.voidsetErrorFormat(ErrorFormat errorFormat) voidsetErrorHandler(ErrorHandler handler) Set a custom handler for warnings and errors.voidvoidsetEs6SubclassTranspilation(CompilerOptions.Es6SubclassTranspilation es6SubclassTranspilation) voidsetExperimentalForceTranspiles(CompilerOptions.ExperimentalForceTranspile... experimentalForceTranspile) voidsetExportLocalPropertyDefinitions(boolean export) voidsetExportTestFunctions(boolean exportTestFunctions) voidsetExternExportsPath(@Nullable String externExportsPath) voidsetExtraAnnotationNames(Iterable<String> extraAnnotationNames) voidsetExtractPrototypeMemberDeclarations(boolean enabled) voidvoidsetFilesToPrintAfterEachPassRegexList(List<String> filePathRegexList) voidsetFlowSensitiveInlineVariables(boolean enabled) voidsetFoldConstants(boolean foldConstants) voidsetForceLibraryInjection(Iterable<String> libraries) Sets list of libraries to always inject, even if not needed.voidsetGatherCssNames(boolean gatherCssNames) voidsetGenerateExports(boolean generateExports) voidsetGeneratePseudoNames(boolean generatePseudoNames) voidsetGentsMode(boolean gentsMode) voidsetIdGenerators(Map<String, RenamingMap> idGenerators) Sets the id generators to replace.voidsetIdGenerators(Set<String> idGenerators) Sets the id generators to replace.voidsetIdGeneratorsMap(String previousMappings) A previous map of ids (serialized to a string by a previous compile).voidvoidsetInferConst(boolean value) voidsetInferTypes(boolean enable) If true, enables type inference.voidsetInjectPolyfillsNewerThan(CompilerOptions.LanguageMode injectPolyfillsNewerThan) voidsetInlineConstantVars(boolean inlineConstantVars) voidSet the function inlining policy for the compiler.voidsetInlineLocalVariables(boolean inlineLocalVariables) voidsetInlineProperties(boolean enable) Set the function inlining policy for the compiler.voidsetInlineVariables(boolean inlineVariables) voidSet the variable inlining policy for the compiler.voidsetInputDelimiter(String inputDelimiter) voidsetInputPropertyMap(VariableMap inputPropertyMap) voidsetInputSourceMaps(com.google.common.collect.ImmutableMap<String, SourceMapInput> inputSourceMaps) Sets the input sourcemap files, indexed by the JS files they refer to.voidsetInputVariableMap(VariableMap inputVariableMap) voidsetInstrumentAsyncContext(boolean instrumentAsyncContext) Sets whether to transpile async functions and generators for AsyncContext.voidsetInstrumentForCoverageOnly(boolean instrumentForCoverageOnly) voidsetInstrumentForCoverageOption(CompilerOptions.InstrumentOption instrumentForCoverageOption) voidsetIsolatePolyfills(boolean isolatePolyfills) Sets whether to isolate polyfills from the global scope.voidsetJ2clMinifierEnabled(boolean enabled) voidsetJ2clMinifierPruningManifest(String j2clMinifierPruningManifest) voidsetJ2clPass(CompilerOptions.J2clPassMode j2clPassMode) voidsetLabelRenaming(boolean labelRenaming) voidsetLanguage(CompilerOptions.LanguageMode language) Sets ECMAScript version to use.voidsetLanguageIn(CompilerOptions.LanguageMode languageIn) Sets ECMAScript version to use for the input.voidsetLanguageOut(CompilerOptions.LanguageMode languageOut) Sets ECMAScript version to use for the output.voidsetLineBreak(boolean lineBreak) voidsetLineLengthThreshold(int lineLengthThreshold) voidvoidsetMarkAsCompiled(boolean markAsCompiled) voidsetMaxFunctionSizeAfterInlining(int funAstSize) voidsetMaxOptimizationLoopIterations(int maxIterations) voidsetMessageBundle(MessageBundle messageBundle) voidsetModuleResolutionMode(ModuleLoader.ResolutionMode moduleResolutionMode) voidsetModuleRoots(List<String> moduleRoots) Sets the module roots.voidsetNameGenerator(NameGenerator nameGenerator) voidsetNewTypeInference(boolean enable) Deprecated.This is a no-op.voidsetNumParallelThreads(int parallelism) Sets the level of parallelism for compilation passes that can exploit multi-threading.voidsetOptimizeCalls(boolean optimizeCalls) voidsetOptimizeESClassConstructors(boolean optimizeESClassConstructors) voidsetOutputCharset(Charset charset) Sets the output charset.voidsetOutputJs(CompilerOptions.OutputJs outputJs) voidsetOutputJsStringUsage(boolean outputJsStringUsage) voidsetPackageJsonEntryNames(List<String> names) voidsetParentChunkCanSeeSymbolsDeclaredInChildren(boolean parentChunkCanSeeSymbolsDeclaredInChildren) voidsetParseInlineSourceMaps(boolean parseInlineSourceMaps) voidsetParseJsDocDocumentation(Config.JsDocParsing parseJsDocDocumentation) Enables or disables the parsing of JSDoc documentation, and optionally also the preservation of all whitespace and formatting within a JSDoc comment.voidsetPathEscaper(ModuleLoader.PathEscaper pathEscaper) voidsetPolymerVersion(Integer polymerVersion) voidsetPreferSingleQuotes(boolean enabled) Normally, when there are an equal number of single and double quotes in a string, the compiler will use double quotes.voidsetPreferStableNames(boolean preferStableNames) voidsetPreserveClosurePrimitives(boolean preserveClosurePrimitives) Preserve closure primitives.voidsetPreserveDetailedSourceInfo(boolean preserveDetailedSourceInfo) voidsetPreserveNonJSDocComments(boolean preserveNonJSDocComments) voidsetPreserveTypeAnnotations(boolean preserveTypeAnnotations) voidsetPrettyPrint(boolean prettyPrint) voidsetPreventLibraryInjection(boolean preventLibraryInjection) Sets the set of libraries to never inject, even if required.voidsetPrintConfig(boolean printConfig) Should the compiler print its configuration options to stderr when they are initialized?voidsetPrintInputDelimiter(boolean printInputDelimiter) voidsetPrintSourceAfterEachPass(boolean printSource) voidsetProcessCommonJSModules(boolean processCommonJSModules) Rewrites CommonJS modules so that modules can be concatenated together, by renaming all globals to avoid conflicting with other modules.voidsetProductionInstrumentationArrayName(String productionInstrumentationArrayName) Sets the name for the global array which is used by PRODUCTION instrumentation.voidSets the list of properties that we report property invalidation errors for.voidsetPropertyRenaming(PropertyRenamingPolicy propertyRenaming) voidsetPropertyRenamingOnlyCompilationMode(boolean propertyRenamingOnlyCompilationMode) voidsetProtectHiddenSideEffects(boolean enable) When enabled, assume that apparently side-effect free code is meaningful.voidsetQnameUsesToPrintAfterEachPassList(List<String> qnameRegexList) voidsetQuoteKeywordProperties(boolean quoteKeywordProperties) voidsetRemoveAbstractMethods(boolean remove) voidsetRemoveClosureAsserts(boolean remove) voidsetRemoveJ2clAsserts(boolean remove) voidsetRemoveUnusedClassProperties(boolean removeUnusedClassProperties) voidsetRemoveUnusedPrototypeProperties(boolean enabled) voidSet the variable removal policy for the compiler.voidsetRenamePrefix(String renamePrefix) voidsetRenamePrefixNamespace(String renamePrefixNamespace) voidsetRenamePrefixNamespaceAssumeCrossChunkNames(boolean assume) Useful for tests to avoid having to declare two chunksvoidsetRenamingPolicy(VariableRenamingPolicy newVariablePolicy, PropertyRenamingPolicy newPropertyPolicy) Sets the variable and property renaming policies for the compiler, in a way that clears warnings about the renaming policy being uninitialized from flags.voidsetReplaceIdGenerators(boolean replaceIdGenerators) voidsetReplaceMessagesWithChromeI18n(boolean replaceMessagesWithChromeI18n, String tcProjectId) voidsetReplaceStringsConfiguration(String placeholderToken, List<String> functionDescriptors) Sets the functions whose debug strings to replace.voidsetReplaceStringsFunctionDescriptions(List<String> replaceStringsFunctionDescriptions) voidsetReplaceStringsPlaceholderToken(String replaceStringsPlaceholderToken) voidsetReserveRawExports(boolean reserveRawExports) voidsetResolveSourceMapAnnotations(boolean resolveSourceMapAnnotations) voidsetRewriteFunctionExpressions(boolean rewriteFunctionExpressions) voidsetRewriteGlobalDeclarationsForTryCatchWrapping(boolean rewrite) voidsetRewritePolyfills(boolean rewritePolyfills) Sets whether to rewrite polyfills.voidsetRuntimeLibraryMode(RuntimeJsLibManager.RuntimeLibraryMode runtimeLibraryMode) voidsetSkipNonTranspilationPasses(boolean skipNonTranspilationPasses) Skip all passes (other than transpilation, if requested).voidsetSkipTranspilationAndCrash(boolean value) Deprecated.voidsetSmartNameRemoval(boolean smartNameRemoval) voidsetSourceMapDetailLevel(SourceMap.DetailLevel sourceMapDetailLevel) voidsetSourceMapFormat(SourceMap.Format sourceMapFormat) voidsetSourceMapIncludeSourcesContent(boolean sourceMapIncludeSourcesContent) voidsetSourceMapLocationMappings(List<? extends SourceMap.LocationMapping> sourceMapLocationMappings) voidsetSourceMapOutputPath(String sourceMapOutputPath) voidsetStrictMessageReplacement(boolean strictMessageReplacement) setStrictModeInput(boolean isStrictModeInput) voidsetStripNamePrefixes(Set<String> stripNamePrefixes) Deprecated.StripCode is deprecated.voidsetStripNameSuffixes(Set<String> stripNameSuffixes) Deprecated.StripCode is deprecated.voidsetStripTypes(Set<String> stripTypes) Deprecated.StripCode is deprecated.voidsetSummaryDetailLevel(int summaryDetailLevel) Controls how detailed the compilation summary is.voidsetSyntheticBlockEndMarker(String syntheticBlockEndMarker) voidsetSyntheticBlockStartMarker(String syntheticBlockStartMarker) voidvoidsetTracerOutput(Path out) voidsetTrustedStrings(boolean yes) Some people want to put arbitrary user input into strings, which are then run through the compiler.voidsetTweakProcessing(CompilerOptions.TweakProcessing tweakProcessing) Sets how goog.tweak calls are processed.voidsetTypedAstOutputFile(@Nullable Path file) Sets file to output in-progress TypedAST format to.voidsetUnknownDefinesToIgnore(com.google.common.collect.ImmutableList<String> unknownDefinesToIgnore) voidsetUnusedImportsToRemove(@Nullable com.google.common.collect.ImmutableSet<String> unusedImportsToRemove) voidsetUseOriginalNamesInOutput(boolean useOriginalNamesInOutput) voidsetUseSizeHeuristicToStopOptimizationLoop(boolean mayStopEarly) voidsetUseTypesForLocalOptimization(boolean useTypesForLocalOptimization) voidsetUseTypesForOptimization(boolean useTypesForOptimization) Deprecated.voidsetValidateRequiredInlinings(boolean validateRequireInliningAnnotation) Ensures that functions labelled with `@requireInlining` JSDoc are, in fact, actually inlined by the optimizer.voidsetVariableRenaming(VariableRenamingPolicy variableRenaming) voidsetWarningLevel(DiagnosticGroup type, CheckLevel level) Configure the given type of warning to the given level.voidsetWarningsGuard(ComposeWarningsGuard warningsGuard) voidsetWrapGoogModulesForWhitespaceOnly(boolean enable) voidsetXidHashFunction(Xid.HashFunction xidHashFunction) Sets the hash function to use for XidvoidsetZoneInputPattern(@Nullable Pattern zoneInputPattern) booleanbooleanbooleanbooleanDeprecated.use getPropertyCollapseLevelbooleanbooleanbooleanbooleanbooleanbooleanbooleanWhether the output should contain a 'use strict' directive.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanDo not process goog.booleanbooleanbooleanWhether or not the compiler should wrap apparently side-effect free code to prevent it from being removedbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanShould we run the pass that does replacement of the chrome-specific `chrome.i18n.getMessage()` translatable message definitions?booleanShould we run any form of the `ReplaceMessages` pass?booleanvoidSkip all possible passes, to make the compiler as fast as possible.toString()
-
Constructor Details
-
CompilerOptions
public CompilerOptions()Initializes compiler options. All options are disabled by default.Command-line frontends to the compiler should set these properties like a builder.
-
-
Method Details
-
getAngularPropertyReservedFirstChars
public static com.google.common.collect.ImmutableSet<Character> getAngularPropertyReservedFirstChars() -
getPolymerPropertyReservedFirstChars
public static com.google.common.collect.ImmutableSet<Character> getPolymerPropertyReservedFirstChars() -
shouldRunCrossChunkCodeMotion
public boolean shouldRunCrossChunkCodeMotion() -
shouldRunCrossChunkMethodMotion
public boolean shouldRunCrossChunkMethodMotion() -
getSourceMapOutputPath
-
shouldGatherSourceMapInfo
public boolean shouldGatherSourceMapInfo() -
setAlwaysGatherSourceMapInfo
public void setAlwaysGatherSourceMapInfo(boolean shouldAlwaysGatherSourceMapInfo) -
setBrowserFeaturesetYear
public void setBrowserFeaturesetYear(int year) -
setBrowserFeaturesetYear
public void setBrowserFeaturesetYear(com.google.javascript.jscomp.CompilerOptions.BrowserFeaturesetYear year) -
setInstrumentForCoverageOnly
public void setInstrumentForCoverageOnly(boolean instrumentForCoverageOnly) -
getInstrumentForCoverageOnly
public boolean getInstrumentForCoverageOnly() -
setTypedAstOutputFile
Sets file to output in-progress TypedAST format to. DO NOT USE!The "TypedAST format" is currently a gzipped TypedAst proto but this is not stable.
-
getMergedPrecompiledLibraries
public boolean getMergedPrecompiledLibraries() -
setSkipTranspilationAndCrash
Deprecated. -
setInputSourceMaps
public void setInputSourceMaps(com.google.common.collect.ImmutableMap<String, SourceMapInput> inputSourceMaps) Sets the input sourcemap files, indexed by the JS files they refer to.- Parameters:
inputSourceMaps- the collection of input sourcemap files
-
setInferConst
public void setInferConst(boolean value) -
setIncrementalChecks
-
shouldGenerateTypedExterns
public boolean shouldGenerateTypedExterns() -
setCheckGlobalThisLevel
Deprecated.Deprecated. Please use setWarningLevel(DiagnosticGroups.GLOBAL_THIS, level) instead. -
setNumParallelThreads
public void setNumParallelThreads(int parallelism) Sets the level of parallelism for compilation passes that can exploit multi-threading.Some compiler passes may take advantage of multi-threading, for example, parsing inputs. This sets the level of parallelism. The compiler will not start more than this number of threads.
- Parameters:
parallelism- up to this number of parallel threads may be created.
-
setRenamePrefixNamespaceAssumeCrossChunkNames
public void setRenamePrefixNamespaceAssumeCrossChunkNames(boolean assume) Useful for tests to avoid having to declare two chunks -
shouldCollapseProperties
Deprecated.use getPropertyCollapseLevelFlattens multi-level property names (e.g. a$b = x) -
getPropertyCollapseLevel
-
setCollapseObjectLiterals
public void setCollapseObjectLiterals(boolean enabled) -
getCollapseObjectLiterals
public boolean getCollapseObjectLiterals() -
setNameGenerator
-
setReplaceMessagesWithChromeI18n
public void setReplaceMessagesWithChromeI18n(boolean replaceMessagesWithChromeI18n, String tcProjectId) -
shouldRunReplaceMessagesForChrome
public boolean shouldRunReplaceMessagesForChrome()Should we run the pass that does replacement of the chrome-specific `chrome.i18n.getMessage()` translatable message definitions?This form of l10n is incompatible with our standard `goog.getMsg()` messages.
-
setAssumeForwardDeclaredForMissingTypes
public void setAssumeForwardDeclaredForMissingTypes(boolean assumeForwardDeclaredForMissingTypes) Iftrue, considers all missing types to be forward declared (useful for partial compilation). -
setPreferSingleQuotes
public void setPreferSingleQuotes(boolean enabled) Normally, when there are an equal number of single and double quotes in a string, the compiler will use double quotes. Set this to true to prefer single quotes. -
setTrustedStrings
public void setTrustedStrings(boolean yes) Some people want to put arbitrary user input into strings, which are then run through the compiler. These scripts are then put into HTML. By default, we assume strings are untrusted. If the compiler is run from the command-line, we assume that strings are trusted. -
setPrintSourceAfterEachPass
public void setPrintSourceAfterEachPass(boolean printSource) -
setFilesToPrintAfterEachPassRegexList
-
setChunksToPrintAfterEachPassRegexList
-
setQnameUsesToPrintAfterEachPassList
-
getTracerMode
-
setTracerMode
-
setTracerOutput
-
setProtectHiddenSideEffects
public void setProtectHiddenSideEffects(boolean enable) When enabled, assume that apparently side-effect free code is meaningful. -
shouldProtectHiddenSideEffects
public boolean shouldProtectHiddenSideEffects()Whether or not the compiler should wrap apparently side-effect free code to prevent it from being removed -
setAssumeGettersArePure
public void setAssumeGettersArePure(boolean x) -
getAssumeGettersArePure
public boolean getAssumeGettersArePure() -
setAssumePropertiesAreStaticallyAnalyzable
public void setAssumePropertiesAreStaticallyAnalyzable(boolean x) -
getAssumePropertiesAreStaticallyAnalyzable
public boolean getAssumePropertiesAreStaticallyAnalyzable() -
setAssumeStaticInheritanceIsNotUsed
public void setAssumeStaticInheritanceIsNotUsed(boolean x) -
getAssumeStaticInheritanceIsNotUsed
public boolean getAssumeStaticInheritanceIsNotUsed() -
getConformanceReportingMode
-
setConformanceReportingMode
-
setConformanceRemoveRegexFromPath
-
getConformanceRemoveRegexFromPath
-
setWrapGoogModulesForWhitespaceOnly
public void setWrapGoogModulesForWhitespaceOnly(boolean enable) -
setBadRewriteModulesBeforeTypecheckingThatWeWantToGetRidOf
public void setBadRewriteModulesBeforeTypecheckingThatWeWantToGetRidOf(boolean b) Whether to enable the bad module rewriting before typechecking that we want to get rid of -
setEnableModuleRewriting
public void setEnableModuleRewriting(boolean enable) Experimental option to disable all Closure and ES module and goog.provide rewritingUse at your own risk - disabling module rewriting is not fully tested yet.
-
setPrintConfig
public void setPrintConfig(boolean printConfig) Should the compiler print its configuration options to stderr when they are initialized?Default
false. -
setAllowDynamicImport
public void setAllowDynamicImport(boolean value) Whether to enable support for dynamic import expressions -
getDynamicImportAlias
Set the alias name for dynamic import expressions -
setDynamicImportAlias
Set the alias name for dynamic import expressions -
isRemoveUnusedClassProperties
public boolean isRemoveUnusedClassProperties()- Returns:
- Whether to attempt to remove unused class properties
-
setRemoveUnusedClassProperties
public void setRemoveUnusedClassProperties(boolean removeUnusedClassProperties) - Parameters:
removeUnusedClassProperties- Whether to attempt to remove unused class properties
-
getDefineReplacements
Returns the map of define replacements. -
setDefineToBooleanLiteral
Sets the value of the@definevariable in JS to a boolean literal. -
setDefineToStringLiteral
Sets the value of the@definevariable in JS to a String literal. -
setDefineToNumberLiteral
Sets the value of the@definevariable in JS to a number literal. -
setDefineToDoubleLiteral
Sets the value of the@definevariable in JS to a number literal. -
skipAllCompilerPasses
public void skipAllCompilerPasses()Skip all possible passes, to make the compiler as fast as possible. -
setUnknownDefinesToIgnore
public void setUnknownDefinesToIgnore(com.google.common.collect.ImmutableList<String> unknownDefinesToIgnore) -
addUnknownDefinesToIgnore
public void addUnknownDefinesToIgnore(com.google.common.collect.ImmutableList<String> unknownDefinesToIgnore) -
setWarningLevel
Configure the given type of warning to the given level. -
resetWarningsGuard
public void resetWarningsGuard()Reset the warnings guard. -
addWarningsGuard
Add a guard to the set of warnings guards. -
setRenamingPolicy
public void setRenamingPolicy(VariableRenamingPolicy newVariablePolicy, PropertyRenamingPolicy newPropertyPolicy) Sets the variable and property renaming policies for the compiler, in a way that clears warnings about the renaming policy being uninitialized from flags. -
setReplaceIdGenerators
public void setReplaceIdGenerators(boolean replaceIdGenerators) - Parameters:
replaceIdGenerators- the replaceIdGenerators to set
-
setIdGenerators
Sets the id generators to replace. -
setIdGenerators
Sets the id generators to replace. -
setIdGeneratorsMap
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. -
setXidHashFunction
Sets the hash function to use for Xid -
setChunkIdHashFunction
Sets the hash function to use for chunk ID generation -
setInlineFunctions
Set the function inlining policy for the compiler. -
getInlineFunctionsLevel
Get the function inlining policy for the compiler. -
setMaxFunctionSizeAfterInlining
public void setMaxFunctionSizeAfterInlining(int funAstSize) -
setInlineVariables
public void setInlineVariables(boolean inlineVariables) -
shouldInlineVariables
public boolean shouldInlineVariables() -
setInlineVariables
Set the variable inlining policy for the compiler. -
setInlineProperties
public void setInlineProperties(boolean enable) Set the function inlining policy for the compiler. -
shouldInlineProperties
public boolean shouldInlineProperties() -
setRemoveUnusedVariables
Set the variable removal policy for the compiler. -
shouldRemoveUnusedVariables
public boolean shouldRemoveUnusedVariables() -
shouldRemoveUnusedLocalVariables
public boolean shouldRemoveUnusedLocalVariables() -
setReplaceStringsConfiguration
public void setReplaceStringsConfiguration(String placeholderToken, List<String> functionDescriptors) Sets the functions whose debug strings to replace. -
setRemoveAbstractMethods
public void setRemoveAbstractMethods(boolean remove) -
setRemoveClosureAsserts
public void setRemoveClosureAsserts(boolean remove) -
setRemoveJ2clAsserts
public void setRemoveJ2clAsserts(boolean remove) -
setColorizeErrorOutput
public void setColorizeErrorOutput(boolean colorizeErrorOutput) -
shouldColorizeErrorOutput
public boolean shouldColorizeErrorOutput() -
setChecksOnly
public void setChecksOnly(boolean checksOnly) -
setOutputJs
-
setGenerateExports
public void setGenerateExports(boolean generateExports) -
shouldGenerateExports
public boolean shouldGenerateExports() -
setExportLocalPropertyDefinitions
public void setExportLocalPropertyDefinitions(boolean export) -
shouldExportLocalPropertyDefinitions
public boolean shouldExportLocalPropertyDefinitions() -
setAngularPass
public void setAngularPass(boolean angularPass) -
setPolymerVersion
-
setChromePass
public void setChromePass(boolean chromePass) -
isChromePassEnabled
public boolean isChromePassEnabled() -
setJ2clPass
-
setJ2clMinifierEnabled
public void setJ2clMinifierEnabled(boolean enabled) -
setJ2clMinifierPruningManifest
-
setCodingConvention
-
getCodingConvention
-
setDependencyOptions
Sets the dependency management options. -
getDependencyOptions
-
setSummaryDetailLevel
public void setSummaryDetailLevel(int summaryDetailLevel) Controls how detailed the compilation summary is. Values: 0 (never print summary), 1 (print summary only if there are errors or warnings), 2 (print summary if type checking is on), 3 (always print summary). The default level is 1 -
setExtraAnnotationNames
-
setOutputCharset
Sets the output charset. -
setTweakProcessing
Sets how goog.tweak calls are processed. -
getTweakProcessing
-
setLanguage
Sets ECMAScript version to use. -
setLanguageIn
Sets ECMAScript version to use for the input. If you are not transpiling from one version to another, use #setLanguage instead. -
getLanguageIn
-
setLanguageOut
Sets ECMAScript version to use for the output.If you are not transpiling from one version to another, use #setLanguage instead.
If you you need something more fine grained (e.g. "ES2017 without modules") use #setOutputFeatureSet.
-
legacySetOutputFeatureSet
-
getOutputFeatureSet
Gets the set of features that can appear in the output. -
setExperimentalForceTranspiles
public void setExperimentalForceTranspiles(CompilerOptions.ExperimentalForceTranspile... experimentalForceTranspile) -
getExperimentalForceTranspiles
public com.google.common.collect.ImmutableList<CompilerOptions.ExperimentalForceTranspile> getExperimentalForceTranspiles() -
needsTranspilationFrom
-
needsTranspilationOf
-
setEnvironment
Set which set of builtin externs to use. -
getEnvironment
-
setErrorHandler
Set a custom handler for warnings and errors.This is mostly used for piping the warnings and errors to a file behind the scenes.
If you want to filter warnings and errors, you should use a WarningsGuard.
If you want to change how warnings and errors are reported to the user, you should set a ErrorManager on the Compiler. An ErrorManager is intended to summarize the errors for a single compile job.
-
setInferTypes
public void setInferTypes(boolean enable) If true, enables type inference. If checkTypes is enabled, this flag has no effect. -
getInferTypes
public boolean getInferTypes()Gets the inferTypes flag. Note that if checkTypes is enabled, this flag is ignored when configuring the compiler. -
setNewTypeInference
Deprecated.This is a no-op. -
isTypecheckingEnabled
public boolean isTypecheckingEnabled()- Returns:
- true if either typechecker is ON.
-
assumeStrictThis
public boolean assumeStrictThis()- Returns:
- Whether assumeStrictThis is set.
-
setAssumeStrictThis
public void setAssumeStrictThis(boolean enable) If true, enables enables additional optimizations. -
assumeClosuresOnlyCaptureReferences
public boolean assumeClosuresOnlyCaptureReferences()- Returns:
- Whether assumeClosuresOnlyCaptureReferences is set.
-
setAssumeClosuresOnlyCaptureReferences
public void setAssumeClosuresOnlyCaptureReferences(boolean enable) Whether to assume closures capture only what they reference. This allows more aggressive function inlining. -
setPropertiesThatMustDisambiguate
Sets the list of properties that we report property invalidation errors for. -
getPropertiesThatMustDisambiguate
-
setValidateRequiredInlinings
public void setValidateRequiredInlinings(boolean validateRequireInliningAnnotation) Ensures that functions labelled with `@requireInlining` JSDoc are, in fact, actually inlined by the optimizer.This may only be set when using advanced optimizations, as otherwise the compiler is unable to do most inlining. The compiler will throw an exception during initialization if this is set to true, but advanced optimizations are not being used.
-
setPreserveDetailedSourceInfo
public void setPreserveDetailedSourceInfo(boolean preserveDetailedSourceInfo) -
setPreserveNonJSDocComments
public void setPreserveNonJSDocComments(boolean preserveNonJSDocComments) -
setContinueAfterErrors
public void setContinueAfterErrors(boolean continueAfterErrors) -
setParseJsDocDocumentation
Enables or disables the parsing of JSDoc documentation, and optionally also the preservation of all whitespace and formatting within a JSDoc comment. By default, whitespace is collapsed for all comments except @license and @preserve blocks, -
isParseJsDocDocumentation
Checks JSDoc documentation will be parsed.- Returns:
- True when JSDoc documentation will be parsed, false if not.
-
setSkipNonTranspilationPasses
public void setSkipNonTranspilationPasses(boolean skipNonTranspilationPasses) Skip all passes (other than transpilation, if requested). Don't inject any runtime libraries (unless explicitly requested) or do any checks/optimizations (this is useful for per-file transpilation). -
setDevMode
-
setCheckDeterminism
public void setCheckDeterminism(boolean checkDeterminism) -
getCheckDeterminism
public boolean getCheckDeterminism() -
setMessageBundle
-
getMessageBundle
-
setCheckSymbols
public void setCheckSymbols(boolean checkSymbols) -
getCheckSymbols
public boolean getCheckSymbols() -
setCheckSuspiciousCode
public void setCheckSuspiciousCode(boolean checkSuspiciousCode) -
getCheckSuspiciousCode
public boolean getCheckSuspiciousCode() -
setCheckTypes
public void setCheckTypes(boolean checkTypes) -
getCheckTypes
public boolean getCheckTypes() -
setFoldConstants
public void setFoldConstants(boolean foldConstants) -
shouldFoldConstants
public boolean shouldFoldConstants() -
setDeadAssignmentElimination
public void setDeadAssignmentElimination(boolean deadAssignmentElimination) -
shouldRunDeadAssignmentElimination
public boolean shouldRunDeadAssignmentElimination() -
setDeadPropertyAssignmentElimination
public void setDeadPropertyAssignmentElimination(boolean deadPropertyAssignmentElimination) -
shouldRunDeadPropertyAssignmentElimination
public boolean shouldRunDeadPropertyAssignmentElimination() -
setInlineConstantVars
public void setInlineConstantVars(boolean inlineConstantVars) -
shouldInlineConstantVars
public boolean shouldInlineConstantVars() -
setCrossChunkCodeMotion
public void setCrossChunkCodeMotion(boolean crossChunkCodeMotion) -
setCrossChunkCodeMotionNoStubMethods
public void setCrossChunkCodeMotionNoStubMethods(boolean crossChunkCodeMotionNoStubMethods) -
setParentChunkCanSeeSymbolsDeclaredInChildren
public void setParentChunkCanSeeSymbolsDeclaredInChildren(boolean parentChunkCanSeeSymbolsDeclaredInChildren) -
setCrossChunkMethodMotion
public void setCrossChunkMethodMotion(boolean crossChunkMethodMotion) -
setCoalesceVariableNames
public void setCoalesceVariableNames(boolean coalesceVariableNames) -
shouldCoalesceVariableNames
public boolean shouldCoalesceVariableNames() -
setInlineLocalVariables
public void setInlineLocalVariables(boolean inlineLocalVariables) -
setFlowSensitiveInlineVariables
public void setFlowSensitiveInlineVariables(boolean enabled) -
setSmartNameRemoval
public void setSmartNameRemoval(boolean smartNameRemoval) -
getSmartNameRemoval
public boolean getSmartNameRemoval() -
setExtractPrototypeMemberDeclarations
public void setExtractPrototypeMemberDeclarations(boolean enabled) -
setExtractPrototypeMemberDeclarations
public void setExtractPrototypeMemberDeclarations(CompilerOptions.ExtractPrototypeMemberDeclarationsMode mode) -
setRemoveUnusedPrototypeProperties
public void setRemoveUnusedPrototypeProperties(boolean enabled) -
shouldRemoveUnusedPrototypeProperties
public boolean shouldRemoveUnusedPrototypeProperties() -
setCollapseVariableDeclarations
public void setCollapseVariableDeclarations(boolean enabled) -
shouldCollapseVariableDeclarations
public boolean shouldCollapseVariableDeclarations() -
setCollapseAnonymousFunctions
public void setCollapseAnonymousFunctions(boolean enabled) -
shouldCollapseAnonymousFunctions
public boolean shouldCollapseAnonymousFunctions() -
setAliasStringsMode
-
getAliasStringsMode
-
setOutputJsStringUsage
public void setOutputJsStringUsage(boolean outputJsStringUsage) -
setConvertToDottedProperties
public void setConvertToDottedProperties(boolean convertToDottedProperties) -
shouldConvertToDottedProperties
public boolean shouldConvertToDottedProperties() -
setUseTypesForLocalOptimization
public void setUseTypesForLocalOptimization(boolean useTypesForLocalOptimization) -
shouldUseTypesForLocalOptimization
public boolean shouldUseTypesForLocalOptimization() -
setUseTypesForOptimization
Deprecated. -
setRewriteFunctionExpressions
public void setRewriteFunctionExpressions(boolean rewriteFunctionExpressions) -
shouldRewriteFunctionExpressions
public boolean shouldRewriteFunctionExpressions() -
setOptimizeCalls
public void setOptimizeCalls(boolean optimizeCalls) -
shouldOptimizeCalls
public boolean shouldOptimizeCalls() -
getOptimizeESClassConstructors
public boolean getOptimizeESClassConstructors() -
setOptimizeESClassConstructors
public void setOptimizeESClassConstructors(boolean optimizeESClassConstructors) -
setVariableRenaming
-
getVariableRenaming
-
setPropertyRenaming
-
getPropertyRenaming
-
setLabelRenaming
public void setLabelRenaming(boolean labelRenaming) -
shouldRenameLabels
public boolean shouldRenameLabels() -
setReserveRawExports
public void setReserveRawExports(boolean reserveRawExports) -
setPreferStableNames
public void setPreferStableNames(boolean preferStableNames) -
setGeneratePseudoNames
public void setGeneratePseudoNames(boolean generatePseudoNames) -
shouldGeneratePseudoNames
public boolean shouldGeneratePseudoNames() -
setPropertyRenamingOnlyCompilationMode
public void setPropertyRenamingOnlyCompilationMode(boolean propertyRenamingOnlyCompilationMode) -
isPropertyRenamingOnlyCompilationMode
public boolean isPropertyRenamingOnlyCompilationMode() -
setRenamePrefix
-
getRenamePrefixNamespace
-
setRenamePrefixNamespace
-
setCollapsePropertiesLevel
-
setCollapseProperties
Deprecated. -
setDevirtualizeMethods
public void setDevirtualizeMethods(boolean devirtualizeMethods) -
shouldDevirtualizeMethods
public boolean shouldDevirtualizeMethods() -
setComputeFunctionSideEffects
public void setComputeFunctionSideEffects(boolean computeFunctionSideEffects) -
shouldComputeFunctionSideEffects
public boolean shouldComputeFunctionSideEffects() -
setDisambiguateProperties
public void setDisambiguateProperties(boolean disambiguateProperties) -
shouldDisambiguateProperties
public boolean shouldDisambiguateProperties() -
setAmbiguateProperties
public void setAmbiguateProperties(boolean ambiguateProperties) -
shouldAmbiguateProperties
public boolean shouldAmbiguateProperties() -
setInputVariableMap
-
setInputPropertyMap
-
setExportTestFunctions
public void setExportTestFunctions(boolean exportTestFunctions) -
setSyntheticBlockStartMarker
-
setSyntheticBlockEndMarker
-
setLocale
-
getLocale
-
setDoLateLocalization
public void setDoLateLocalization(boolean doLateLocalization) -
doLateLocalization
public boolean doLateLocalization() -
shouldRunReplaceMessagesPass
public boolean shouldRunReplaceMessagesPass()Should we run any form of the `ReplaceMessages` pass? -
setMarkAsCompiled
public void setMarkAsCompiled(boolean markAsCompiled) -
setClosurePass
public void setClosurePass(boolean closurePass) -
getClosurePass
public boolean getClosurePass() -
setPreserveClosurePrimitives
public void setPreserveClosurePrimitives(boolean preserveClosurePrimitives) Preserve closure primitives.For now, this only preserves goog.provide(), goog.require() and goog.module() calls.
-
shouldPreservesGoogProvidesAndRequires
public boolean shouldPreservesGoogProvidesAndRequires() -
shouldPreserveGoogModule
public boolean shouldPreserveGoogModule() -
shouldPreserveGoogLibraryPrimitives
public boolean shouldPreserveGoogLibraryPrimitives()Do not process goog. intrinsics, such as goog.getCssName(). -
setPreserveTypeAnnotations
public void setPreserveTypeAnnotations(boolean preserveTypeAnnotations) -
setGentsMode
public void setGentsMode(boolean gentsMode) -
setGatherCssNames
public void setGatherCssNames(boolean gatherCssNames) -
setStripTypes
Deprecated.StripCode is deprecated. Code should be designed to be removed by other means. -
getStripTypes
Deprecated.StripCode is deprecated. Code should be designed to be removed by other means. -
setStripNameSuffixes
Deprecated.StripCode is deprecated. Code should be designed to be removed by other means. -
setStripNamePrefixes
Deprecated.StripCode is deprecated. Code should be designed to be removed by other means. -
addCustomPass
-
setDefineReplacements
-
getEnableZonesDefineName
-
setEnableZonesDefineName
-
getZoneInputPattern
-
setZoneInputPattern
-
setRewriteGlobalDeclarationsForTryCatchWrapping
public void setRewriteGlobalDeclarationsForTryCatchWrapping(boolean rewrite) -
shouldRewriteGlobalDeclarationsForTryCatchWrapping
public boolean shouldRewriteGlobalDeclarationsForTryCatchWrapping() -
setCssRenamingMap
-
getCssRenamingMap
-
setCssRenamingSkiplist
-
setReplaceStringsFunctionDescriptions
-
setReplaceStringsPlaceholderToken
-
setClosureUnawareMode
Opts into experimental support for transpiling/optimizing @closureUnaware code blocks, rather than just passing them through compilation unchanged. -
setPrettyPrint
public void setPrettyPrint(boolean prettyPrint) -
isPrettyPrint
public boolean isPrettyPrint() -
setLineBreak
public void setLineBreak(boolean lineBreak) -
setPrintInputDelimiter
public void setPrintInputDelimiter(boolean printInputDelimiter) -
setInputDelimiter
-
getInputDelimiter
-
setDebugLogDirectory
-
getDebugLogDirectory
-
setDebugLogFilter
-
getDebugLogFilter
-
setQuoteKeywordProperties
public void setQuoteKeywordProperties(boolean quoteKeywordProperties) -
shouldQuoteKeywordProperties
public boolean shouldQuoteKeywordProperties() -
setErrorFormat
-
getErrorFormat
-
setWarningsGuard
-
setLineLengthThreshold
public void setLineLengthThreshold(int lineLengthThreshold) -
getLineLengthThreshold
public int getLineLengthThreshold() -
setUseOriginalNamesInOutput
public void setUseOriginalNamesInOutput(boolean useOriginalNamesInOutput) -
getUseOriginalNamesInOutput
public boolean getUseOriginalNamesInOutput() -
setExternExportsPath
-
getExternExportsPath
-
setSourceMapOutputPath
-
setApplyInputSourceMaps
public void setApplyInputSourceMaps(boolean applyInputSourceMaps) -
setResolveSourceMapAnnotations
public void setResolveSourceMapAnnotations(boolean resolveSourceMapAnnotations) -
setSourceMapIncludeSourcesContent
public void setSourceMapIncludeSourcesContent(boolean sourceMapIncludeSourcesContent) -
setParseInlineSourceMaps
public void setParseInlineSourceMaps(boolean parseInlineSourceMaps) -
setSourceMapDetailLevel
-
setSourceMapFormat
-
setSourceMapLocationMappings
public void setSourceMapLocationMappings(List<? extends SourceMap.LocationMapping> sourceMapLocationMappings) -
setProcessCommonJSModules
public void setProcessCommonJSModules(boolean processCommonJSModules) Rewrites CommonJS modules so that modules can be concatenated together, by renaming all globals to avoid conflicting with other modules. -
getProcessCommonJSModules
public boolean getProcessCommonJSModules() -
setEs6ModuleTranspilation
-
getEs6ModuleTranspilation
-
setCommonJSModulePathPrefix
Sets a path prefix for CommonJS modules (maps tosetModuleRoots(List)). -
setModuleRoots
Sets the module roots. -
setRewritePolyfills
public void setRewritePolyfills(boolean rewritePolyfills) Sets whether to rewrite polyfills. -
getRewritePolyfills
public boolean getRewritePolyfills() -
setIsolatePolyfills
public void setIsolatePolyfills(boolean isolatePolyfills) Sets whether to isolate polyfills from the global scope. -
getIsolatePolyfills
public boolean getIsolatePolyfills() -
setInjectPolyfillsNewerThan
-
setInstrumentAsyncContext
public void setInstrumentAsyncContext(boolean instrumentAsyncContext) Sets whether to transpile async functions and generators for AsyncContext. -
getInstrumentAsyncContext
public boolean getInstrumentAsyncContext() -
setEs6SubclassTranspilation
public void setEs6SubclassTranspilation(CompilerOptions.Es6SubclassTranspilation es6SubclassTranspilation) -
getEs6SubclassTranspilation
-
setForceLibraryInjection
Sets list of libraries to always inject, even if not needed. -
setPreventLibraryInjection
public void setPreventLibraryInjection(boolean preventLibraryInjection) Sets the set of libraries to never inject, even if required. -
setRuntimeLibraryMode
-
setUnusedImportsToRemove
public void setUnusedImportsToRemove(@Nullable com.google.common.collect.ImmutableSet<String> unusedImportsToRemove) -
getUnusedImportsToRemove
-
setInstrumentForCoverageOption
public void setInstrumentForCoverageOption(CompilerOptions.InstrumentOption instrumentForCoverageOption) -
getInstrumentForCoverageOption
-
setProductionInstrumentationArrayName
Sets the name for the global array which is used by PRODUCTION instrumentation. The array is declared during the instrumentation pass with the name provided through this setter. -
getProductionInstrumentationArrayName
-
getConformanceConfigs
public final com.google.common.collect.ImmutableList<com.google.javascript.jscomp.ConformanceConfig> getConformanceConfigs() -
setConformanceConfig
@Deprecated public void setConformanceConfig(com.google.javascript.jscomp.ConformanceConfig conformanceConfig) Deprecated.See go/binary-level-conformance-deprecated.Both enable and configure conformance checks, if non-null. -
setConformanceConfigs
@Deprecated public void setConformanceConfigs(List<com.google.javascript.jscomp.ConformanceConfig> configs) Deprecated.See go/binary-level-conformance-deprecated.Both enable and configure conformance checks, if non-null. -
clearConformanceConfigs
public void clearConformanceConfigs() -
shouldEmitUseStrict
public boolean shouldEmitUseStrict()Whether the output should contain a 'use strict' directive. -
setEmitUseStrict
-
getModuleResolutionMode
-
setModuleResolutionMode
-
getBrowserResolverPrefixReplacements
-
setBrowserResolverPrefixReplacements
-
setPathEscaper
-
getPathEscaper
-
getPackageJsonEntryNames
-
setPackageJsonEntryNames
-
setUseSizeHeuristicToStopOptimizationLoop
public void setUseSizeHeuristicToStopOptimizationLoop(boolean mayStopEarly) -
setMaxOptimizationLoopIterations
public void setMaxOptimizationLoopIterations(int maxIterations) -
getChunkOutputType
-
setChunkOutputType
-
setStrictMessageReplacement
public void setStrictMessageReplacement(boolean strictMessageReplacement) -
getStrictMessageReplacement
public boolean getStrictMessageReplacement() -
toString
-
expectStrictModeInput
public boolean expectStrictModeInput() -
setStrictModeInput
-
getPropertyReservedNamingFirstChars
-
getPropertyReservedNamingNonFirstChars
-