ReturnType<>
andParameters<>
- Extracting type from tuples
Awaited<>
: Extract a Promise result- Create a Union type from an Object keys
- Extract from a union
- Exclude from a union
- Index Access
- Discriminated union to discriminator
- Extract specific member from a union with index access
- Get All of an object value
- Create Union out of array values
- Extract type of element of an array
- Only allow specified string pattern
- Extract Union Strings Matching a Pattern
- Create a Union of Strings with All Possible Permutations of Two Unions
- Splitting A String into a Tuple
- Create an Object Whose Keys Are Derived From a Union
- Create Functions that Return Types
- Ensure Type Safety in a Type Helper
- Create Type Helper with multiple parameter
- Optional Type Parameters with default type
- Functions as Constraints for Type Helpers
- Constraining Types for Anything but null or undefined
- Constraining Type Helpers to Non Empty Arrays
- Add Conditional Logic to a Type Helper
- Nested logic in a Type Helper
- Inferring Elements Inside a Conditional with Infer
- Extract Type Arguments to Another Type Helper
- Extract Parts of a String with a Template Literal
- Extract the Result of an Async Function
- Extract the Result From Several Possible Function Shapes
- Distributivity in Conditional Types
- Map Over a Union to Create an Object
- Mapped Types with Objects
- Conditionally Extract Properties from Object
- Map a Discriminated Union to an Object
- Map an Object to a Union of Tuples
- Transform an Object into a Union of Template Literals
- Transform a Discriminated Union into a Union
- Transform Dynamic Path Parameters from Strings to Objects
- Transform an Object into a Discriminated Union
- Transform a Discriminated Union with Unique Values to an Object
- Construct a Deep Partial of an Object
- Typing function: Return what I pass in
- Restricting Type using Generics Constraints
- Multiple Type Parameters
- Approaches for Typing Object Parameters
- Generics in Classes
- Generic Mapper Function
- Add Type Parameters to a Function
- Infer Types from Type Arguments
- Strongly Type a Reduce Function
- Use Generics to Type a Fetch Request
- Generics at Different Levels
- Typed Object Keys
- Understand Literal Inference in Generics
- Understand Generic Inference When Using Objects as Arguments
- Inferring Literal Types from any Basic Type
- Infer the Type of an Array Member
- Generics in a Class Names Creator
- Generics with Conditional Types
- Fixing Errors in Generic Functions
- Generic Function Currying
- Generic Interfaces with Functions
- Spotting Useless Generics
- Spotting Missing Generics
- Refactoring Generics for a Cleaner API
- The Partial Inference Problem
- What is a Function Overload --> issue
- Function Overloads vs Conditional Types
- Debugging Overloaded Functions
- Function Overloads vs Union Types
- Generics in Function Overloads
- Solving an Inference Mystery
- Use Function Overloads to Infer Initial Data
- The Instantiated with Subtype Error
- Make An Infinite Scroll Function Generic with Correct Type Inference
- Create a Function with a Dynamic Number of Arguments
- Create a Pick Function
- Create a Form Validation Library
- Improve a Fetch Function to Handle Missing Type Arguments
- Typing a Function Composition with Overloads and Generics
- Build an Internationalization Library
- What is a Branded type?
- Form Validation with Branded Types
- Using Branded Types as Entity Ids
- Creating Reusable Validity Checks with Branded Types and Type Helpers
- Creating Validation Boundaries with Branded Types
- Using Index Signatures with Branded Types
- TypeScript s Global Scope
- 💎 Add Functionality to Existing Global Interfaces
- Add Types to Properties of Global Namespaced Interfaces
- Collocating Types for Global Interfaces
- Filtering with Type Predicates
- Checking Types with Assertion Functions
- 💎 Avoiding TypeScript s Most Confusing Error
- Combining Type Predicates with Generics
- Combining Brands and Type Predicates
- Combining Brands with Assertion Functions
- Classes as Types and Values
- 💎❓ Dive into Classes with Type Predicates
- Assertion Functions and Classes
- Class Implementation Following the Builder Pattern Explanation
- 👇Create a Type Safe Map with the Builder Pattern
- Importance of default generic
- Building Chainable Middleware with the Builder Pattern
- Extract Types to Extend an External Library
- Finding Proper Type Arguments and Generics with Lodash
- Add Query Params to an Express Request
- Create a Runtime and Type Safe Function with Generics and Zod
- Override External Library Types
- Identity Functions as an Alternative to the as const
- Add Constraints to an Identity Function
- Specifying Where Inference Should Not Happen
- Find the Generic Flow of an Identity Function
- Reverse Mapped Types
- Merge Dynamic Objects with Global Objects
- Narrowing with an Array
- Create a Type Safe Request Handler with Zod and Express
- Building a Dynamic Reducer
| Notes
- Interface support declaration merging but type not.
- type supporting object remapping but interface not.