TypeScript Compiler Options
disableSourceOfProjectReferenceRedirect — TypeScript project configuration
Stops editor use of referenced source in place of declaration outputs, favoring declaration boundaries. A build may be needed for accurate navigation. The example verifies the option is parsed; editor behavior has not been executed. Baseline: TypeScript 5.8.3. Default: false. Example: create the labeled files in an isolated project and run the commands in order. See companion fixtures for comparison cases and expected results. ShowConfig reports the selected option as true. This verifies parsing only.
Formal Syntax & Structure
typescript syntaxtypescript
{ "compilerOptions": { "disableSourceOfProjectReferenceRedirect": true }}Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| disableSourceOfProjectReferenceRedirect | boolean | Compiler option; default: false. |
Working Example
Example Snippettypescript
// File: tsconfig.json (omit this label){ "compilerOptions": { "target": "ES2022", "module": "CommonJS", "strict": true, "types": [], "composite": true, "disableSourceOfProjectReferenceRedirect": true }, "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 . --showConfig