[英]How to save typescript compiler errors in json file?
I want to save errors in json file format so I can parse those errors in language of my choice (ruby/python) to refactor my code.我想以 json 文件格式保存错误,这样我就可以用我选择的语言(ruby/python)解析这些错误以重构我的代码。
I tried --pretty option but it did not gave output in json format我尝试了 --pretty 选项,但它没有以 json 格式提供 output
There is no official compiler option to format the errors in JSON format.没有官方编译器选项可以将错误格式化为JSON格式。 Here is the Output Formatting Reference .
这是Output 格式参考。
To export your errors into a file, you can use the >
-Syntax:要将错误导出到文件中,您可以使用
>
-语法:
tsc .\src\main.ts --pretty > errors.json
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.