TypeScript Compiler Options

noEmitOnError — TypeScript compiler option

Blocks emission when the compiler reports errors. When false, many type errors still allow JavaScript output; a nonzero compiler exit status still signals failure. This does not clean previously emitted files. Use fresh output directories to assess the actual behavior. Default: False when omitted. Create the named files in a clean local project and run tsc -p tsconfig.json. This deliberately invalid example must produce TS2322 and no emitted files. 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": {    "noEmitOnError": true  }}

Parameters & Attributes

NameTypeDescription
noEmitOnErrorbooleanSet 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"  },  "files": [    "example.ts"  ]}// File: example.tsconst count: number = "three";console.log(typeof count);
TypeScript Reference