TypeTransformations

(0:00:00)Type Transformations Workshop Welcome: Explainer (0:01:08)Get the Return Type of a Function (0:01:47)Use a Utility Type to Extract a Function’s Return Type (0:03:17)Typeof Keyword, and Type Level (0:05:18)Extract Function Parameters Into A Type (0:05:42)Use a Utility Type to Extract Function Parameters (0:06:28)Extract The Awaited Result of a Promise (0:07:05)Use Utility Types To Extract a Promise’s Result (0:08:03)Create a Union Type From an Object’s Keys (0:08:36)Create Unions from Objects Using Two Operators (0:10:06)Understand The Terminology Around Unions (0:10:28)Union Terminology Examples (0:12:09)Extracting Members of a Discriminated Union (0:12:54)Extract From A Union Using a Utility Type (0:14:36)Excluding Parts of a Discriminated Union (0:14:55)Use a Utility Type to Remove a Single Member of a Union (0:15:27)The Power of Union Types in TypeScript: Explainer (0:18:13)Extract Object Properties into Individual Types (0:18:52)Use Indexed Access Types to Extract Object Properties (0:19:58)Extract the Discriminator from a Discriminated Union (0:20:22)Simple Syntax Used to Access Parts of a Discriminated Union (0:21:18)Resolve an Object’s Values as Literal Types (0:22:20)The Annotation Used to Infer an Object’s Values as Literal Types (0:24:42)Create a Union From an Object’s Values (0:25:35)Extract Specific Members From A Union with Indexed Access (0:26:46)Get All of an Object’s Values (0:27:13)Use Two Operators With Indexed Access to Get All of an Object’s Values (0:28:08)Create Unions out of Array Values (0:28:37)Methods Used to Create Unions out of Array Values (0:30:01)Only Allow Specified String Patterns (0:30:43)Template Literal with Strings (0:31:51)Extract Union Strings Matching a Pattern (0:32:52)Extracting String Pattern Matches with Template Literals (0:33:53)Create a Union of Strings with All Possible Permutations of Two Unions (0:34:29)Passing Unions Into Template Literals (0:36:42)Splitting A String into a Tuple (0:37:26)Using S From ts-toolbelt to Split a String Into a Tuple (0:38:27)Create an Object Whose Keys Are Derived From a Union (0:39:01)Use a Utility Type to Create An Object From A Union (0:39:58)Transform String Literals To Uppercase (0:40:31)Manipulate String Literals Using Type Helpers (0:41:42)Template Literals in Mattermost: Explainer (0:43:37)Introducing Type Helpers (0:44:18)Create Functions that Return Types (0:47:03)Creating a Maybe Type Helper (0:47:25)The Unconstrained Maybe Type Helper (0:48:42)Ensure Type Safety in a Type Helper (0:49:48)Use Constraints to Limit Type Parameters (0:52:48)Create a Reusable Type Helper (0:53:15)Add Support for Multiple Types in a Type Helper (0:53:50)Optional Type Parameters in Type Helpers (0:54:32)Set a Default Type Value in a Type Helper (0:56:24)Functions as Constraints for Type Helpers (0:57:23)Support Function Type Constraints with Variable Arguments (1:00:04)Constraining Types for Anything but null or undefined (1:00:46)Exclude null and undefined from the Maybe Type (1:04:21)Constraining Type Helpers to Non-Empty Arrays (1:04:54)Enforce a Minimum Array Length in a Type Helper (1:06:51)Explainer: Type Helpers in Redux (1:11:49)Add Conditional Logic to a Type Helper (1:12:28)Compare and Return Values with Extends and the Ternary Operator (1:14:54)Refine Conditional Logic in a Type Helper (1:15:54)Prevent Unwanted Type Scenarios from Happening (1:18:25)How TypeScript Added Conditional Types: Explainer (1:20:00)Introducing infer for Conditional Logic (1:21:08)Infer Elements Inside a Conditional with Infer (1:23:50)Extract Type Arguments to Another Type Helper (1:24:50)Use infer with Generics to Extract Types from Arguments (1:27:25)Extract Parts of a String with a Template Literal (1:27:56)Pattern Matching on Template Literals with Infer (1:29:23)Template Literal Types Were Nearly Regexes: Explainer (1:32:13)Extract the Result of an Async Function (1:33:05)Optionally Infer the Return Type of a Function (1:34:27)Extract the Result From Several Possible Function Shapes (1:35:18)Two Methods for Extracting the Result of Multiple Possible Functions (1:36:34)Distributivity in Conditional Types (1:37:30)Using Generic Context to Avoid Distributive Conditional Types (1:45:15)Map Over a Union to Create an Object (1:45:54)Use Mapped Types to Create an Object from a Union (1:47:57)Mapped Types with Objects (1:48:32)Map Over the Keys of an Object (1:50:57)Transforming Object Keys in Mapped Types (1:51:51)Remapping Object Keys in a Mapped Type (1:54:00)How Excalidraw uses Mapped Types to Save Lines of Code: Explainer (1:55:44)Conditionally Extract Properties from Object (1:56:37)Selective Remapping with Conditional Types and Template Literals (1:59:52)Map a Discriminated Union to an Obj
Back to Top