TypeScript Compiler Options
noEmit — TypeScript compiler option
Suppresses generated JavaScript, declarations and maps for ordinary non-incremental compilation while retaining type checking. Useful when a different tool produces the runtime code. It does not suppress diagnostics, remove old files, or guarantee that another tool performs equivalent checking. Incremental builds can still write build metadata. Default: False when omitted. Create the named files in a clean local project and run tsc -p tsconfig.json. Expected emitted files: none. Inspect the output files or diagnostics; there is no runtime step for this configuration. Tested with TypeScript 5.8.3 and Node.js 22.16.0; local project example, not a single-file editor.
Formal Syntax & Structure
typescript syntaxtypescript
{ "compilerOptions": { "noEmit": true }}Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| noEmit | boolean | Set in compilerOptions; False when omitted. |
Working Example
Example Snippettypescript
// File: tsconfig.json (omit this label){ "compilerOptions": { "target": "ES2022", "module": "CommonJS", "strict": true, "types": [], "noEmitOnError": true, "outDir": "dist", "noEmit": true }, "files": [ "example.ts" ]}// File: example.tsexport const count: number = 3;console.log(count);