visual studio code - How to config vscode to work with Typescript 2 RC? -


i want work typescript 2 rc (actually v2.0.2) in vscode. how can configure editor work that?

note: want use npm based type declarations.

vs code ships recent stable version of typescript. if want use newer version of typescript, can define typescript.tsdk setting (file > preferences > user/workspace settings) pointing directory containing typescript tsserver.js file.

to install latest typescript version, run:

npm install typescript@next 

tip: specific typescript version, specify @version. example typescript 2.0, use

npm install typescript@2.0.0. 

you can find installation location using npm list typescript, tsserver.js under lib folder.

for example:

{    "typescript.tsdk": "node_modules/typescript/lib" } 

the directory path can absolute or relative workspace directory. using relative path, can share workspace setting team. refer blog post more details on how install nightly builds of typescript.

after setting typescript.tsdk, restart vs code , typescript version shown in bottom right of status bar when open javascript or typescript file.

source: https://code.visualstudio.com/docs/languages/typescript#_using-newer-typescript-versions


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -