CHAPTER 2

image

The New Syntax

In this chapter, you’re going to look at the TypeScript additions to the JavaScript language. You’ll learn about its strong typing features first and then move on to its object-oriented specific features. In particular, this chapter covers the following:

  • Static typing
  • Classes
  • Interfaces
  • Modules

TypeScript is a design-time-only language—that is, it exists only prior to compilation (into JavaScript) in your IDE—so I’ll try to reveal as much of the tooling that’s relevant to each feature as you go along as well.

Most of you reading this will be new to TypeScript, but not necessarily to JavaScript, so I’ll assume you know ...

Get TypeScript Revealed now with O’Reilly online learning.

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