Cov txheej txheem:

Kuv yuav sau TypeScript hauv Visual Studio li cas?
Kuv yuav sau TypeScript hauv Visual Studio li cas?

Video: Kuv yuav sau TypeScript hauv Visual Studio li cas?

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

Wb taug kev los ntawm kev sau ib qho yooj yim TypeScript Hello World program

  1. Kauj ruam 1: Tsim ib qho yooj yim TS ntaub ntawv. Qhib VS Code rau ntawm qhov khoob khoob thiab tsim lub ntiaj teb nyob zoo.
  2. Kauj ruam 2: Khiav lub TypeScript tsim .
  3. Kauj ruam 3: Ua tus TypeScript Tsim lub neej ntawd.
  4. Kauj Ruam 4: Kev tshuaj xyuas tsim teeb meem.

Tsis tas li ntawd, kuv yuav sau TypeScript tau li cas?

Tso koj TypeScript cov ntaub ntawv uas koj tab tom ua haujlwm tam sim no nyob rau hauv lub vaj huam sib luag sab laug thiab cov ntaub ntawv JavaScript tsim hauv vaj huam sib luag sab xis. Daim ntawv ceeb toom yog tias koj hloov mus rau qhov TypeScript cov ntaub ntawv, cov ntaub ntawv JavaScript tsis hloov kho. Koj yuav tsum nias lub CMD-Shift-B thiaj li yuav sau ua ke cov ntaub ntawv. IB TUG.

Tsis tas li ntawd, kuv yuav ua li cas thiaj khiav TypeScript compiler? Rau nruab lub TypeScript compiler , koj siv npm, thiab ntaus npm nruab -g ntaus ntawv . Qhov ntawd yuav download tau thiab nruab lub compiler . Thaum ua tiav, koj tuaj yeem sim nws nrog tsc -v, li TypeScript compiler version, thiab yuav luam tus lej version.

Ib tug kuj yuav nug, Kuv yuav ua li cas sau cov ntaub ntawv TS hauv Visual Studio 2017?

Siv TypeScript hauv Visual Studio 2017

  1. Kauj ruam 1: Tsim ib qhov tshiab Asp. Net Core project.
  2. Kauj ruam 2: Ntxiv Microsoft. AspNetCore. StaticFiles ntawm NuGet.
  3. Kauj ruam 3: Ntxiv ib daim ntawv tais ceev tseg rau TypeScript.
  4. Kauj ruam 4: Configure TypeScript compiler.
  5. Kauj ruam 5: Teeb NPM.
  6. Kauj ruam 6: Teeb lub gulp.
  7. Kauj ruam 7: Sau ib nplooj ntawv HTML.
  8. Kauj ruam 8: Khiav qhov project.

ESLint siv rau dab tsi?

ESLint yog qhov qhib JavaScript linting utility thawj zaug tsim los ntawm Nicholas C. Zakas thaum Lub Rau Hli 2013. Code linting yog ib hom kev tshuaj xyuas zoo li qub uas nquag siv txhawm rau nrhiav cov qauv teeb meem lossis cov cai uas tsis ua raws li qee qhov kev cai style.

Pom zoo: