Distributive Omit in TS

Published on

NaN

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

type DistributiveOmit<T, K extends PropertyKey> = T extends any ? Omit<T, K> : never;