Reputation: 16066
Visual Studio Code runs whatever TypeScript version that it's shipped with (currently v1.5). If I use some experimental compiler features such as AsyncFunctions then it will complain. Some other answers on SO say how to make VS Code to build project with a different version of TS, but I can't find an answer on how to make Language Service actually use the newer version.
Upvotes: 2
Views: 3102
Reputation: 913
I'm on a mac and for some reason this was disabled
Upvotes: 5
Reputation: 46
https://code.visualstudio.com/Updates#_languages-typescript-16-support
To enable 1.6 follow those directions. Repeated here for brevity...
VS Code uses TypeScript 1.5 in the box. If you want to use a newer version of TypeScript, you can define the typescript.tsdk setting. The value of this setting is the absolute path to the lib folder of a TypeScript installation. This folder contains the file tsserver.js and the corresponding lib.*.d.ts files. Refer to this blog post for how to install the nightly builds of TypeScript.
These setting are experimental i.e. bad things could happen :)
Upvotes: 3