This chapter explains the basics of object-oriented programming in TypeScript, and TypeScript classes and their differences from and similarities to C# classes. The reader will first become familiar with the new concepts with simple class examples, and then they will move on to how to represent a whole application domain with a network of classes, abstract classes, and interfaces.
TypeScript classes are ECMAScript 6 classes with the addition of type specifications. When the target is a lower JavaScript version, the TypeScript transpiler takes care of implementing classes with equivalent code, such as prototypes and constructor functions. Classes, and, in general, all TypeScript object-oriented features, help make ...