Function isCompilerOptionEnabled
is Compiler Option Enabled ( options , option ) : boolean
Parameters
options : CompilerOptions
option : "allowImportingTsExtensions" | "allowJs" | "allowArbitraryExtensions" | "allowSyntheticDefaultImports" | "allowUmdGlobalAccess" | "allowUnreachableCode" | "allowUnusedLabels" | "alwaysStrict" | "checkJs" | "declaration" | "declarationMap" | "emitDeclarationOnly" | "disableSizeLimit" | "disableSourceOfProjectReferenceRedirect" | "disableSolutionSearching" | "disableReferencedProjectLoad" | "downlevelIteration" | "emitBOM" | "emitDecoratorMetadata" | "exactOptionalPropertyTypes" | "experimentalDecorators" | "forceConsistentCasingInFileNames" | "importHelpers" | "inlineSourceMap" | "inlineSources" | "isolatedModules" | "keyofStringsOnly" | "noEmit" | "noEmitHelpers" | "noEmitOnError" | "noErrorTruncation" | "noFallthroughCasesInSwitch" | "noImplicitAny" | "noImplicitReturns" | "noImplicitThis" | "noStrictGenericChecks" | "noUnusedLocals" | "noUnusedParameters" | "noImplicitUseStrict" | "noPropertyAccessFromIndexSignature" | "assumeChangesOnlyAffectDirectDependencies" | "noLib" | "noResolve" | "noUncheckedIndexedAccess" | "preserveConstEnums" | "noImplicitOverride" | "preserveSymlinks" | "preserveValueImports" | "composite" | "incremental" | "removeComments" | "resolvePackageJsonExports" | "resolvePackageJsonImports" | "skipLibCheck" | "skipDefaultLibCheck" | "sourceMap" | "strict" | "strictFunctionTypes" | "strictBindCallApply" | "strictNullChecks" | "strictPropertyInitialization" | "stripInternal" | "suppressExcessPropertyErrors" | "suppressImplicitAnyIndexErrors" | "traceResolution" | "useUnknownInCatchVariables" | "resolveJsonModule" | "verbatimModuleSyntax" | "esModuleInterop" | "useDefineForClassFields"
Returns boolean
Checks if a given compiler option is enabled. It handles dependencies of options, e.g.
declaration
is implicitly enabled bycomposite
orstrictNullChecks
is enabled bystrict
. However, it does not check dependencies that are already checked and reported as errors, e.g.checkJs
withoutallowJs
. This function only handles boolean flags.