API reference@evolu/commonTypes › DistributiveOmit

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

Defined in: packages/common/src/Types.ts:334

Removes keys from each member of a union.

Use when Omit would collapse a discriminated union into a single shared shape.

Example

type Event =
  | { type: "a"; a: string; shared: number }
  | { type: "b"; b: number; shared: number };

type Payload = DistributiveOmit<Event, "shared">;
// { type: "a"; a: string } | { type: "b"; b: number }