TypeScript's built-in Omit utility type breaks discriminated unions by treating them as a whole rather than distributing over each union member. This causes type errors when building wrapper components that depend on discriminated union props. A distributive version using conditional types (T extends any ? Omit<T, K> : never)
Table of contents
Discriminated Union TypesDistributive Conditional TypesDistributive OmitLimited KeysSort: