Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97327

VSCode does not recognize typescript 3.7.2 features

$
0
0

I'm using VS Code 1.40.0 and i have the following package.json

{
  "name": "test",
  "version": "0.0.1",
  "description": "test",
  "main": "./src/main.ts",
  "sideEffects": false,  
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@typescript-eslint/eslint-plugin": "^2.6.1",
    "@typescript-eslint/parser": "^2.6.1",
    "eslint": "^6.5.1",
    "typescript": "^3.7.2"
  },
  "dependencies": {
  }
}

And the following tsconfig.json

{
    "compilerOptions": {
        "lib": [
            "es2019",
            "dom",
            "es2019.array"
        ],
        "target": "es6",
        "module": "es6",
        "strict": true,
        "strictBindCallApply": true,
        "strictFunctionTypes": true,
        "strictPropertyInitialization": true,
        "moduleResolution": "node",
        "noImplicitAny": true,
        "noImplicitReturns": true,
        "noImplicitThis": true,
        "forceConsistentCasingInFileNames": true,
        "noFallthroughCasesInSwitch": true,
        "strictNullChecks": true,
        "removeComments": true,
        "preserveConstEnums": true,
        "sourceMap": true,
        "alwaysStrict": true,
        "esModuleInterop": true,
        "allowSyntheticDefaultImports": true,
        "noUnusedLocals": true,
        "noUnusedParameters": true
    }
}

But when writing the following code const a = null ?? 0; vscode complains, but when compiling it works as intended, so is there some setting that must be changed to allow vscode to to parse Typescript 3.7 correctly?


Viewing all articles
Browse latest Browse all 97327

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>