I'm struggling to get Visual Studio Code to compile my TypeScript to Javascript. I've been successfully working with TS in Visual Studio 2017, however I thought I'd give VS Code a try.
I've got the watch task running, the last line in the terminal output is:
15:57:49 - Compilation complete. Watching for file changes.
However, when I save a ts file, nothing is happening. Again, in VS2017, it compiles on save fine.
There are areas of the project that produce a fair few TS errors - these are areas that have been written by others and are out of the scope of my project. I'm wondering if these errors would be stopping the compilation? Or should it still compile on a file-by-file basis?
ts.config
{ "compilerOptions": { "noImplicitAny": false, "noEmitOnError": true, "removeComments": false, "sourceMap": true, "target": "es5" }, "compileOnSave": true, "exclude": [ "node_modules", "wwwroot", "typings/ckeditor/ckeditor.d.ts", "typings/ckeditor/index.d.ts", "typings/lodash/lodash.d.ts" ], "include": [ "**/*.ts" ] }
Versions
VSCode 1.17.2
Typescript 2.5.3
"noEmitOnError": true
so if you have typescript errors js won't be generated – Aleksey L.