tip

Filter TypeScript Unions of Primitives or Objects depending on the usecase

Learn the different ways to filter members of TypeScript unions.

Learn the different ways to filter members of TypeScript unions, depending on their member types and usecases. We'll see unions of primitives, unions of objects and discriminant unions.