orad
orad

Reputation: 16066

How to enable latest TypeScript Language Service in VS Code?

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

Answers (2)

Joe Shakely
Joe Shakely

Reputation: 913

Answer here

I'm on a mac and for some reason this was disabled

Extensions > @builtin typescript > Enable

Upvotes: 5

Sean McBReen
Sean McBReen

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

Related Questions