> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# IComparator

- Package: [@gooddata/sdk-model](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/index.md)
- Kind: type-alias
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-model/src/base/comparators.ts

Function that can be used to sort collections. The semantics are the same as the first argument to Array\#sort function.

**Signature:**

```typescript
export type IComparator<T> = (a: T, b: T) => number;
```
