1 declare namespace TsConfigJson {
2 namespace CompilerOptions {
17 // Lowercase alternatives
30 // Lowercase alternatives
45 // Lowercase alternatives
69 | 'ES2015.Symbol.WellKnown'
72 | 'ES2016.Array.Include'
76 | 'ES2017.SharedMemory'
78 | 'ES2017.TypedArrays'
80 | 'ES2018.AsyncIterable'
91 | 'ES2020.Symbol.WellKnown'
94 | 'ESNext.AsyncIterable'
102 | 'WebWorker.ImportScripts'
103 // Lowercase alternatives
108 | 'es2015.collection'
115 | 'es2015.symbol.wellknown'
118 | 'es2016.array.include'
122 | 'es2017.sharedmemory'
124 | 'es2017.typedarrays'
126 | 'es2018.asynciterable'
137 | 'es2020.symbol.wellknown'
140 | 'esnext.asynciterable'
148 | 'webworker.importscripts';
150 export interface Plugin {
151 [key: string]: unknown;
159 export interface CompilerOptions {
161 The character set of the input files.
168 Enables building for project references.
175 Generates corresponding d.ts files.
179 declaration?: boolean;
182 Specify output directory for generated declaration files.
184 Requires TypeScript version 2.0 or later.
186 declarationDir?: string;
189 Show diagnostic information.
193 diagnostics?: boolean;
196 Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files.
203 Only emit `.d.ts` declaration files.
207 emitDeclarationOnly?: boolean;
210 Enable incremental compilation.
214 incremental?: boolean;
217 Specify file to store incremental compilation information.
219 @default '.tsbuildinfo'
221 tsBuildInfoFile?: string;
224 Emit a single file with source maps instead of having a separate file.
228 inlineSourceMap?: boolean;
231 Emit the source alongside the sourcemaps within a single file.
233 Requires `--inlineSourceMap` to be set.
237 inlineSources?: boolean;
240 Specify JSX code generation: `'preserve'`, `'react'`, or `'react-native'`.
244 jsx?: CompilerOptions.JSX;
247 Specifies the object invoked for `createElement` and `__spread` when targeting `'react'` JSX emit.
251 reactNamespace?: string;
254 Print names of files part of the compilation.
261 Specifies the location where debugger should locate map files instead of generated locations.
266 Specify module code generation: 'None', 'CommonJS', 'AMD', 'System', 'UMD', 'ES6', 'ES2015' or 'ESNext'. Only 'AMD' and 'System' can be used in conjunction with `--outFile`. 'ES6' and 'ES2015' values may be used when targeting 'ES5' or lower.
268 @default ['ES3', 'ES5'].includes(target) ? 'CommonJS' : 'ES6'
270 module?: CompilerOptions.Module;
273 Specifies the end of line sequence to be used when emitting files: 'crlf' (Windows) or 'lf' (Unix).
275 Default: Platform specific
277 newLine?: CompilerOptions.NewLine;
287 Do not generate custom helper functions like `__extends` in compiled output.
291 noEmitHelpers?: boolean;
294 Do not emit outputs if any type checking errors were reported.
298 noEmitOnError?: boolean;
301 Warn on expressions and declarations with an implied 'any' type.
305 noImplicitAny?: boolean;
308 Raise error on 'this' expressions with an implied any type.
312 noImplicitThis?: boolean;
315 Report errors on unused locals.
317 Requires TypeScript version 2.0 or later.
321 noUnusedLocals?: boolean;
324 Report errors on unused parameters.
326 Requires TypeScript version 2.0 or later.
330 noUnusedParameters?: boolean;
333 Do not include the default library file (lib.d.ts).
340 Do not add triple-slash references or module import targets to the list of compiled files.
347 Disable strict checking of generic signatures in function types.
351 noStrictGenericChecks?: boolean;
354 @deprecated use `skipLibCheck` instead.
356 skipDefaultLibCheck?: boolean;
359 Skip type checking of declaration files.
361 Requires TypeScript version 2.0 or later.
365 skipLibCheck?: boolean;
368 Concatenate and emit output to single file.
373 Redirect output structure to the directory.
378 Do not erase const enum declarations in generated code.
382 preserveConstEnums?: boolean;
385 Do not resolve symlinks to their real path; treat a symlinked file like a real one.
389 preserveSymlinks?: boolean;
392 Keep outdated console output in watch mode instead of clearing the screen.
396 preserveWatchOutput?: boolean;
399 Stylize errors and messages using color and context (experimental).
401 @default true // Unless piping to another program or redirecting output to a file.
406 Do not emit comments to output.
410 removeComments?: boolean;
413 Specifies the root directory of input files.
415 Use to control the output directory structure with `--outDir`.
420 Unconditionally emit imports for unresolved files.
424 isolatedModules?: boolean;
427 Generates corresponding '.map' file.
434 Specifies the location where debugger should locate TypeScript files instead of source locations.
439 Suppress excess property checks for object literals.
443 suppressExcessPropertyErrors?: boolean;
446 Suppress noImplicitAny errors for indexing objects lacking index signatures.
450 suppressImplicitAnyIndexErrors?: boolean;
453 Do not emit declarations for code that has an `@internal` annotation.
455 stripInternal?: boolean;
458 Specify ECMAScript target version.
462 target?: CompilerOptions.Target;
472 Enables experimental support for ES7 decorators.
476 experimentalDecorators?: boolean;
479 Emit design-type metadata for decorated declarations in source.
483 emitDecoratorMetadata?: boolean;
486 Specifies module resolution strategy: 'node' (Node) or 'classic' (TypeScript pre 1.6).
488 @default ['AMD', 'System', 'ES6'].includes(module) ? 'classic' : 'node'
490 moduleResolution?: 'classic' | 'node';
493 Do not report errors on unused labels.
497 allowUnusedLabels?: boolean;
500 Report error when not all code paths in function return a value.
504 noImplicitReturns?: boolean;
507 Report errors for fallthrough cases in switch statement.
511 noFallthroughCasesInSwitch?: boolean;
514 Do not report errors on unreachable code.
518 allowUnreachableCode?: boolean;
521 Disallow inconsistently-cased references to the same file.
525 forceConsistentCasingInFileNames?: boolean;
528 Base directory to resolve non-relative module names.
533 Specify path mapping to be computed relative to baseUrl option.
536 [key: string]: string[];
540 List of TypeScript language server plugins to load.
542 Requires TypeScript version 2.3 or later.
544 plugins?: CompilerOptions.Plugin[];
547 Specify list of root directories to be used when resolving modules.
552 Specify list of directories for type definition files to be included.
554 Requires TypeScript version 2.0 or later.
556 typeRoots?: string[];
559 Type declaration files to be included in compilation.
561 Requires TypeScript version 2.0 or later.
566 Enable tracing of the name resolution process.
570 traceResolution?: boolean;
573 Allow javascript files to be compiled.
580 Do not truncate error messages.
584 noErrorTruncation?: boolean;
587 Allow default imports from modules with no default export. This does not affect code emit, just typechecking.
589 @default module === 'system' || esModuleInterop
591 allowSyntheticDefaultImports?: boolean;
594 Do not emit `'use strict'` directives in module output.
598 noImplicitUseStrict?: boolean;
601 Enable to list all emitted files.
603 Requires TypeScript version 2.0 or later.
607 listEmittedFiles?: boolean;
610 Disable size limit for JavaScript project.
612 Requires TypeScript version 2.0 or later.
616 disableSizeLimit?: boolean;
619 List of library files to be included in the compilation.
621 Requires TypeScript version 2.0 or later.
623 lib?: CompilerOptions.Lib[];
626 Enable strict null checks.
628 Requires TypeScript version 2.0 or later.
632 strictNullChecks?: boolean;
635 The maximum dependency depth to search under `node_modules` and load JavaScript files. Only applicable with `--allowJs`.
639 maxNodeModuleJsDepth?: number;
642 Import emit helpers (e.g. `__extends`, `__rest`, etc..) from tslib.
644 Requires TypeScript version 2.1 or later.
648 importHelpers?: boolean;
651 Specify the JSX factory function to use when targeting React JSX emit, e.g. `React.createElement` or `h`.
653 Requires TypeScript version 2.1 or later.
655 @default 'React.createElement'
660 Parse in strict mode and emit `'use strict'` for each source file.
662 Requires TypeScript version 2.1 or later.
666 alwaysStrict?: boolean;
669 Enable all strict type checking options.
671 Requires TypeScript version 2.3 or later.
678 Enable stricter checking of of the `bind`, `call`, and `apply` methods on functions.
682 strictBindCallApply?: boolean;
685 Provide full support for iterables in `for-of`, spread, and destructuring when targeting `ES5` or `ES3`.
687 Requires TypeScript version 2.3 or later.
691 downlevelIteration?: boolean;
694 Report errors in `.js` files.
696 Requires TypeScript version 2.3 or later.
703 Disable bivariant parameter checking for function types.
705 Requires TypeScript version 2.6 or later.
709 strictFunctionTypes?: boolean;
712 Ensure non-undefined class properties are initialized in the constructor.
714 Requires TypeScript version 2.7 or later.
718 strictPropertyInitialization?: boolean;
721 Emit `__importStar` and `__importDefault` helpers for runtime Babel ecosystem compatibility and enable `--allowSyntheticDefaultImports` for typesystem compatibility.
723 Requires TypeScript version 2.7 or later.
727 esModuleInterop?: boolean;
730 Allow accessing UMD globals from modules.
734 allowUmdGlobalAccess?: boolean;
737 Resolve `keyof` to string valued property names only (no numbers or symbols).
739 Requires TypeScript version 2.9 or later.
743 keyofStringsOnly?: boolean;
746 Emit ECMAScript standard class fields.
748 Requires TypeScript version 3.7 or later.
752 useDefineForClassFields?: boolean;
755 Generates a sourcemap for each corresponding `.d.ts` file.
757 Requires TypeScript version 2.9 or later.
761 declarationMap?: boolean;
764 Include modules imported with `.json` extension.
766 Requires TypeScript version 2.9 or later.
770 resolveJsonModule?: boolean;
774 Auto type (.d.ts) acquisition options for this project.
776 Requires TypeScript version 2.1 or later.
778 export interface TypeAcquisition {
780 Enable auto type acquisition.
785 Specifies a list of type declarations to be included in auto type acquisition. For example, `['jquery', 'lodash']`.
790 Specifies a list of type declarations to be excluded from auto type acquisition. For example, `['jquery', 'lodash']`.
795 export interface References {
797 A normalized path on disk.
802 The path as the user originally wrote it.
804 originalPath?: string;
807 True if the output of this reference should be prepended to the output of this project.
809 Only valid for `--outFile` compilations.
814 True if it is intended that this reference form a circularity.
820 export interface TsConfigJson {
822 Instructs the TypeScript compiler how to compile `.ts` files.
824 compilerOptions?: TsConfigJson.CompilerOptions;
827 Auto type (.d.ts) acquisition options for this project.
829 Requires TypeScript version 2.1 or later.
831 typeAcquisition?: TsConfigJson.TypeAcquisition;
834 Enable Compile-on-Save for this project.
836 compileOnSave?: boolean;
839 Path to base configuration file to inherit from.
841 Requires TypeScript version 2.1 or later.
846 If no `files` or `include` property is present in a `tsconfig.json`, the compiler defaults to including all files in the containing directory and subdirectories except those specified by `exclude`. When a `files` property is specified, only those files and those specified by `include` are included.
851 Specifies a list of files to be excluded from compilation. The `exclude` property only affects the files included via the `include` property and not the `files` property.
853 Glob patterns require TypeScript version 2.0 or later.
858 Specifies a list of glob patterns that match files to be included in compilation.
860 If no `files` or `include` property is present in a `tsconfig.json`, the compiler defaults to including all files in the containing directory and subdirectories except those specified by `exclude`.
862 Requires TypeScript version 2.0 or later.
869 Requires TypeScript version 3.0 or later.
871 references?: TsConfigJson.References[];