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.
535 paths?: Record<string, string[]>;
538 List of TypeScript language server plugins to load.
540 Requires TypeScript version 2.3 or later.
542 plugins?: CompilerOptions.Plugin[];
545 Specify list of root directories to be used when resolving modules.
550 Specify list of directories for type definition files to be included.
552 Requires TypeScript version 2.0 or later.
554 typeRoots?: string[];
557 Type declaration files to be included in compilation.
559 Requires TypeScript version 2.0 or later.
564 Enable tracing of the name resolution process.
568 traceResolution?: boolean;
571 Allow javascript files to be compiled.
578 Do not truncate error messages.
582 noErrorTruncation?: boolean;
585 Allow default imports from modules with no default export. This does not affect code emit, just typechecking.
587 @default module === 'system' || esModuleInterop
589 allowSyntheticDefaultImports?: boolean;
592 Do not emit `'use strict'` directives in module output.
596 noImplicitUseStrict?: boolean;
599 Enable to list all emitted files.
601 Requires TypeScript version 2.0 or later.
605 listEmittedFiles?: boolean;
608 Disable size limit for JavaScript project.
610 Requires TypeScript version 2.0 or later.
614 disableSizeLimit?: boolean;
617 List of library files to be included in the compilation.
619 Requires TypeScript version 2.0 or later.
621 lib?: CompilerOptions.Lib[];
624 Enable strict null checks.
626 Requires TypeScript version 2.0 or later.
630 strictNullChecks?: boolean;
633 The maximum dependency depth to search under `node_modules` and load JavaScript files. Only applicable with `--allowJs`.
637 maxNodeModuleJsDepth?: number;
640 Import emit helpers (e.g. `__extends`, `__rest`, etc..) from tslib.
642 Requires TypeScript version 2.1 or later.
646 importHelpers?: boolean;
649 Specify the JSX factory function to use when targeting React JSX emit, e.g. `React.createElement` or `h`.
651 Requires TypeScript version 2.1 or later.
653 @default 'React.createElement'
658 Parse in strict mode and emit `'use strict'` for each source file.
660 Requires TypeScript version 2.1 or later.
664 alwaysStrict?: boolean;
667 Enable all strict type checking options.
669 Requires TypeScript version 2.3 or later.
676 Enable stricter checking of of the `bind`, `call`, and `apply` methods on functions.
680 strictBindCallApply?: boolean;
683 Provide full support for iterables in `for-of`, spread, and destructuring when targeting `ES5` or `ES3`.
685 Requires TypeScript version 2.3 or later.
689 downlevelIteration?: boolean;
692 Report errors in `.js` files.
694 Requires TypeScript version 2.3 or later.
701 Disable bivariant parameter checking for function types.
703 Requires TypeScript version 2.6 or later.
707 strictFunctionTypes?: boolean;
710 Ensure non-undefined class properties are initialized in the constructor.
712 Requires TypeScript version 2.7 or later.
716 strictPropertyInitialization?: boolean;
719 Emit `__importStar` and `__importDefault` helpers for runtime Babel ecosystem compatibility and enable `--allowSyntheticDefaultImports` for typesystem compatibility.
721 Requires TypeScript version 2.7 or later.
725 esModuleInterop?: boolean;
728 Allow accessing UMD globals from modules.
732 allowUmdGlobalAccess?: boolean;
735 Resolve `keyof` to string valued property names only (no numbers or symbols).
737 Requires TypeScript version 2.9 or later.
741 keyofStringsOnly?: boolean;
744 Emit ECMAScript standard class fields.
746 Requires TypeScript version 3.7 or later.
750 useDefineForClassFields?: boolean;
753 Generates a sourcemap for each corresponding `.d.ts` file.
755 Requires TypeScript version 2.9 or later.
759 declarationMap?: boolean;
762 Include modules imported with `.json` extension.
764 Requires TypeScript version 2.9 or later.
768 resolveJsonModule?: boolean;
772 Auto type (.d.ts) acquisition options for this project.
774 Requires TypeScript version 2.1 or later.
776 export interface TypeAcquisition {
778 Enable auto type acquisition.
783 Specifies a list of type declarations to be included in auto type acquisition. For example, `['jquery', 'lodash']`.
788 Specifies a list of type declarations to be excluded from auto type acquisition. For example, `['jquery', 'lodash']`.
793 export interface References {
795 A normalized path on disk.
800 The path as the user originally wrote it.
802 originalPath?: string;
805 True if the output of this reference should be prepended to the output of this project.
807 Only valid for `--outFile` compilations.
812 True if it is intended that this reference form a circularity.
818 export interface TsConfigJson {
820 Instructs the TypeScript compiler how to compile `.ts` files.
822 compilerOptions?: TsConfigJson.CompilerOptions;
825 Auto type (.d.ts) acquisition options for this project.
827 Requires TypeScript version 2.1 or later.
829 typeAcquisition?: TsConfigJson.TypeAcquisition;
832 Enable Compile-on-Save for this project.
834 compileOnSave?: boolean;
837 Path to base configuration file to inherit from.
839 Requires TypeScript version 2.1 or later.
844 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.
849 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.
851 Glob patterns require TypeScript version 2.0 or later.
856 Specifies a list of glob patterns that match files to be included in compilation.
858 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`.
860 Requires TypeScript version 2.0 or later.
867 Requires TypeScript version 3.0 or later.
869 references?: TsConfigJson.References[];