Distributive Omit in TS
Published on
NaNCustom 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;
Published on
NaNCustom 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;