在项目上运行tsc
时,我得到了error TS5023: Unknown compiler option 'allowNonTsExtensions'
。
这是我的tsconfig.json
文件。
{
"compilerOptions": {
"target": "ES5",
"allowNonTsExtensions": true,
"module": "commonjs",
"sourceMap": true,
"isolatedModules": true,
"noEmitOnError": false,
"rootDir": ".",
"emitDecoratorMetadata": true,
"experimentalDecorators": true
},
"compileOnSave": false
}
在CCD_ 5中全局使用CCD_。
指向正在使用的项目的链接。
未为tsconfig.json
定义该选项。您可以在wiki或源代码中查看:
-
https://github.com/Microsoft/TypeScript/blob/master/src/compiler/commandLineParser.ts#L477-解析方法
-
https://github.com/Microsoft/TypeScript/blob/master/src/compiler/commandLineParser.ts#L9-选项列表
allowNonTsExtensions
是编译器API内部的一个选项。