TypeScript Compiler Options
assumeChangesOnlyAffectDirectDependencies — TypeScript compiler configuration
Uses a less conservative affected-file strategy for incremental and watch builds, assuming changes affect only direct importers. A transitive dependent may retain stale diagnostics until a full check. Prefer full checking for release verification. The example verifies configuration acceptance with incremental enabled, not measured speed or completeness of transitive invalidation. Baseline: TypeScript 5.8.3. Default: false. Create the labeled files in an isolated project; omit file labels. Run the indicated command.
Formal Syntax & Structure
typescript syntaxtypescript
{ "compilerOptions": { "assumeChangesOnlyAffectDirectDependencies": true }}Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| assumeChangesOnlyAffectDirectDependencies | boolean | Compiler option; default: false. |
Working Example
Example Snippettypescript
// File: tsconfig.json (omit this label){ "compilerOptions": { "target": "ES2022", "module": "CommonJS", "strict": true, "types": [], "noEmit": true, "incremental": true, "assumeChangesOnlyAffectDirectDependencies": true }, "include": [ "src/**/*.ts" ]}// File: src/index.ts (omit this label)export const count: number = 1;
// Run in a temporary project:// tsc -p . --showConfig