⊗jstsPmBsCom 2 of 55 menu

Compiling TypeScript

The TypeScript compiler can be installed via npm:

npm install -g typescript

After that, you can compile files written in TypeScript. These files should have the extension .ts. Let's make such a file:

let test: string = 'it works'; alert(test);

Let's compile it into a file with the same name, but with the extension .js. To do this, in the terminal, while in the folder with our file, run the command tsc:

tsc app.ts

To get started with TypeScript faster, there is an online compiler. Try it out too.

Install TypeScript. Try compiling a test file.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline