Implement interfaces in TypeScript

Intermediate
Developer
Student
Azure

JavaScript doesn't support interfaces so, as a JavaScript developer, you may or may not have experience with them. In TypeScript, you can use interfaces as you would in traditional object-oriented programming. You can also use interfaces to define object types and this is the primary focus of this module.

Learning objectives

In this module, you will learn how to:

  • Explain the reasons for using an interface in TypeScript.
  • Declare and instantiate an interface.
  • Extend an interface.
  • Declare an interface with custom array types.

Prerequisites

  • Knowledge of TypeScript
  • Familiarity with JavaScript
  • Familiarity with functions and arrays in JavaScript
  • Installed software: