Cov txheej txheem:

Kuv yuav hloov TypeScript version hauv Visual Studio code li cas?
Kuv yuav hloov TypeScript version hauv Visual Studio code li cas?

Video: Kuv yuav hloov TypeScript version hauv Visual Studio code li cas?

Video: Kuv yuav hloov TypeScript version hauv Visual Studio code li cas?
Video: Qhia saib seb yus tu hlub комментарий thiab nias like rau leej twg 2021 2024, Hlis ntuj nqeg
Anonim

Hloov lub zos TypeScript version

  1. Qhib qhov project hauv VS Code .
  2. Nruab qhov xav tau TypeScript version hauv zos, piv txwv li npm nruab --save-dev ntaus ntawv @2.0.5.
  3. Qhib VS Code Chaw Chaw Ua Haujlwm (F1> Qhib Chaw Ua Haujlwm Chaw Ua Haujlwm)
  4. Hloov tshiab /Insert " ntaus ntawv .tsdk": "./node_modules/ ntaus ntawv /lib"

Tom qab ntawd, ib tus tuaj yeem nug, Kuv yuav hloov TypeScript version hauv Visual Studio li cas?

Teem TypeScript versions hauv Visual Studio 2017 version 15.3

  1. Txoj nyem rau ntawm qhov project node hauv Solution Explorer.
  2. Nyem Properties.
  3. Mus rau TypeScript Tsim tab.
  4. Hloov TypeScript version mus rau qhov xav tau version lossis "siv qhov muaj tam sim no" kom ib txwm ua raws li qhov tshiab tshaj plaws.

Tom qab ntawd, lo lus nug yog, Kuv yuav nrhiav tau kuv lub zos TypeScript version li cas? Lub -g txhais tau tias nws tau nruab rau hauv koj lub cev thoob ntiaj teb kom cov TypeScript compiler tuaj yeem siv rau hauv ib qho ntawm koj qhov project. Kuaj tias cov TypeScript yog ntsia kom raug los ntawm kev ntaus ntawv tsc -v nyob rau hauv koj lub davhlau ya nyob twg lossis hais kom ua. Koj yuav tsum saib TypeScript version luam tawm mus rau qhov screen.

Ib sab saum toj no, kuv yuav teeb tsa TypeScript hauv Visual Studio code li cas?

Hloov TypeScript rau hauv JavaScript

  1. Kauj ruam 1: Tsim ib daim ntawv TS yooj yim. Qhib VS Code ntawm qhov khoob khoob thiab tsim lub ntiaj teb nyob zoo.
  2. Kauj ruam 2: Khiav lub TypeScript tsim. Khiav Tsim Ua Haujlwm (Ctrl + Ua haujlwm + B) los ntawm lub ntiaj teb Terminal ntawv qhia zaub mov.
  3. Kauj ruam 3: Ua tus TypeScript Tsim lub neej ntawd.
  4. Kauj Ruam 4: Tshawb xyuas cov teeb meem tsim.

Kuv yuav pab IntelliSense code hauv Visual Studio li cas?

IntelliSense nta

  1. VS Code IntelliSense nta yog siv los ntawm kev pabcuam lus.
  2. Koj tuaj yeem ua rau IntelliSense hauv txhua lub qhov rais editor los ntawm kev ntaus Ctrl + Chaw lossis los ntawm kev ntaus tus cim cim (xws li cov cim dot (.)

Pom zoo: