TypeScript Compiler Options
--showConfig — TypeScript CLI
Prints the effective configuration as JSON rather than compiling. Useful for investigating inherited options, command-line overrides, computed strict-family settings and root file selection. The result is not the complete transitive file graph or proof of type correctness. Paths and serialization can vary by version and project layout. Baseline: TypeScript 5.8.3. Commands are run with the pinned local compiler in an isolated directory; omit file labels. CLI-only setting.
Formal Syntax & Structure
typescript syntaxtypescript
tsc -p . --showConfigParameters & Attributes
| Name | Type | Description |
|---|---|---|
| showConfig | boolean | Optional command switch; omit to leave the command inactive. |
Working Example
Example Snippettypescript
// File: base.json (omit this label){ "compilerOptions": { "target": "ES2022", "module": "CommonJS", "strict": true, "types": [], "outDir": "dist" }}// File: tsconfig.json (omit this label){"extends": "./base.json", "compilerOptions": {"noEmit": true}, "files": ["index.ts"]}// File: index.ts (omit this label)export const count: number = 7;
// Run in a temporary project:// tsc -p . --showConfig