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 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.