> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/Microsoft/typescript/llms.txt
> Use this file to discover all available pages before exploring further.

# Compiler Options Reference

> Complete reference of all TypeScript compiler options

## Overview

This page provides a comprehensive reference for all TypeScript compiler options extracted from the TypeScript source code (`src/compiler/commandLineParser.ts`).

<Info>
  All compiler options are specified in the `compilerOptions` section of your `tsconfig.json` file.
</Info>

## Language and Environment

Options that affect the JavaScript language version and runtime environment.

### target

<ParamField path="target" type="string" default="ES3">
  Set the JavaScript language version for emitted JavaScript and include compatible library declarations.

  **Type:** `"es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020" | "es2021" | "es2022" | "es2023" | "es2024" | "es2025" | "esnext"`

  **Shorthand:** `-t`

  **Source:** `src/compiler/commandLineParser.ts:572-602`
</ParamField>

```json theme={null}
{
  "compilerOptions": {
    "target": "es2020"
  }
}
```

### lib

<ParamField path="lib" type="string[]">
  Specify a set of bundled library declaration files that describe the target runtime environment.

  **Common values:** `es5`, `es2015`, `es2020`, `esnext`, `dom`, `dom.iterable`, `webworker`, `scripthost`

  **Source:** `src/compiler/commandLineParser.ts:704-717`
</ParamField>

```json theme={null}
{
  "compilerOptions": {
    "lib": ["es2020", "dom", "dom.iterable"]
  }
}
```

<Accordion title="All available lib options">
  **JavaScript versions:**

  * `es5`, `es6`/`es2015`, `es2016`, `es2017`, `es2018`, `es2019`, `es2020`, `es2021`, `es2022`, `es2023`, `es2024`, `es2025`, `esnext`

  **Host environments:**

  * `dom`, `dom.iterable`, `dom.asynciterable`
  * `webworker`, `webworker.importscripts`, `webworker.iterable`, `webworker.asynciterable`
  * `scripthost`

  **Feature-specific libraries:** Over 50 feature-specific libraries available (e.g., `es2015.promise`, `es2020.bigint`, `esnext.decorators`)

  Source: `src/compiler/commandLineParser.ts:151-265`
</Accordion>

### jsx

<ParamField path="jsx" type="string">
  Specify what JSX code is generated.

  **Type:** `"preserve" | "react-native" | "react" | "react-jsx" | "react-jsxdev"`

  **Source:** `src/compiler/commandLineParser.ts:740-755`
</ParamField>

```json theme={null}
{
  "compilerOptions": {
    "jsx": "react-jsx"
  }
}
```

### jsxFactory

<ParamField path="jsxFactory" type="string" default="React.createElement">
  Specify the JSX factory function used when targeting React JSX emit.

  **Source:** `src/compiler/commandLineParser.ts:1336-1341`
</ParamField>

### jsxFragmentFactory

<ParamField path="jsxFragmentFactory" type="string" default="React.Fragment">
  Specify the JSX Fragment reference used for fragments when targeting React JSX emit.

  **Source:** `src/compiler/commandLineParser.ts:1343-1348`
</ParamField>

### jsxImportSource

<ParamField path="jsxImportSource" type="string" default="react">
  Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.

  **Source:** `src/compiler/commandLineParser.ts:1350-1360`
</ParamField>

### moduleDetection

<ParamField path="moduleDetection" type="string" default="auto">
  Control what method is used to detect module-format JS files.

  **Type:** `"auto" | "legacy" | "force"`

  **Source:** `src/compiler/commandLineParser.ts:1671-1682`
</ParamField>

### experimentalDecorators

<ParamField path="experimentalDecorators" type="boolean" default="false">
  Enable experimental support for legacy experimental decorators.

  **Source:** `src/compiler/commandLineParser.ts:1314-1322`
</ParamField>

### emitDecoratorMetadata

<ParamField path="emitDecoratorMetadata" type="boolean" default="false">
  Emit design-type metadata for decorated declarations in source files.

  **Source:** `src/compiler/commandLineParser.ts:1324-1332`
</ParamField>

### noLib

