Unknown compiler option 'noStrictGenericChecks'

{
    "compilerOptions": {
        "noStrictGenericChecks": true,
        "moduleResolution": "node",
        "target": "es5",
        "sourceMap": true,
        "experimentalDecorators": true,
        "emitDecoratorMetadata": true,
        "skipDefaultLibCheck": true,
        "lib": ["es6", "dom"],
        "types": ["node"]
    },
    "exclude": ["bin", "node_modules"],
    "atom": {
        "rewriteTsconfig": false
    }
}

Visual Studio json file code and build script

+4
source share
3 answers

The flag noStrictGenericCheckswas introduced as part of TypeScript 2.4 . Make sure you have the latest version of TypeScript installed.

You can upgrade the TypeScript version using if you use the globally installed TypeScript to compile:

npm install -g typescript
+6
source

I have the same error and typescript 2.4.0 is installed.

npm list typescript

prints typescript @ 2.4.0

My tsconfig.json file:

{
  "compilerOptions": {
    "noStrictGenericChecks": true,
    "module": "commonjs",
    "target": "es5",
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "noEmitHelpers": true,
    "noEmitOnError": true,
    "lib": [
        "es6",
        "dom",
        "es2015.iterable"
    ],
    "baseUrl": ".",
    "paths": {
        "*": [
            "./node_modules/tns-core-modules/*",
            "./node_modules/*"
        ]
    }
  },
  "exclude": [
    "node_modules",
    "platforms",
    "**/*.aot.ts"
  ]
}
+1
source

... - typescript - 2.4.2, typescript Microsoft Visual Studio 2.2.2:

VS-Extensions and Updates screen cover

I think this is the source of our pain.

+1
source

Source: https://habr.com/ru/post/1680618/


All Articles