Advanced TypeScript Patterns

(0:00:00)Advanced Workshop Welcome (0:01:13)What is a Branded Type? (0:04:36)Form Validation with Branded Types (0:06:15)Assigning Branded Types to Values (0:07:52)Using Branded Types as Entity Id’s (0:08:35)Add Branded Types to Functions and Models (0:11:29)Creating Reusable Validity (0:12:39)Checks with Branded Types and Type Helpers (0:12:39)Combine Type Helpers with Branded Types (0:14:31)Creating Validation Boundaries with Branded Types (0:16:24)Using Branded Types to Validate Code Logic (0:20:10)Using Index Signatures with Branded Types (0:21:24)Indexing an Object with Branded Types (0:23:44)TypeScript’s Global Scope (0:24:46)Add a Function to the Global Scope (0:29:23)Add Functionality to Existing Global Interfaces (0:30:25)Use Declaration Merging to Add Functionality to the Global Window (0:35:09)Add Types to Properties of Global Namespaced Interfaces (0:36:12)Typing in the NodeJS Namespace (0:39:38)Colocating Types for Global Interfaces (0:41:37)Solving the Colocation Problem with Globals (0:44:33)Filtering with Type Predicates (0:45:22)Use a Type Predicate to Filter Types (0:48:18)Checking Types with Assertion Functions (0:49:31)Ensure Valid Types with an Assertion Function (0:52:17)Avoiding TypeScript’s Most Confusing Error (0:53:04)Declare Assertion Functions Properly to Avoid Confusing Errors (0:53:41)Combining Type Predicates with Generics (0:55:26)Filtering with Type Predicates and Generics (0:58:00)Combining Brands and Type Predicates (0:58:50)Checking for Validity with Brands and Type Predicates (0:59:34)Combining Brands with Assertion Functions (0:59:57)Validate Types with Brands and Assertions (1:01:02)Classes as Types and Values (1:02:04)Using Classes in TypeScript (1:02:58)Dive into Classes with Type Predicates (1:05:11)Simplifying TypeScript with Type Predicates (1:07:51)Assertion Functions and Classes (1:09:16)Leverage Assertion Functions for Better Inference in Classes (1:10:43)Class Implementation Following the Builder Pattern (1:18:29)TRPC’s Creator on the Builder Pattern (1:22:37)Create a Type Safe Map with the Builder Pattern (1:23:45)Getters and Setters in the Builder Pattern (1:26:05)Debugging the Builder Pattern (1:26:45)Default Generics in the Builder Pattern (1:29;27)Building Chainable Middleware with the Builder Pattern (1:33:08)The Power of Generics and the Builder Pattern
Back to Top