RecipesChapter 8: Helper Types

Converting Union to Intersection Types

Recipe 8.6 from The TypeScript Cookbook

type Intersected =
  { format320p: URL } & { format480p: URL } &
  { format720p: URL } & { format1080p: URL };
Open in TypeScript Playground →