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.
declarationis implicitly enabled bycompositeorstrictNullChecksis enabled bystrict. However, it does not check dependencies that are already checked and reported as errors, e.g.checkJswithoutallowJs. This function only handles boolean flags.