tsc - 在命令行中忽略错误

问题描述 投票:11回答:1

我有这个:

$ tsc -m amd --outFile dist/out.js lib/index.ts

lib / index.ts(87,48):错误TS1005:';'预期。

是否有一个命令行选项我可以用来忽略错误?

typescript typescript2.0 tsc
1个回答
3
投票

使用// @ ts-ignore注释,Typescript编译器将忽略它下面的行。

例如,您在此处收到了编译错误:

enter image description here

enter image description here

然后添加// @ ts-ignore enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.