<ParamField path="noLib" type="boolean" default="false">
  Disable including any library files including the default lib.d.ts.

  **Source:** `src/compiler/commandLineParser.ts:1448-1457`
</ParamField>

### useDefineForClassFields

<ParamField path="useDefineForClassFields" type="boolean" default="true for ES2022+">
  Emit ECMAScript-standard-compliant class fields.

  **Source:** `src/compiler/commandLineParser.ts:1632-1640`
</ParamField>

## Modules

Options that affect module resolution and output.

### module

<ParamField path="module" type="string">
  Specify what module code is generated.

  **Type:** `"none" | "commonjs" | "amd" | "system" | "umd" | "es6" | "es2015" | "es2020" | "es2022" | "esnext" | "node16" | "nodenext" | "preserve"`

  **Shorthand:** `-m`

  **Source:** `src/compiler/commandLineParser.ts:605-635`
</ParamField>

```json theme={null}
{
  "compilerOptions": {
    "module": "NodeNext"
  }
}
```

### moduleResolution

<ParamField path="moduleResolution" type="string">
  Specify how TypeScript looks up a file from a given module specifier.

  **Type:** `"node10" | "node" | "classic" | "node16" | "nodenext" | "bundler"`

  **Default:** `"nodenext"` if module is `nodenext`, `"node16"` if module is `node16`, otherwise `"bundler"`

  **Source:** `src/compiler/commandLineParser.ts:1097-1114`
</ParamField>

```json theme={null}
{
  "compilerOptions": {
    "moduleResolution": "bundler"
  }
}
```

### baseUrl

<ParamField path="baseUrl" type="string">
  Specify the base directory to resolve non-relative module names.

  **Source:** `src/compiler/commandLineParser.ts:1116-1122`
</ParamField>

### paths

<ParamField path="paths" type="object">
  Specify a set of entries that re-map imports to additional lookup locations.

  **Source:** `src/compiler/commandLineParser.ts:1126-1134`
</ParamField>

```json theme={null}
{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["src/*"],
      "@shared/*": ["../shared/src/*"]
    }
  }
}
```

### rootDir

<ParamField path="rootDir" type="string">
  Specify the root folder within your source files.

  **Default:** Computed from the list of input files

  **Source:** `src/compiler/commandLineParser.ts:782-792`
</ParamField>

### rootDirs

<ParamField path="rootDirs" type="string[]">
  Allow multiple folders to be treated as one when resolving modules.

  **Source:** `src/compiler/commandLineParser.ts:1138-1152`
</ParamField>

### typeRoots

<ParamField path="typeRoots" type="string[]">
  Specify multiple folders that act like `./node_modules/@types`.

  **Source:** `src/compiler/commandLineParser.ts:1154-1165`
</ParamField>

### types

<ParamField path="types" type="string[]">
  Specify type package names to be included without being referenced in a source file.

  **Source:** `src/compiler/commandLineParser.ts:1167-1178`
</ParamField>

```json theme={null}
{
  "compilerOptions": {
    "types": ["node", "jest"]
  }
}
```

### resolveJsonModule

<ParamField path="resolveJsonModule" type="boolean" default="false">
  Enable importing .json files.

  **Source:** `src/compiler/commandLineParser.ts:1362-1368`
</ParamField>

### resolvePackageJsonExports

<ParamField path="resolvePackageJsonExports" type="boolean" default="true for node16/nodenext/bundler">
  Use the package.json 'exports' field when resolving package imports.

  **Source:** `src/compiler/commandLineParser.ts:1247-1253`
</ParamField>

### resolvePackageJsonImports

<ParamField path="resolvePackageJsonImports" type="boolean" default="true for node16/nodenext/bundler">
  Use the package.json 'imports' field when resolving imports.

  **Source:** `src/compiler/commandLineParser.ts:1255-1261`
</ParamField>

### customConditions

<ParamField path="customConditions" type="string[]">
  Conditions to set in addition to the resolver-specific defaults when resolving imports.

  **Source:** `src/compiler/commandLineParser.ts:1263-1272`
</ParamField>

### moduleSuffixes

<ParamField path="moduleSuffixes" type="string[]">
  List of file name suffixes to search when resolving a module.

  **Source:** `src/compiler/commandLineParser.ts:1216-1226`
