Lesson 4.2
Typing external data at the boundary
Data from the network is unknown until you prove otherwise. A runtime schema validates it once and gives you a static type for free.
7mIntermediate10,686 students

Sign in to watch this lesson
Browsing is free. Create an account to play videos and track your progress.
Overview
Data from the network is unknown until you prove otherwise. A runtime schema validates it once and gives you a static type for free.
What this lesson covers
- Parse unknown input instead of casting it
- Derive a static type from a runtime schema
- Fail loudly at the boundary rather than deep inside
This lesson sits in TypeScript in Practice, 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:
- Parse unknown input instead of casting it
- Derive a static type from a runtime schema
- Fail loudly at the boundary rather than deep inside