DistributiveOmit
Custom omit type that omits a property from all members, preserving union types.

- #typescript
distributive-omit.ts
export type DistributiveOmit<T, U> = T extends any
? Pick<T, Exclude<keyof T, U>>
: never
Custom omit type that omits a property from all members, preserving union types.
export type DistributiveOmit<T, U> = T extends any
? Pick<T, Exclude<keyof T, U>>
: never