Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tsc unknown compiler option allowNonTsExtensions

Tags:

typescript

tsc

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 [email protected] globally in npm.

Link to the project being used.

like image 241
prolink007 Avatar asked Oct 30 '22 15:10

prolink007


1 Answers

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.

like image 176
Martin Vseticka Avatar answered Nov 20 '22 14:11

Martin Vseticka