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

```ts
function lessThanBigInt<Max extends bigint>(
  max: ValidateBrandFactoryBigInt<Max>,
): BrandFactory<`LessThan${Max}n`, bigint, LessThanBigIntError<Max>>;
```

Defined in: [packages/common/src/Type.ts:12556](https://github.com/evoluhq/evolu/blob/bc4578a260dd15d5bbf94b83765ca05984d194cb/packages/common/src/Type.ts#L12556)

Bigint [Brand](https://evolu.dev/docs/api-reference/common/Brand/interfaces/Brand) requiring a value less than `max`.

The bigint counterpart of [lessThan](https://evolu.dev/docs/api-reference/common/Type/functions/lessThan); see [greaterThanBigInt](https://evolu.dev/docs/api-reference/common/Type/functions/greaterThanBigInt). For
negative bigints, use `lessThanBigInt(0n)`.

### Example

```ts
import { assertErr, assertOk, BigInt, lessThanBigInt } from "@evolu/common";

const Negative = lessThanBigInt(0n)(BigInt);

assertOk(Negative.fromUnknown(-1n), -1n);
assertErr(Negative.fromUnknown(0n), {
  type: "LessThan0n",
  value: 0n,
  max: 0n,
});
```