Using TypeScript

Let's start writing some TypeScript!

In the following sections, we will take a look at different snippets showing some of the features of TypeScript. In order to be able to run the snippets and play with them yourself, you'll need to install the TypeScript compiler on your computer. Let's take a look at how to do this.

TypeScript is best installed using Node Package Manager (npm). I'd recommend that you use npm's version 3.0.0 or newer. If you don't have node.js and npm installed already, you can visit https://nodejs.org and follow the instructions there.

Installing TypeScript with npm

Once you have npm installed and running, verify that you have the latest version by opening your terminal window and running the following command: ...

Get Getting Started with Angular - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.