The Omit Helper Type in TypeScript

This type creates a new type that has all the properties of the old type with one removed. For example:

type User = {
  id: string;
  name: string;
  email: string;
};

type UserWithoutEmail = Omit<User, "email">;

// This is equivalent to:
type UserWithoutEmail = {
  id: string;
  name: string;
};