繁体   English   中英

打字稿去除所有类型信息,只输出纯 JS - 忽略所有导入和其他错误

[英]Typescript strip all type information and just output plain JS - ignore all imports and other errors

我有一个打字稿文件,只想从中删除所有打字稿信息并输出 Javascript。

我不想看到错误(不存在的导入、未定义的类型等)我只想删除类型信息。

我怎么做?

如果您使用的是 Visual Studio,您可以取消选中do not emit outputs if any errors are reported

转到properties (按 alt + shift)并在Typescript Build选项卡中取消选中do not emit outputs if any errors are reported

最后构建您的项目或保存打字稿文件以生成 javascript 文件。

在此处输入图片说明

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM