// https://github.com/Microsoft/TypeScript/issues/12215 export type Diff = ({ [P in T]: P } & { [P in U]: never } & { [x: string]: never })[T]; export type Omit = { [P in Diff]: T[P] };