- All Courses
- TypeScript for Application Developers
- How the Type System Thinks
- Structural typing and assignability
Structural typing and assignability
TypeScript compares shapes, not names. Two unrelated types are interchangeable if their members line up, which explains most surprising assignability errors.
- 12m
- Intermediate

Video by Shawn Wildermuth · YouTube
Check your understanding
3 questions. Unlocks when you finish the video.
Overview
What this lesson covers
- Compare types by structure rather than declaration
- Read an assignability error from the mismatched member up
- Use branded types when structural compatibility is too loose
This lesson sits in How the Type System Thinks, part of TypeScript for Application Developers. It assumes what came before it and leads directly into the next lesson in the module.
In this lesson you will:
- Compare types by structure rather than declaration
- Read an assignability error from the mismatched member up
- Use branded types when structural compatibility is too loose
Resources
Your notes will live here
Note taking is not available yet. Nothing you type would be saved, so the tab stays read-only for now.