梗概
- 可以在ts 编译配置文件中配置ts-node
示例
在ts 编译配置文件中添加如下配置项
"ts-node": {
// It is faster to skip typechecking.
// Remove if you want ts-node to do typechecking.
"transpileOnly": true,
"files": true,
"compilerOptions": {
// compilerOptions specified here will override those declared below,
// but *only* in ts-node. Useful if you want ts-node and tsc to use
// different options with a single tsconfig.json.
}
},常用配置项
transpileOnly忽略ts类型报错