# Function: distinctUntilChanged()

> 

> **distinctUntilChanged**\<`TValue`, `TError`\>(`compare`): `MonoTypeOperatorFunction`\<`TValue`, `TError`\>

Defined in: [packages/server/src/observable/operators.ts:165](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/server/src/observable/operators.ts#L165)

Skips values equal to the one before, by `compare` (`===` by default).

## Type Parameters

| Type Parameter |
| ------ |
| `TValue` |
| `TError` |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `compare` | (`a`, `b`) => `boolean` |

## Returns

`MonoTypeOperatorFunction`\<`TValue`, `TError`\>
