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?