tsc unknown compiler option allowNonTsExtensions

删除回忆录丶 提交于 2019-12-07 05:49:25

问题


I am getting error TS5023: Unknown compiler option 'allowNonTsExtensions' when trying to run tsc on a project.

Here is my tsconfig.json file.

{
  "compilerOptions": {
    "target": "ES5",
    "allowNonTsExtensions": true,
    "module": "commonjs",
    "sourceMap": true,
    "isolatedModules": true,
    "noEmitOnError": false,
    "rootDir": ".",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true
  },
  "compileOnSave": false
}

Using typescript@1.6.2 globally in npm.

Link to the project being used.


回答1:


The option is not defined for tsconfig.json. You can check it in wiki or in the source code:

  • https://github.com/Microsoft/TypeScript/blob/master/src/compiler/commandLineParser.ts#L477 - parsing method

  • https://github.com/Microsoft/TypeScript/blob/master/src/compiler/commandLineParser.ts#L9 - the list of options

allowNonTsExtensions is an option that is a part of compiler API that is internal.



来源:https://stackoverflow.com/questions/33785337/tsc-unknown-compiler-option-allownontsextensions

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!