noEmitOnError
The compiler option that stops tsc from writing any JavaScript if the project has type errors.
In more detail
By default tsc emits JavaScript even with type errors, because badly typed code may still run. Setting noEmitOnError prevents broken code from being shipped by a build that only looks at the output files.
Related terms
- noEmit — The compiler option that makes tsc check types without writing any output files.
- tsc — The command-line TypeScript compiler, which type-checks a project and writes JavaScript and declaration files.
- emitter — The last compiler phase, which writes the JavaScript output and optional declaration files from the checked syntax tree.
Taught in
- The Compiler Pipeline: tsc, AST And Code Emission — Production TypeScript