—allowJs | boolean | false |
Allow JavaScript files to be a part of your program. Use the checkJS option to get errors from these files. |
—allowSyntheticDefaultImports | boolean | module === “system” or esModuleInterop |
Allow ‘import x from y’ when a module doesn’t have a default export. |
—allowUmdGlobalAccess | boolean | false |
Allow accessing UMD globals from modules. |
—allowUnreachableCode | boolean | undefined |
Disable error reporting for unreachable code. |
—allowUnusedLabels | boolean | undefined |
Disable error reporting for unused labels. |
—alwaysStrict | boolean | false , unless strict is set
|
Ensure ‘use strict’ is always emitted. |
—assumeChangesOnlyAffectDirectDependencies | boolean | |
Have recompiles in projects that use incremental and watch mode assume that changes within a file will only affect files directly depending on it. |
—baseUrl | string | |
Specify the base directory to resolve non-relative module names. |
—charset | string | utf8 |
No longer supported. In early versions, manually set the text encoding for reading files. |
—checkJs | boolean | false |
Enable error reporting in type-checked JavaScript files. |
—composite | boolean | false |
Enable constraints that allow a TypeScript project to be used with project references. |
—declaration | boolean | false , unless composite is set
|
Generate .d.ts files from TypeScript and JavaScript files in your project. |
—declarationDir | string | n/a |
Specify the output directory for generated declaration files. |
—declarationMap | boolean | false |
Create sourcemaps for d.ts files. |
—diagnostics | boolean | false |
Output compiler performance information after building. |
—disableReferencedProjectLoad | boolean | |
Reduce the number of projects loaded automatically by TypeScript. |
—disableSizeLimit | boolean | false |
Remove the 20mb cap on total source code size for JavaScript files in the TypeScript language server. |
—disableSolutionSearching | boolean | |
Opt a project out of multi-project reference checking when editing. |
—disableSourceOfProjectReferenceRedirect | boolean | |
Disable preferring source files instead of declaration files when referencing composite projects |
—downlevelIteration | boolean | false |
Emit more compliant, but verbose and less performant JavaScript for iteration. |
—emitBOM | boolean | false |
Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. |
—emitDeclarationOnly | boolean | false |
Only output d.ts files and not JavaScript files. |
—emitDecoratorMetadata | boolean | |
Emit design-type metadata for decorated declarations in source files. |
—esModuleInterop | boolean | false |
Emit additional JavaScript to ease support for importing CommonJS modules. This enables allowSyntheticDefaultImports for type compatibility. |
—experimentalDecorators | boolean | |
Enable experimental support for TC39 stage 2 draft decorators. |
—explainFiles | boolean | |
Print files read during the compilation including why it was included. |
—extendedDiagnostics | boolean | false |
Output more detailed compiler performance information after building. |
—forceConsistentCasingInFileNames | boolean | false |
Ensure that casing is correct in imports. |
—generateCpuProfile | string | profile.cpuprofile |
Emit a v8 CPU profile of the compiler run for debugging. |
—importHelpers | boolean | false |
Allow importing helper functions from tslib once per project, instead of including them per-file. |
—importsNotUsedAsValues | remove , preserve , or error
| |
Specify emit/checking behavior for imports that are only used for types. |
—incremental | boolean | true if composite , false otherwise
|
Save .tsbuildinfo files to allow for incremental compilation of projects. |
—inlineSourceMap | boolean | false |
Include sourcemap files inside the emitted JavaScript. |
—inlineSources | boolean | false |
Include source code in the sourcemaps inside the emitted JavaScript. |
—isolatedModules | boolean | false |
Ensure that each file can be safely transpiled without relying on other imports. |
—jsx | react , react-jsx , react-jsxdev , react-native , or preserve
| undefined |
Specify what JSX code is generated. |
—jsxFactory | string | React.createElement
|
Specify the JSX factory function used when targeting React JSX emit, e.g. ‘React.createElement’ or ‘h’ |
—jsxFragmentFactory | string | |
Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. ‘React.Fragment’ or ‘Fragment’. |
—jsxImportSource | string | react |
Specify module specifier used to import the JSX factory functions when using jsx: react-jsx* .</p></td></tr><tr name="keyofStringsOnly"><td><code><a href="$889bbc2ea6ad166e.md#keyofStringsOnly">--keyofStringsOnly</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Make keyof only return strings instead of string, numbers or symbols. Legacy option.</p></td></tr><tr name="lib"><td><code><a href="$889bbc2ea6ad166e.md#lib">--lib</a></code></td><td><code>list</code></td><td></td></tr><tr><td colspan="3"><p>Specify a set of bundled library declaration files that describe the target runtime environment.</p></td></tr><tr name="listEmittedFiles"><td><code><a href="$889bbc2ea6ad166e.md#listEmittedFiles">--listEmittedFiles</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Print the names of emitted files after a compilation.</p></td></tr><tr name="listFiles"><td><code><a href="$889bbc2ea6ad166e.md#listFiles">--listFiles</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Print all of the files read during the compilation.</p></td></tr><tr name="mapRoot"><td><code><a href="$889bbc2ea6ad166e.md#mapRoot">--mapRoot</a></code></td><td><code>string</code></td><td></td></tr><tr><td colspan="3"><p>Specify the location where debugger should locate map files instead of generated locations.</p></td></tr><tr name="maxNodeModuleJsDepth"><td><code><a href="$889bbc2ea6ad166e.md#maxNodeModuleJsDepth">--maxNodeModuleJsDepth</a></code></td><td><code>number</code></td><td><p>0</p></td></tr><tr><td colspan="3"><p>Specify the maximum folder depth used for checking JavaScript files from <code>node_modules</code>. Only applicable with <code>allowJs</code>.</p></td></tr><tr name="module"><td><code><a href="$889bbc2ea6ad166e.md#module">--module</a></code></td><td><code><code> CommonJS(default if targetis ES3or ES5)</code>, <code></code>, <code> ES2015</code>, <code> ES2020</code>, <code></code>, <code> None</code>, <code> UMD</code>, <code> AMD</code>, <code> System</code>, or <code> ESNext</code></code></td><td></td></tr><tr><td colspan="3"><p>Specify what module code is generated.</p></td></tr><tr name="moduleResolution"><td><code><a href="$889bbc2ea6ad166e.md#moduleResolution">--moduleResolution</a></code></td><td><code></code></td><td><p>module === <code>AMD</code> or <code>UMD</code> or <code>System</code> or <code>ES6</code>, then <code>Classic</code><br><br>Otherwise <code>Node</code></p></td></tr><tr><td colspan="3"><p>Specify how TypeScript looks up a file from a given module specifier.</p></td></tr><tr name="newLine"><td><code><a href="$889bbc2ea6ad166e.md#newLine">--newLine</a></code></td><td><code></code></td><td><p>Platform specific</p></td></tr><tr><td colspan="3"><p>Set the newline character for emitting files.</p></td></tr><tr name="noEmit"><td><code><a href="$889bbc2ea6ad166e.md#noEmit">--noEmit</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Disable emitting file from a compilation.</p></td></tr><tr name="noEmitHelpers"><td><code><a href="$889bbc2ea6ad166e.md#noEmitHelpers">--noEmitHelpers</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Disable generating custom helper functions like <code>__extends</code> in compiled output.</p></td></tr><tr name="noEmitOnError"><td><code><a href="$889bbc2ea6ad166e.md#noEmitOnError">--noEmitOnError</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Disable emitting files if any type checking errors are reported.</p></td></tr><tr name="noErrorTruncation"><td><code><a href="$889bbc2ea6ad166e.md#noErrorTruncation">--noErrorTruncation</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Disable truncating types in error messages.</p></td></tr><tr name="noFallthroughCasesInSwitch"><td><code><a href="$889bbc2ea6ad166e.md#noFallthroughCasesInSwitch">--noFallthroughCasesInSwitch</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Enable error reporting for fallthrough cases in switch statements.</p></td></tr><tr name="noImplicitAny"><td><code><a href="$889bbc2ea6ad166e.md#noImplicitAny">--noImplicitAny</a></code></td><td><code>boolean</code></td><td><p><code>false</code>, unless <code>strict</code> is set</p></td></tr><tr><td colspan="3"><p>Enable error reporting for expressions and declarations with an implied <code>any</code> type..</p></td></tr><tr name="noImplicitOverride"><td><code><a href="$889bbc2ea6ad166e.md#noImplicitOverride">--noImplicitOverride</a></code></td><td><code>boolean</code></td><td></td></tr><tr><td colspan="3"><p>Ensure overriding members in derived classes are marked with an override modifier.</p></td></tr><tr name="noImplicitReturns"><td><code><a href="$889bbc2ea6ad166e.md#noImplicitReturns">--noImplicitReturns</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Enable error reporting for codepaths that do not explicitly return in a function.</p></td></tr><tr name="noImplicitThis"><td><code><a href="$889bbc2ea6ad166e.md#noImplicitThis">--noImplicitThis</a></code></td><td><code>boolean</code></td><td><p><code>false</code>, unless <code>strict</code> is set</p></td></tr><tr><td colspan="3"><p>Enable error reporting when <code>this</code> is given the type <code>any</code>.</p></td></tr><tr name="noImplicitUseStrict"><td><code><a href="$889bbc2ea6ad166e.md#noImplicitUseStrict">--noImplicitUseStrict</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Disable adding 'use strict' directives in emitted JavaScript files.</p></td></tr><tr name="noLib"><td><code><a href="$889bbc2ea6ad166e.md#noLib">--noLib</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Disable including any library files, including the default lib.d.ts.</p></td></tr><tr name="noPropertyAccessFromIndexSignature"><td><code><a href="$889bbc2ea6ad166e.md#noPropertyAccessFromIndexSignature">--noPropertyAccessFromIndexSignature</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Enforces using indexed accessors for keys declared using an indexed type</p></td></tr><tr name="noResolve"><td><code><a href="$889bbc2ea6ad166e.md#noResolve">--noResolve</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Disallow <code>import</code>s, <code>require</code>s or <code><reference></code>s from expanding the number of files TypeScript should add to a project.</p></td></tr><tr name="noStrictGenericChecks"><td><code><a href="$889bbc2ea6ad166e.md#noStrictGenericChecks">--noStrictGenericChecks</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Disable strict checking of generic signatures in function types.</p></td></tr><tr name="noUncheckedIndexedAccess"><td><code><a href="$889bbc2ea6ad166e.md#noUncheckedIndexedAccess">--noUncheckedIndexedAccess</a></code></td><td><code>boolean</code></td><td></td></tr><tr><td colspan="3"><p>Add <code>undefined</code> to a type when accessed using an index.</p></td></tr><tr name="noUnusedLocals"><td><code><a href="$889bbc2ea6ad166e.md#noUnusedLocals">--noUnusedLocals</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Enable error reporting when a local variables aren't read.</p></td></tr><tr name="noUnusedParameters"><td><code><a href="$889bbc2ea6ad166e.md#noUnusedParameters">--noUnusedParameters</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Raise an error when a function parameter isn't read</p></td></tr><tr name="out"><td><code><a href="$889bbc2ea6ad166e.md#out">--out</a></code></td><td><code>string</code></td><td><p>n/a</p></td></tr><tr><td colspan="3"><p>Deprecated setting. Use <code>outFile</code> instead.</p></td></tr><tr name="outDir"><td><code><a href="$889bbc2ea6ad166e.md#outDir">--outDir</a></code></td><td><code>string</code></td><td><p>n/a</p></td></tr><tr><td colspan="3"><p>Specify an output folder for all emitted files.</p></td></tr><tr name="outFile"><td><code><a href="$889bbc2ea6ad166e.md#outFile">--outFile</a></code></td><td><code>string</code></td><td><p>n/a</p></td></tr><tr><td colspan="3"><p>Specify a file that bundles all outputs into one JavaScript file. If <code>declaration</code> is true, also designates a file that bundles all .d.ts output.</p></td></tr><tr name="paths"><td><code><a href="$889bbc2ea6ad166e.md#paths">--paths</a></code></td><td><code>object</code></td><td></td></tr><tr><td colspan="3"><p>Specify a set of entries that re-map imports to additional lookup locations.</p></td></tr><tr name="plugins"><td><code><a href="$889bbc2ea6ad166e.md#plugins">--plugins</a></code></td><td><code>list</code></td><td></td></tr><tr><td colspan="3"><p>Specify a list of language service plugins to include.</p></td></tr><tr name="preserveConstEnums"><td><code><a href="$889bbc2ea6ad166e.md#preserveConstEnums">--preserveConstEnums</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Disable erasing <code>const enum</code> declarations in generated code.</p></td></tr><tr name="preserveSymlinks"><td><code><a href="$889bbc2ea6ad166e.md#preserveSymlinks">--preserveSymlinks</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Disable resolving symlinks to their realpath. This correlates to the same flag in node.</p></td></tr><tr name="preserveWatchOutput"><td><code><a href="$889bbc2ea6ad166e.md#preserveWatchOutput">--preserveWatchOutput</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Disable wiping the console in watch mode</p></td></tr><tr name="pretty"><td><code><a href="$889bbc2ea6ad166e.md#pretty">--pretty</a></code></td><td><code>boolean</code></td><td><p>true</p></td></tr><tr><td colspan="3"><p>Enable color and formatting in output to make compiler errors easier to read</p></td></tr><tr name="reactNamespace"><td><code><a href="$889bbc2ea6ad166e.md#reactNamespace">--reactNamespace</a></code></td><td><code>string</code></td><td><p>"React"</p></td></tr><tr><td colspan="3"><p>Specify the object invoked for <code>createElement</code>. This only applies when targeting <code>react</code> JSX emit.</p></td></tr><tr name="removeComments"><td><code><a href="$889bbc2ea6ad166e.md#removeComments">--removeComments</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Disable emitting comments.</p></td></tr><tr name="resolveJsonModule"><td><code><a href="$889bbc2ea6ad166e.md#resolveJsonModule">--resolveJsonModule</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Enable importing .json files</p></td></tr><tr name="rootDir"><td><code><a href="$889bbc2ea6ad166e.md#rootDir">--rootDir</a></code></td><td><code>string</code></td><td><p>Computed from the list of input files</p></td></tr><tr><td colspan="3"><p>Specify the root folder within your source files.</p></td></tr><tr name="rootDirs"><td><code><a href="$889bbc2ea6ad166e.md#rootDirs">--rootDirs</a></code></td><td><code>list</code></td><td></td></tr><tr><td colspan="3"><p>Allow multiple folders to be treated as one when resolving modules.</p></td></tr><tr name="skipDefaultLibCheck"><td><code><a href="$889bbc2ea6ad166e.md#skipDefaultLibCheck">--skipDefaultLibCheck</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Skip type checking .d.ts files that are included with TypeScript.</p></td></tr><tr name="skipLibCheck"><td><code><a href="$889bbc2ea6ad166e.md#skipLibCheck">--skipLibCheck</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Skip type checking all .d.ts files.</p></td></tr><tr name="sourceMap"><td><code><a href="$889bbc2ea6ad166e.md#sourceMap">--sourceMap</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Create source map files for emitted JavaScript files.</p></td></tr><tr name="sourceRoot"><td><code><a href="$889bbc2ea6ad166e.md#sourceRoot">--sourceRoot</a></code></td><td><code>string</code></td><td></td></tr><tr><td colspan="3"><p>Specify the root path for debuggers to find the reference source code.</p></td></tr><tr name="strict"><td><code><a href="$889bbc2ea6ad166e.md#strict">--strict</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Enable all strict type checking options.</p></td></tr><tr name="strictBindCallApply"><td><code><a href="$889bbc2ea6ad166e.md#strictBindCallApply">--strictBindCallApply</a></code></td><td><code>boolean</code></td><td><p><code>false</code>, unless <code>strict</code> is set</p></td></tr><tr><td colspan="3"><p>Check that the arguments for <code>bind</code>, <code>call</code>, and <code>apply</code> methods match the original function.</p></td></tr><tr name="strictFunctionTypes"><td><code><a href="$889bbc2ea6ad166e.md#strictFunctionTypes">--strictFunctionTypes</a></code></td><td><code>boolean</code></td><td><p><code>false</code>, unless <code>strict</code> is set</p></td></tr><tr><td colspan="3"><p>When assigning functions, check to ensure parameters and the return values are subtype-compatible.</p></td></tr><tr name="strictNullChecks"><td><code><a href="$889bbc2ea6ad166e.md#strictNullChecks">--strictNullChecks</a></code></td><td><code>boolean</code></td><td><p><code>false</code>, unless <code>strict</code> is set</p></td></tr><tr><td colspan="3"><p>When type checking, take into account <code>null</code> and <code>undefined</code>.</p></td></tr><tr name="strictPropertyInitialization"><td><code><a href="$889bbc2ea6ad166e.md#strictPropertyInitialization">--strictPropertyInitialization</a></code></td><td><code>boolean</code></td><td><p><code>false</code>, unless <code>strict</code> is set</p></td></tr><tr><td colspan="3"><p>Check for class properties that are declared but not set in the constructor.</p></td></tr><tr name="stripInternal"><td><code><a href="$889bbc2ea6ad166e.md#stripInternal">--stripInternal</a></code></td><td><code>boolean</code></td><td></td></tr><tr><td colspan="3"><p>Disable emitting declarations that have <code>@internal</code> in their JSDoc comments.</p></td></tr><tr name="suppressExcessPropertyErrors"><td><code><a href="$889bbc2ea6ad166e.md#suppressExcessPropertyErrors">--suppressExcessPropertyErrors</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Disable reporting of excess property errors during the creation of object literals.</p></td></tr><tr name="suppressImplicitAnyIndexErrors"><td><code><a href="$889bbc2ea6ad166e.md#suppressImplicitAnyIndexErrors">--suppressImplicitAnyIndexErrors</a></code></td><td><code>boolean</code></td><td><p>false</p></td></tr><tr><td colspan="3"><p>Suppress <code>noImplicitAny</code> errors when indexing objects that lack index signatures.</p></td></tr><tr name="target"><td><code><a href="$889bbc2ea6ad166e.md#target">--target</a></code></td><td><code><code> ES3(default)</code>, <code> ES5</code>, <code> ES6/ ES2015(synonymous)</code>, <code> ES7/ ES2016</code>, <code> ES2017</code>, <code> ES2018</code>, <code> ES2019</code>, <code> ES2020</code>, or <code> ESNext` | ES3 |
Set the JavaScript language version for emitted JavaScript and include compatible library declarations. |
—traceResolution | boolean | false |
Log paths used during the moduleResolution process. |
—tsBuildInfoFile | string | .tsbuildinfo |
Specify the folder for .tsbuildinfo incremental compilation files. |
—typeRoots | list | |
Specify multiple folders that act like ./node_modules/@types . |
—types | list | |
Specify type package names to be included without being referenced in a source file. |
—useDefineForClassFields | boolean | false |
Emit ECMAScript-standard-compliant class fields. |