Myvideo

Guest

Login

Matt Pocock - Advanced TypeScript Patterns

Uploaded By: Myvideo
27 views
0
0 votes
0

(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 (1:39:46)Subclassing in Zod (1:43:04)Where Do External Types Come From? (1:48:28)Extract Types to Extend an External Library (1:49:27)Retrieve Function Parameters from an External Library (1:51:27)Navigating Lodash’s Type Definitions (1:54:53)Finding Proper Type Arguments and Generics with Lodash (1:56:14)Passing Type Arguments with Lodash (2:01:29)Navigating Express’s Type Definitions (2:10:36)Add Query Params to an Express Request (2:11:54)Make an Express Request Function Generic (2:15:38)Browsing Zod’s Types (2:18:23)Create a Runtime and Type Safe Function with Generics and Zod (2:20:02)Infer Runtime Arguments from a Zod Schema (2:24:40)Override External Library Types (2:26:17)Create a Declarations File to Override Types (2:30:08)Identity Functions as an Alternative to the `as const` (2:31:18)Narrowing in an Identity Function for Better Inference (2:32:39)Add Constraints to an Identity Function (2:33:09)Constraining and Narrowing an Identity Function (2:34:46)Specifying Where Inference Should Not Happen (2:36:25)Fix Inference Issues with (2:38:41)Find the Generic Flow of an Identity Function (2:39:51)Avoid Duplicate Code in an Identity Function with Generics (2:42:30)Reverse Mapped Types (2:43:49)Inference Inception in an Identity Function (2:46:06)Merge Dynamic Objects with Global Objects (2:47:05)Add Objects to the Global Scope Dynamically (2:49:24)Narrowing with an Array (2:50:43)Narrowing with Arrays and Generics (2:59:14)Create a Type-Safe Request Handler with Zod and Express (3:01:13)Type-Safe Request Handlers with Zod and Express (3:08:59)Building a Dynamic Reducer (3:12:55)Dynamic Reducer with Generic Types (3:24:23)Custom JSX Elements (3:25:29)Adding Custom Elements to

Share with your friends

Link:

Embed:

Video Size:

Custom size:

x

Add to Playlist:

Favorites
My Playlist
Watch Later