[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Types](https://evolu.dev/docs/api-reference/common/Types) › DistributiveOmit

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

Defined in: [packages/common/src/Types.ts:504](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/Types.ts#L504)

Removes keys from each member of a union.

Use when [Omit](https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys) would collapse a discriminated union into a single
shared shape.

### Preserving discriminated unions

```ts

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

type Payload = DistributiveOmit<Event, "shared">;

assertType<{ type: "a"; a: string } | { type: "b"; b: number }, Payload>();
```