TypeScript Compiler Options
extendedDiagnostics — TypeScript compiler diagnostics
Reports a more detailed breakdown of compiler statistics, including library and TypeScript lines, types, instantiations and timing. Use the metrics to compare controlled builds and identify whether deeper profiling is worthwhile. The counts are compiler internals, not a stable measure of code quality or runtime speed. Baseline: TypeScript 5.8.3. Default: false. Create the labeled files in an isolated directory and run the commands below. The report contains detailed line and instantiation counters as well as timing information.
Formal Syntax & Structure
typescript syntaxtypescript
{ "compilerOptions": { "extendedDiagnostics": true }}Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| extendedDiagnostics | boolean | Compiler option; default: false. |
Working Example
Example Snippettypescript
// File: tsconfig.json (omit this label){ "compilerOptions": { "target": "ES5", "module": "CommonJS", "lib": [ "ES5" ], "strict": true, "types": [], "outDir": "dist", "noEmitOnError": true, "extendedDiagnostics": true, "noEmit": true }, "files": [ "index.ts" ]}// File: index.ts (omit this label)export const count: number = 7;
// Run these commands in order in an isolated project:// tsc -p . --pretty false