TypeScript Compiler Options

tsBuildInfoFile — TypeScript project configuration

Overrides the location of incremental build state. Keep paths distinct across projects and build configurations. Build mode in 5.8.3 can write build info even without incremental or composite; do not treat the format as a stable public schema. Baseline: TypeScript 5.8.3. Default: derived from config and output paths. Example: create the labeled files in an isolated project and run the commands in order. See companion fixtures for comparison cases and expected results. The custom cache appears at cache/project.tsbuildinfo.

Formal Syntax & Structure

typescript syntaxtypescript
{  "compilerOptions": {    "tsBuildInfoFile": "cache/project.tsbuildinfo"  }}

Parameters & Attributes

NameTypeDescription
tsBuildInfoFilestringCompiler option; default: derived from config and output paths.

Working Example

Example Snippettypescript
// File: tsconfig.json (omit this label){  "compilerOptions": {    "target": "ES2022",    "module": "CommonJS",    "strict": true,    "types": [],    "incremental": true,    "outDir": "dist",    "tsBuildInfoFile": "cache/project.tsbuildinfo"  },  "files": [    "index.ts"  ]}// File: index.ts (omit this label)export const value: number = 7;
// Run these commands in order in an isolated project:// tsc -p . --pretty false
TypeScript Reference