TypeScript will always compile even if there are ridiculous errors in your project. This lesson shows how to configure your .tsconfig with "noEmitOnError" so that no files are output if tsc reports an error.
tsconfig.json:
{ "compilerOptions": { "module": "commonjs", "target": "es5", "noImplicitAny": false, "sourceMap": false, "outDir": "./dist", "noEmitOnError": true }, "files": [ "main.ts" ] }