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.