下面是我正在默认设置为tsconfig --init(tsc v3.2.4)转换为js的index.ts文件的内容
console.log("foo");
these crazy typos will compile all though compilation raises errors
console.log("bar")
无论输入内容如何,打字稿编译器都会输出一个构建。
有办法控制吗?
例如:如果在编译过程中出现错误,则使打字稿编译器不输出任何内容。
答案 0 :(得分:1)
看看https://www.typescriptlang.org/docs/handbook/compiler-options.html中的noEmitOnError
标志