</ParamField>

### allowImportingTsExtensions

<ParamField path="allowImportingTsExtensions" type="boolean" default="false">
  Allow imports to include TypeScript file extensions. Requires `--moduleResolution bundler` and either `--noEmit` or `--emitDeclarationOnly`.

  **Source:** `src/compiler/commandLineParser.ts:1228-1236`
</ParamField>

### rewriteRelativeImportExtensions

<ParamField path="rewriteRelativeImportExtensions" type="boolean" default="false">
  Rewrite `.ts`, `.tsx`, `.mts`, and `.cts` file extensions in relative import paths to their JavaScript equivalent in output files.

  **Source:** `src/compiler/commandLineParser.ts:1238-1245`
</ParamField>

### allowArbitraryExtensions

<ParamField path="allowArbitraryExtensions" type="boolean" default="false">
  Enable importing files with any extension, provided a declaration file is present.

  **Source:** `src/compiler/commandLineParser.ts:1370-1376`
</ParamField>

### noResolve

<ParamField path="noResolve" type="boolean" default="false">
  Disallow `import`s, `require`s, or `<reference>`s from expanding the number of files TypeScript should add to a project.

  **Source:** `src/compiler/commandLineParser.ts:1459-1468`
</ParamField>

### noUncheckedSideEffectImports

<ParamField path="noUncheckedSideEffectImports" type="boolean" default="true">
  Check side effect imports.

  **Source:** `src/compiler/commandLineParser.ts:1274-1281`
</ParamField>

## Emit

Options that affect JavaScript emit.

### outFile

<ParamField path="outFile" type="string">
  Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output.

  **Source:** `src/compiler/commandLineParser.ts:757-768`
</ParamField>

### outDir

<ParamField path="outDir" type="string">
  Specify an output folder for all emitted files.

  **Source:** `src/compiler/commandLineParser.ts:770-780`
</ParamField>

```json theme={null}
{
  "compilerOptions": {
    "outDir": "./dist"
  }
}
```

### declaration

<ParamField path="declaration" type="boolean" default="false (true if composite is set)">
  Generate .d.ts files from TypeScript and JavaScript files in your project.

  **Shorthand:** `-d`

  **Source:** `src/compiler/commandLineParser.ts:477-487`
</ParamField>

### declarationMap

<ParamField path="declarationMap" type="boolean" default="false">
  Create sourcemaps for d.ts files.

  **Source:** `src/compiler/commandLineParser.ts:489-497`
</ParamField>

### declarationDir

<ParamField path="declarationDir" type="string">
  Specify the output directory for generated declaration files.

  **Source:** `src/compiler/commandLineParser.ts:1548-1558`
</ParamField>

### emitDeclarationOnly

<ParamField path="emitDeclarationOnly" type="boolean" default="false">
  Only output d.ts files and not JavaScript files.

  **Source:** `src/compiler/commandLineParser.ts:499-508`
</ParamField>

### sourceMap

<ParamField path="sourceMap" type="boolean" default="false">
  Create source map files for emitted JavaScript files.

  **Source:** `src/compiler/commandLineParser.ts:510-518`
</ParamField>

### inlineSourceMap

<ParamField path="inlineSourceMap" type="boolean" default="false">
  Include sourcemap files inside the emitted JavaScript.

  **Source:** `src/compiler/commandLineParser.ts:520-527`
</ParamField>

### sourceRoot

<ParamField path="sourceRoot" type="string">
  Specify the root path for debuggers to find the reference source code.

  **Source:** `src/compiler/commandLineParser.ts:1285-1292`
</ParamField>

### mapRoot

<ParamField path="mapRoot" type="string">
  Specify the location where debugger should locate map files instead of generated locations.

  **Source:** `src/compiler/commandLineParser.ts:1294-1301`
</ParamField>

### inlineSources

<ParamField path="inlineSources" type="boolean" default="false">
  Include source code in the sourcemaps inside the emitted JavaScript.

  **Source:** `src/compiler/commandLineParser.ts:1303-1310`
</ParamField>

### removeComments

