Omit<Type, Keys> removes specific properties from a type. Use it when you need a safe public view of a private model. At runtime, construct a new object without the excluded property.
// Example: remove a secret field from a profile
type Public = Omit<{ email: string; token: string }, "token">;Return a public user object without the password.
type User = { id: string; email: string; password: string; role?: 'user' | 'admin' }.type PublicUser = Omit<User, 'password'>.sanitize(u: User): PublicUser returning a new object without password.u.