0

I cannot compile single ts-2.2.2 file, output I get is:

error TS5023: Unknown compiler option 'strictNullChecks'.

error TS5023: Unknown compiler option 'alwaysStrict'.

In the bottom-right corner VSCode displays TypeScript 2.2.2 which is the version I want to target. However, if I open my *.ts file, at the top of the screen a warning appears saying that "Version mismatch! global tsc (1.8.34) != VS Code's language service (2.2.2). Inconsistent compile errors might occur".

If I execute command 'where tsc' I get:

C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.8\tsc.exe

C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.8\tsc.js

How to excplicitly point the typescript compiler so that build process uses ts 2.2.2?

user3284063
  • 665
  • 5
  • 20
  • I am not familiar with the "Microsoft SDK" you are using, but the compiler you're using on the command line has nothing to do with the one VSCode uses. Yan you not just update the SDK? – Sebastian Sebald Mar 28 '17 at 14:06
  • Work is still in progress, but I am a little closer to solution (perhaps, not sure...) after changing *"command": "tsc"* to *"command": "tsc.cmd"* in a *tasks.json*. I dug it up on same page, but I honestly don't remember which. – user3284063 Mar 29 '17 at 09:26
  • Also, according to this post http://stackoverflow.com/questions/31189875/does-vs-code-install-typescript-and-if-so-where I deleted an entry from $Path. I have no idea if it resolves the gist of my problem, but at least VSCode does not complain about *"Version mismatch! global tsc (1.8.34) != VS Code's language service (2.2.2). Inconsistent compile errors might occur"* – user3284063 Mar 29 '17 at 09:48

0 Answers0