Visual Studio 未显示打字稿错误 [英] Visual Studio not showing typescript errors

查看:43
本文介绍了Visual Studio 未显示打字稿错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个奇怪的问题.我安装了带有打字稿的 VS2013.当我单击 .ts 文件的保存按钮时,会调用 ts 编译器,但 VS 没有显示任何 ts 错误.如果编译器失败,我只会收到一条消息 输入文件包含语义错误".

I am running into s strange problem. I have VS2013 installed with typescript. When I click on save button of a .ts file, the ts compiler is invoked, but VS does not show any ts errors. If the compiler fails I just get a message "Input file contained semantic errors".

现在我不知道错误在哪里.有人知道如何解决此问题,以便我查看实际错误吗?

Now I don't know where the errors are. Does someone know how to fix this, so I can see the actual errors?

推荐答案

通常任何错误都会出现在 Visual Studio 的错误和警告"窗口中.

Usually any errors would appear in the "Errors and Warnings" window in Visual Studio.

如果您遇到它们没有出现的情况,您可以尝试从命令行手动运行 TypeScript 编译器:

If you have a case where they aren't appearing, you can try manually running the TypeScript compiler from the command line:

tsc yourfile.ts

这会将任何错误输出到命令行窗口.

This will output any errors to the command line window.

如果你还是卡住了,你可以提供一些代码,我们可以给出更具体的建议.

If you are still stuck, you can supply some code and we can give more specific advice.

这篇关于Visual Studio 未显示打字稿错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