O'Reilly logo

Switching to Angular 2 by Minko Gechev

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. TypeScript Crash Course

In this chapter, we are going to start working with TypeScript, the language Angular 2 recommends for scripting. All the features ECMAScript 2015 and respectively ECMAScript 2016 provides, such as functions, classes, modules, and decorators, are already implemented in or added to the roadmap of TypeScript. Because of the extra type annotations, there are some syntactical additions compared to JavaScript.

For smoother transition from the language we already know - ES5, we will start with some common features between ES2016 and TypeScript. Where there are differences between the ES syntax and TypeScript, we'll explicitly mention it. In the second half of the chapter, we'll add the type annotations to everything ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required