I would like that the compilation of my TypeScript application fails if I don\'t have the typings (installed and references in TypeScript files) corresponding to external li
One quick way to make the compiler shut up is to declare the toastr variable as any.
declare toastr: any;
By default TypeScript will emit JavaScript even in the presence of errors. This is a feature. See Why TypeScript.
That said you have in your tsconfig "noEmitOnError": false,
. If you change it to true you will not get an emit if there is any error. Please note that this can decrease incremental compilation performance as the compiler needs to do whole program analysis even to give an emit on a single file.