Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Stop Writing Your ID Types Like This - TypeScript Branded Types Tutorial

Web Dev Simplified via YouTube

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn how to implement branded types in TypeScript to solve common ID confusion problems in larger projects. Explore the fundamental issues that branded types address, starting with scenarios where different ID types can be accidentally mixed up, leading to runtime errors. Discover how to create basic branded types using TypeScript's type system to ensure compile-time safety when working with different identifier types. Master advanced branded type techniques for more complex use cases and learn practical integration strategies with popular libraries like Zod for schema validation. Examine how to incorporate branded types with Drizzle ORM and other common TypeScript tools to build more robust type-safe applications. Understand when branded types become essential as projects scale in size and complexity, moving from a nice-to-have feature in small projects to a critical tool for maintaining code quality in larger codebases.

Syllabus

00:00 - Introduction
00:29 - Problem Branded Types Solves
02:50 - Creating Basic Branded Type
08:50 - Advanced Branded Types
10:46 - Zod Integration
12:48 - Other Branded Type Integrations

Taught by

Web Dev Simplified

Reviews

Start your review of Stop Writing Your ID Types Like This - TypeScript Branded Types Tutorial

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.