0Pricing
TypeScript Academy · Lesson

Interfaces vs Type Aliases

Compare interfaces and type aliases: both can describe shapes, but they differ in extension, merging, and advanced cases.

Intro

Goal: Understand when to use interfaces vs type aliases. Both describe shapes, but they differ in features and use cases.

Basic interface

Interfaces declare object shapes, can extend other interfaces, and support merging across declarations.

interface User {
  id: number;
  name: string;
}

const u: User = { id: 1, name: "Ada" };

All lessons in this course

  1. Object types, optional/readonly, index signatures
  2. Interfaces vs Type Aliases
  3. Structural typing & excess property checks
← Back to TypeScript Academy