Phase 7 · TypeScript

Topics

Interfaces

Part of the Frontend Developer Roadmap.

Summary

A way to define the shape of an object — its properties and their types — so TypeScript can check that objects conform to a contract.

How to Learn This

  • 1Define an interface for a data model in one of your projects (e.g. `User`).
  • 2Practice optional (`?`) and readonly properties on an interface.
  • 3Learn when to use `interface` vs `type` — largely interchangeable, with a few differences.
InsideEdge

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — free on the InsideEdge app.

Download
InsideEdge