<ParamField path="removeComments" type="boolean" default="false">
  Disable emitting comments.

  **Source:** `src/compiler/commandLineParser.ts:817-825`
</ParamField>

### noEmit

<ParamField path="noEmit" type="boolean" default="false">
  Disable emitting files from a compilation.

  **Source:** `src/compiler/commandLineParser.ts:539-546`
</ParamField>

### noEmitOnError

<ParamField path="noEmitOnError" type="boolean" default="false">
  Disable emitting files if any type checking errors are reported.

  **Source:** `src/compiler/commandLineParser.ts:1529-1537`
</ParamField>

### noEmitHelpers

<ParamField path="noEmitHelpers" type="boolean" default="false">
  Disable generating custom helper functions like `__extends` in compiled output.

  **Source:** `src/compiler/commandLineParser.ts:1520-1527`
</ParamField>

### importHelpers

<ParamField path="importHelpers" type="boolean" default="false">
  Allow importing helper functions from tslib once per project, instead of including them per-file.

  **Source:** `src/compiler/commandLineParser.ts:827-835`
</ParamField>

### importsNotUsedAsValues

<ParamField path="importsNotUsedAsValues" type="string" default="remove">
  Specify emit/checking behavior for imports that are only used for types.

  **Type:** `"remove" | "preserve" | "error"`

  **Source:** `src/compiler/commandLineParser.ts:837-849`
</ParamField>

### downlevelIteration

<ParamField path="downlevelIteration" type="boolean" default="false">
  Emit more compliant, but verbose and less performant JavaScript for iteration.

  **Source:** `src/compiler/commandLineParser.ts:851-858`
</ParamField>

### preserveConstEnums

<ParamField path="preserveConstEnums" type="boolean" default="false">
  Disable erasing `const enum` declarations in generated code.

  **Source:** `src/compiler/commandLineParser.ts:1539-1546`
</ParamField>

### stripInternal

<ParamField path="stripInternal" type="boolean" default="false">
  Disable emitting declarations that have `@internal` in their JSDoc comments.

  **Source:** `src/compiler/commandLineParser.ts:1470-1477`
</ParamField>

### newLine

<ParamField path="newLine" type="string" default="lf">
  Set the newline character for emitting files.

  **Type:** `"crlf" | "lf"`

  **Source:** `src/compiler/commandLineParser.ts:1426-1437`
</ParamField>

### emitBOM

<ParamField path="emitBOM" type="boolean" default="false">
  Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.

  **Source:** `src/compiler/commandLineParser.ts:1417-1424`
</ParamField>

## Type Checking

Options that affect type checking behavior.

### strict

<ParamField path="strict" type="boolean" default="true">
  Enable all strict type-checking options.

  **Source:** `src/compiler/commandLineParser.ts:906-917`
</ParamField>

<Tip>
  Enabling `strict` is equivalent to enabling all of the strict mode family options:

  * `noImplicitAny`
  * `strictNullChecks`
  * `strictFunctionTypes`
  * `strictBindCallApply`
  * `strictPropertyInitialization`
  * `noImplicitThis`
  * `useUnknownInCatchVariables`
  * `alwaysStrict`
  * `strictBuiltinIteratorReturn`
</Tip>

### noImplicitAny

<ParamField path="noImplicitAny" type="boolean" default="true (unless strict is false)">
  Enable error reporting for expressions and declarations with an implied `any` type.

  **Source:** `src/compiler/commandLineParser.ts:919-927`
</ParamField>

### strictNullChecks

<ParamField path="strictNullChecks" type="boolean" default="true (unless strict is false)">
  When type checking, take into account `null` and `undefined`.

  **Source:** `src/compiler/commandLineParser.ts:929-937`
</ParamField>

### strictFunctionTypes

<ParamField path="strictFunctionTypes" type="boolean" default="true (unless strict is false)">
  When assigning functions, check to ensure parameters and the return values are subtype-compatible.

  **Source:** `src/compiler/commandLineParser.ts:939-947`
</ParamField>

### strictBindCallApply

<ParamField path="strictBindCallApply" type="boolean" default="true (unless strict is false)">
  Check that the arguments for `bind`, `call`, and `apply` methods match the original function.

  **Source:** `src/compiler/commandLineParser.ts:949-957`
</ParamField>

### strictPropertyInitialization

<ParamField path="strictPropertyInitialization" type="boolean" default="true (unless strict is false)">
  Check for class properties that are declared but not set in the constructor.

  **Source:** `src/compiler/commandLineParser.ts:959-967`
</ParamField>

### strictBuiltinIteratorReturn

<ParamField path="strictBuiltinIteratorReturn" type="boolean" default="true (unless strict is false)">
  Built-in iterators are instantiated with a `TReturn` type of `undefined` instead of `any`.

  **Source:** `src/compiler/commandLineParser.ts:969-977`
</ParamField>

### noImplicitThis

<ParamField path="noImplicitThis" type="boolean" default="true (unless strict is false)">
  Enable error reporting when `this` is given the type `any`.

  **Source:** `src/compiler/commandLineParser.ts:989-997`
</ParamField>

### useUnknownInCatchVariables

<ParamField path="useUnknownInCatchVariables" type="boolean" default="true (unless strict is false)">
  Default catch clause variables as `unknown` instead of `any`.

  **Source:** `src/compiler/commandLineParser.ts:999-1007`
</ParamField>

### alwaysStrict

<ParamField path="alwaysStrict" type="boolean" default="true">
  Ensure 'use strict' is always emitted.

  **Source:** `src/compiler/commandLineParser.ts:1009-1017`
</ParamField>

### noUnusedLocals

<ParamField path="noUnusedLocals" type="boolean" default="false">
  Enable error reporting when local variables aren't read.

  **Source:** `src/compiler/commandLineParser.ts:1021-1028`
</ParamField>

### noUnusedParameters

<ParamField path="noUnusedParameters" type="boolean" default="false">
  Raise an error when a function parameter isn't read.

  **Source:** `src/compiler/commandLineParser.ts:1030-1037`
</ParamField>

### exactOptionalPropertyTypes

<ParamField path="exactOptionalPropertyTypes" type="boolean" default="false">
  Interpret optional property types as written, rather than adding `undefined`.

  **Source:** `src/compiler/commandLineParser.ts:1039-1046`
</ParamField>

### noImplicitReturns

<ParamField path="noImplicitReturns" type="boolean" default="false">
  Enable error reporting for codepaths that do not explicitly return in a function.

  **Source:** `src/compiler/commandLineParser.ts:1048-1055`
</ParamField>

### noFallthroughCasesInSwitch

<ParamField path="noFallthroughCasesInSwitch" type="boolean" default="false">
  Enable error reporting for fallthrough cases in switch statements.

  **Source:** `src/compiler/commandLineParser.ts:1057-1065`
</ParamField>

### noUncheckedIndexedAccess

<ParamField path="noUncheckedIndexedAccess" type="boolean" default="false">
  Add `undefined` to a type when accessed using an index.

  **Source:** `src/compiler/commandLineParser.ts:1067-1074`
</ParamField>

### noImplicitOverride

<ParamField path="noImplicitOverride" type="boolean" default="false">
  Ensure overriding members in derived classes are marked with an override modifier.

  **Source:** `src/compiler/commandLineParser.ts:1076-1083`
</ParamField>

### noPropertyAccessFromIndexSignature

<ParamField path="noPropertyAccessFromIndexSignature" type="boolean" default="false">
  Enforces using indexed accessors for keys declared using an indexed type.

  **Source:** `src/compiler/commandLineParser.ts:1085-1093`
</ParamField>

### allowUnusedLabels

<ParamField path="allowUnusedLabels" type="boolean">
  Disable error reporting for unused labels.

  **Source:** `src/compiler/commandLineParser.ts:1569-1577`
</ParamField>

### allowUnreachableCode

<ParamField path="allowUnreachableCode" type="boolean">
  Disable error reporting for unreachable code.

  **Source:** `src/compiler/commandLineParser.ts:1579-1587`
</ParamField>

### noErrorTruncation

<ParamField path="noErrorTruncation" type="boolean" default="false">
  Disable truncating types in error messages.

  **Source:** `src/compiler/commandLineParser.ts:1439-1446`
</ParamField>

### suppressExcessPropertyErrors

<ParamField path="suppressExcessPropertyErrors" type="boolean" default="false">
  Disable reporting of excess property errors during the creation of object literals.

  **Source:** `src/compiler/commandLineParser.ts:1589-1596`
</ParamField>

### suppressImplicitAnyIndexErrors

<ParamField path="suppressImplicitAnyIndexErrors" type="boolean" default="false">
  Suppress `noImplicitAny` errors when indexing objects that lack index signatures.

  **Source:** `src/compiler/commandLineParser.ts:1598-1605`
</ParamField>

### noStrictGenericChecks

<ParamField path="noStrictGenericChecks" type="boolean" default="false">
  Disable strict checking of generic signatures in function types.

  **Source:** `src/compiler/commandLineParser.ts:1623-1630`
</ParamField>

## JavaScript Support

Options for JavaScript files.

### allowJs

<ParamField path="allowJs" type="boolean" default="false (true if checkJs is set)">
  Allow JavaScript files to be a part of your program. Use the `checkJs` option to get errors from these files.

  **Source:** `src/compiler/commandLineParser.ts:719-727`
</ParamField>

### checkJs

<ParamField path="checkJs" type="boolean" default="false">
  Enable error reporting in type-checked JavaScript files.

  **Source:** `src/compiler/commandLineParser.ts:729-738`
</ParamField>

### maxNodeModuleJsDepth

