Projects
composite
Released: 3.0
Related: incremental,tsBuildInfoFile
The composite option enforces certain constraints which make it possible for build tools (including TypeScript itself, under --build mode) to quickly determine if a project has been built yet.
When this setting is on:
The
rootDirsetting, if not explicitly set, defaults to the directory containing thetsconfig.jsonfile.All implementation files must be matched by an
includepattern or listed in thefilesarray. If this constraint is violated,tscwill inform you which files weren't specified.declarationdefaults totrue
You can find documentation on TypeScript projects in the handbook.
disableReferencedProjectLoad
- Released: 4.0
In multi-project TypeScript programs, TypeScript will load all of the available projects into memory in order to provide accurate results for editor responses which require a full knowledge graph like 'Find All References'.
If your project is large, you can use the flag disableReferencedProjectLoad to disable the automatic loading of all projects. Instead, projects are loaded dynamically as you open files through your editor.
disableSolutionSearching
- Released: 3.8
When working with composite TypeScript projects, this option provides a way to declare that you do not want a project to be included when using features like find all references or jump to definition in an editor.
This flag is something you can use to increase responsiveness in large composite projects.
disableSourceOfProjectReferenceRedirect
- Released: 3.7
When working with composite TypeScript projects, this option provides a way to go back to the pre-3.7 behavior where d.ts files were used to as the boundaries between modules. In 3.7 the source of truth is now your TypeScript files.
incremental
Default:
trueif composite;falseotherwise.Released: 3.4
Related: composite,tsBuildInfoFile
Tells TypeScript to save information about the project graph from the last compilation to files stored on disk. This creates a series of .tsbuildinfo files in the same folder as your compilation output. They are not used by your JavaScript at runtime and can be safely deleted. You can read more about the flag in the 3.4 release notes.
To control which folders you want to the files to be built to, use the config option tsBuildInfoFile.
tsBuildInfoFile
Default:
.tsbuildinfoReleased: 3.4
Related: incremental,composite
This setting lets you specify a file for storing incremental compilation information as a part of composite projects which enables faster building of larger TypeScript codebases. You can read more about composite projects in the handbook.
The default depends on a combination of other settings:
- If
outFileis set, the default is<outFile>.tsbuildinfo. - If
rootDirandoutDirare set, then the file is<outDir>/<relative path to config from rootDir>/<config name>.tsbuildinfoFor example, ifrootDirissrc,outDirisdest, and the config is./tsconfig.json, then the default is./tsconfig.tsbuildinfoas the relative path fromsrc/to./tsconfig.jsonis../. - If
outDiris set, then the default is<outDir>/<config name>.tsbuildInfo - Otherwise, the default is
<config name>.tsbuildInfo