ES6 and beyond

In addition to Type annotation, TypeScript supports EcamaScript 6 (ES6/ES2015) alongside other helpful features, such as enums, decorators, accessibility level (private, public, and protected), interfaces, generics, and so on

We will take a deep look into a few of the features in the next chapter. Before that, let's get our feet wet and our hands a little bit dirty by trying another example, which comprises some of these ES6 and TypeScript-specific features. We will build a counter app. This is just an attempt to get you excited about these features, and you get to see how TypeScript brings the features you always wished existed in JavaScript.

Let's get started with a basic HTML template:

<!-- Code 2.4.html --><div class="container"> ...

Get TypeScript 2.x for Angular Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.