<ParamField path="maxNodeModuleJsDepth" type="number" default="0">
  Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`.

  **Source:** `src/compiler/commandLineParser.ts:1615-1621`
</ParamField>

## Interop Constraints

Options that ensure compatibility between different module systems.

### isolatedModules

<ParamField path="isolatedModules" type="boolean" default="false">
  Ensure that each file can be safely transpiled without relying on other imports.

  **Source:** `src/compiler/commandLineParser.ts:860-866`
</ParamField>

### verbatimModuleSyntax

<ParamField path="verbatimModuleSyntax" type="boolean" default="false">
  Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting.

  **Source:** `src/compiler/commandLineParser.ts:868-876`
</ParamField>

### isolatedDeclarations

<ParamField path="isolatedDeclarations" type="boolean" default="false">
  Require sufficient annotation on exports so other tools can trivially generate declaration files.

  **Source:** `src/compiler/commandLineParser.ts:878-885`
</ParamField>

### allowSyntheticDefaultImports

<ParamField path="allowSyntheticDefaultImports" type="boolean" default="true">
  Allow 'import x from y' when a module doesn't have a default export.

  **Source:** `src/compiler/commandLineParser.ts:1180-1187`
</ParamField>

### esModuleInterop

<ParamField path="esModuleInterop" type="boolean" default="true">
  Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility.

  **Source:** `src/compiler/commandLineParser.ts:1189-1198`
</ParamField>

### preserveSymlinks

<ParamField path="preserveSymlinks" type="boolean" default="false">
  Disable resolving symlinks to their realpath. This correlates to the same flag in node.

  **Source:** `src/compiler/commandLineParser.ts:1200-1205`
</ParamField>

### forceConsistentCasingInFileNames

<ParamField path="forceConsistentCasingInFileNames" type="boolean" default="true">
  Ensure that casing is correct in imports.

  **Source:** `src/compiler/commandLineParser.ts:1607-1613`
</ParamField>

### allowUmdGlobalAccess

<ParamField path="allowUmdGlobalAccess" type="boolean" default="false">
  Allow accessing UMD globals from modules.

  **Source:** `src/compiler/commandLineParser.ts:1207-1214`
</ParamField>

## Projects

Options for project references and build configuration.

### incremental

<ParamField path="incremental" type="boolean" default="false (true if composite is set)">
  Save .tsbuildinfo files to allow for incremental compilation of projects.

  **Shorthand:** `-i`

  **Source:** `src/compiler/commandLineParser.ts:468-475`
</ParamField>

### composite

<ParamField path="composite" type="boolean" default="false">
  Enable constraints that allow a TypeScript project to be used with project references.

  **Source:** `src/compiler/commandLineParser.ts:794-803`
</ParamField>

### tsBuildInfoFile

<ParamField path="tsBuildInfoFile" type="string" default=".tsbuildinfo">
  Specify the path to .tsbuildinfo incremental compilation file.

  **Source:** `src/compiler/commandLineParser.ts:805-815`
</ParamField>

### disableSourceOfProjectReferenceRedirect

<ParamField path="disableSourceOfProjectReferenceRedirect" type="boolean" default="false">
  Disable preferring source files instead of declaration files when referencing composite projects.

  **Source:** `src/compiler/commandLineParser.ts:1487-1493`
</ParamField>

### disableSolutionSearching

<ParamField path="disableSolutionSearching" type="boolean" default="false">
  Opt a project out of multi-project reference checking when editing.

  **Source:** `src/compiler/commandLineParser.ts:1495-1501`
</ParamField>

### disableReferencedProjectLoad

<ParamField path="disableReferencedProjectLoad" type="boolean" default="false">
  Reduce the number of projects loaded automatically by TypeScript.

  **Source:** `src/compiler/commandLineParser.ts:1503-1509`
</ParamField>

## Completeness

Options for improving completeness of type checking.

### skipLibCheck

<ParamField path="skipLibCheck" type="boolean" default="false">
  Skip type checking all .d.ts files.

  **Source:** `src/compiler/commandLineParser.ts:1560-1567`
</ParamField>

<Tip>
  Enabling `skipLibCheck` can significantly speed up compilation time, especially for large projects with many dependencies.
</Tip>

### skipDefaultLibCheck

<ParamField path="skipDefaultLibCheck" type="boolean" default="false">
  Skip type checking .d.ts files that are included with TypeScript.

  **Source:** `src/compiler/commandLineParser.ts:1401-1408`
</ParamField>

## Backwards Compatibility

Options for backwards compatibility with older TypeScript versions.

### charset

<ParamField path="charset" type="string" default="utf8">
  No longer supported. In early versions, manually set the text encoding for reading files.

  **Source:** `src/compiler/commandLineParser.ts:1410-1415`
</ParamField>

### keyofStringsOnly

<ParamField path="keyofStringsOnly" type="boolean" default="false">
  Make keyof only return strings instead of string, numbers or symbols. Legacy option.

  **Source:** `src/compiler/commandLineParser.ts:1652-1657`
</ParamField>

### noImplicitUseStrict

<ParamField path="noImplicitUseStrict" type="boolean" default="false">
  Disable adding 'use strict' directives in emitted JavaScript files.

  **Source:** `src/compiler/commandLineParser.ts:1511-1518`
</ParamField>

### out

<ParamField path="out" type="string">
  Deprecated setting. Use `outFile` instead.

  **Source:** `src/compiler/commandLineParser.ts:1379-1390`
</ParamField>

### preserveValueImports

<ParamField path="preserveValueImports" type="boolean" default="false">
  Preserve unused imported values in the JavaScript output that would otherwise be removed.

  **Source:** `src/compiler/commandLineParser.ts:1642-1649`
</ParamField>

## Editor Support

Options for editor integration.

### plugins

<ParamField path="plugins" type="array">
  Specify a list of language service plugins to include.

  **Source:** `src/compiler/commandLineParser.ts:1660-1669`
</ParamField>

```json theme={null}
{
  "compilerOptions": {
    "plugins": [
      {
        "name": "typescript-plugin-css-modules"
      }
    ]
  }
}
```

### disableSizeLimit

<ParamField path="disableSizeLimit" type="boolean" default="false">
  Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server.

  **Source:** `src/compiler/commandLineParser.ts:1479-1485`
</ParamField>

## Output Formatting

Options that affect how output is displayed.

### pretty

<ParamField path="pretty" type="boolean" default="true">
  Enable color and formatting in TypeScript's output to make compiler errors easier to read.

  **Source:** `src/compiler/commandLineParser.ts:422-428`
</ParamField>

### preserveWatchOutput

<ParamField path="preserveWatchOutput" type="boolean" default="false">
  Disable wiping the console in watch mode.

  **Source:** `src/compiler/commandLineParser.ts:393-399`
</ParamField>

## Watch and Build Modes

Options specific to watch mode and build mode.

### assumeChangesOnlyAffectDirectDependencies

<ParamField path="assumeChangesOnlyAffectDirectDependencies" type="boolean" default="false">
  Have recompiles in projects that use `incremental` and `watch` mode assume that changes within a file will only affect files directly depending on it.

  **Source:** `src/compiler/commandLineParser.ts:548-556`
</ParamField>

## Compiler Diagnostics

Options for debugging the compiler.

### listFiles

<ParamField path="listFiles" type="boolean" default="false">
  Print all of the files read during the compilation.

  **Source:** `src/compiler/commandLineParser.ts:401-406`
</ParamField>

### explainFiles

<ParamField path="explainFiles" type="boolean" default="false">
  Print files read during the compilation including why it was included.

  **Source:** `src/compiler/commandLineParser.ts:408-413`
</ParamField>

### listEmittedFiles

<ParamField path="listEmittedFiles" type="boolean" default="false">
  Print the names of emitted files after a compilation.

  **Source:** `src/compiler/commandLineParser.ts:415-420`
</ParamField>

### traceResolution

<ParamField path="traceResolution" type="boolean" default="false">
  Log paths used during the `moduleResolution` process.

  **Source:** `src/compiler/commandLineParser.ts:430-435`
</ParamField>

### diagnostics

<ParamField path="diagnostics" type="boolean" default="false">
  Output compiler performance information after building.

  **Source:** `src/compiler/commandLineParser.ts:437-442`
</ParamField>

### extendedDiagnostics

<ParamField path="extendedDiagnostics" type="boolean" default="false">
  Output more detailed compiler performance information after building.

  **Source:** `src/compiler/commandLineParser.ts:444-449`
</ParamField>

### generateCpuProfile

<ParamField path="generateCpuProfile" type="string" default="profile.cpuprofile">
  Emit a v8 CPU profile of the compiler run for debugging.

  **Source:** `src/compiler/commandLineParser.ts:451-458`
</ParamField>

### generateTrace

<ParamField path="generateTrace" type="string">
  Generates an event trace and a list of types.

  **Source:** `src/compiler/commandLineParser.ts:460-466`
</ParamField>

### noCheck

<ParamField path="noCheck" type="boolean" default="false">
  Disable full type checking (only critical parse and emit errors will be reported).

  **Source:** `src/compiler/commandLineParser.ts:529-537`
</ParamField>

## Default Compiler Options

When you run `tsc --init`, TypeScript creates a `tsconfig.json` with these default options:

```json theme={null}
{
  "compilerOptions": {
    "module": "commonjs",
    "target": "es2016",
    "strict": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "skipLibCheck": true
  }
}
```

Source: `src/compiler/commandLineParser.ts:1858-1865`

## Common Configuration Patterns

### Strict Mode (Recommended)

```json theme={null}
{
  "compilerOptions": {
    "strict": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "noImplicitReturns": true,
    "noFallthroughCasesInSwitch": true,
    "noUncheckedIndexedAccess": true
  }
}
```

### Modern Node.js

```json theme={null}
{
  "compilerOptions": {
    "target": "es2022",
    "module": "node16",
    "moduleResolution": "node16",
    "lib": ["es2022"],
    "types": ["node"]
  }
}
```

### Library Development

```json theme={null}
{
  "compilerOptions": {
    "declaration": true,
    "declarationMap": true,
    "sourceMap": true,
    "outDir": "./dist",
    "rootDir": "./src",
    "removeComments": false,
    "preserveConstEnums": true
  }
}
```

### Monorepo with Project References

```json theme={null}
{
  "compilerOptions": {
    "composite": true,
    "declaration": true,
    "declarationMap": true,
    "incremental": true
  },
  "references": [
    { "path": "../shared" },
    { "path": "../utils" }
  ]
}
```

## Related Documentation

<CardGroup cols={2}>
  <Card title="tsconfig.json" icon="file" href="/config/tsconfig-json">
    Learn about the complete tsconfig.json structure
  </Card>

  <Card title="Project References" icon="link" href="/config/project-references">
    Structure large TypeScript projects efficiently
  </Card>
</CardGroup>
