utility types
-
Solved: TIL: NoInfer<T> in TypeScript 5.4 stops type inference from widening at the wrong argument
Learn how the new NoInfer utility in TypeScript 5.4 gives you precise control over type inference, preventing bugs caused by unwanted type widening Continue reading
-
Solved: Is there a straight way to widen inferred literal types of TypeScript generics?
Learn three practical ways to widen overly-specific literal types inferred by TypeScript generics, from a simple annotation to a reusable utility type Continue reading
-
Solved: Omit for Discriminated Unions in TypeScript
Learn why TypeScript’s Omit fails on discriminated unions, causing the `never` type, and find 3 robust solutions with code to correctly handle them. Continue reading
-
Solved: Helpful TypeScript Utility Types I’ve hand rolled over time, enjoy
Enhance your TypeScript with powerful, custom utility types. Solve common typing challenges and write cleaner, safer code beyond built-in defaults. Continue reading