tsc 未知编译器选项 allowNonTsExtensions
tsc unknown compiler option allowNonTsExtensions
我在尝试 运行 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
}
在 npm
中全局使用 typescript@1.6.2
。
Link 到正在使用的 project。
未为 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
是 compiler API 内部的一个选项。
我在尝试 运行 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
}
在 npm
中全局使用 typescript@1.6.2
。
Link 到正在使用的 project。
未为 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
是 compiler API 内部的一个选项。