Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Typescript 保存时未编译Visual Studio代码类型脚本_Typescript_Visual Studio Code - Fatal编程技术网

Typescript 保存时未编译Visual Studio代码类型脚本

Typescript 保存时未编译Visual Studio代码类型脚本,typescript,visual-studio-code,Typescript,Visual Studio Code,我正在努力让VisualStudio代码将我的TypeScript编译成Javascript。我已经在Visual Studio 2017中成功地使用了TS,但是我想我应该尝试一下VS代码 我已经运行了watch任务,终端输出中的最后一行是: 15:57:49-编译完成。正在监视文件更改。 然而,当我保存一个ts文件时,什么都没有发生。同样,在VS2017中,它在save fine上编译 项目中有一些地方会产生一些TS错误——这些地方是别人写的,不在我的项目范围之内。我想知道这些错误是否会停止编

我正在努力让VisualStudio代码将我的TypeScript编译成Javascript。我已经在Visual Studio 2017中成功地使用了TS,但是我想我应该尝试一下VS代码

我已经运行了watch任务,终端输出中的最后一行是:

15:57:49-编译完成。正在监视文件更改。

然而,当我保存一个ts文件时,什么都没有发生。同样,在VS2017中,它在save fine上编译

项目中有一些地方会产生一些TS错误——这些地方是别人写的,不在我的项目范围之内。我想知道这些错误是否会停止编译?或者它仍然应该以文件为基础进行编译

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" ] } { “编译器选项”:{ “noImplicitAny”:错, “noemiton”:没错, “removeComments”:false, “源地图”:正确, “目标”:“es5” }, “保存”:正确, “排除”:[ “节点_模块”, “wwwroot”, “打字/ckeditor/ckeditor.d.ts”, “打字/编辑/索引d.ts”, “打字/lodash/lodash.d.ts” ], “包括”:[ “***.ts” ] } 版本

VSCode 1.17.2

Typescript 2.5.3“NoeMitError”:如果发现Typescript错误,则true编译器选项将阻止生成javascript


关于编译器选项的更多信息

你是否面临错误?@Salman除了其他项目的linting错误之外,没有。那么,你怎么知道他们没有停止传输过程?@Salman我不知道他们是否正在停止传输过程,这是我问题的一部分:)但是VS 2017编译得很好似乎很奇怪。你定义了
“NoeMitError”:true
因此,如果存在类型脚本错误,将不会生成js