Cov txheej txheem:

Kuv yuav tsim TypeScript li cas?
Kuv yuav tsim TypeScript li cas?

Video: Kuv yuav tsim TypeScript li cas?

Video: Kuv yuav tsim TypeScript li cas?
Video: Kablia vwj & yog vim li cas Nkaujtawmtshiab 2024, Hlis ntuj nqeg
Anonim

Thawj rau cov kauj ruam yog tib yam hauv peb txoj hauv kev, yog li cia peb pib

  1. Kauj ruam 1: Nruab Node. js/npm.
  2. Kauj ruam 2: Nruab Visual Studio Code los yog lwm yam editor.
  3. Kauj Ruam 3: Teeb tsa pob.
  4. Kauj ruam 4: Nruab Sau ntawv .
  5. Kauj ruam 5: Nruab React lossis Preact.
  6. Kauj Ruam 6: Sau qee qhov React code.

Ib sab ntawm no, kuv yuav pib TypeScript li cas?

Kev teeb tsa TypeScript

  1. Nruab TypeScript compiler. Txhawm rau pib, TypeScript compiler yuav tsum tau teeb tsa txhawm rau hloov TypeScript cov ntaub ntawv rau hauv cov ntaub ntawv JavaScript.
  2. Xyuas kom tseeb tias koj tus editor tau teeb tsa los txhawb TypeScript.
  3. Tsim ib daim ntawv tsconfig.json.
  4. Transpile TypeScript rau JavaScript.

Kuj Paub, yog dab tsi ?: Hauv TypeScript? Los ntawm txhais, " TypeScript yog JavaScript rau kev txhim kho daim ntawv thov. " TypeScript yog ib hom lus zoo heev, yam khoom taw qhia, sau ua lus. TypeScript yog ib tug ntaus superset ntawm JavaScript compiled rau JavaScript. Hauv lwm lo lus, TypeScript yog JavaScript ntxiv rau qee qhov ntxiv nta.

Yog li ntawd, yog TypeScript yooj yim kawm?

Cov txiaj ntsig ntawm kev siv TypeScript Technically, koj tsis tas yuav kawm TypeScript los ua tus tsim tawm zoo, cov neeg feem coob ua tau zoo yam tsis muaj nws. Txawm li cas los xij, ua haujlwm nrog TypeScript nws yeej muaj nws cov txiaj ntsig: Vim yog kev ntaus ntawv zoo li qub, cov lej sau rau hauv TypeScript yog kwv yees ntau dua, thiab feem ntau yog yooj yim dua mus debug.

Puas yog TypeScript frontend lossis backend?

TypeScript yog ib tug natural haum rau lub ntiaj teb no ntawm pem hauv ntej daim ntawv thov. Nrog nws cov kev txhawb nqa nplua nuj rau JSX thiab nws lub peev xwm los ua qauv kev hloov pauv, TypeScript qiv cov qauv thiab kev nyab xeeb rau koj daim ntawv thov thiab ua kom yooj yim rau kev sau kom raug, tswj tau cov cai hauv qhov chaw ceev ceev uas yog pem hauv ntej kev loj hlob.

Pom zoo: