[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) › greaterThanBigInt

```ts
function greaterThanBigInt<Min extends bigint>(
  min: ValidateBrandFactoryBigInt<Min>,
): BrandFactory<`GreaterThan${Min}n`, bigint, GreaterThanBigIntError<Min>>;
```

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

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

The bigint counterpart of [greaterThan](https://evolu.dev/docs/api-reference/common/Type/functions/greaterThan) for parents with a bigint
Output, such as [BigInt](https://evolu.dev/docs/api-reference/common/Type/variables/BigInt), [Int64](https://evolu.dev/docs/api-reference/common/Type/variables/Int64), and [UInt64](https://evolu.dev/docs/api-reference/common/Type/variables/UInt64). The Brand
name ends with `n`, so `greaterThanBigInt(10n)` and `greaterThan(10)` create
distinct Brands. For positive bigints, use `greaterThanBigInt(0n)`.

### Example

```ts
import {
  assertEqual,
  assertErr,
  assertOk,
  assertType,
  greaterThanBigInt,
  Int64,
  type Brand,
} from "@evolu/common";

const PositiveInt64 = greaterThanBigInt(0n)(Int64);

assertType<
  typeof PositiveInt64.Output,
  bigint & Brand<"Int64"> & Brand<"GreaterThan0n">
>();
assertOk(PositiveInt64.fromUnknown(1n), 1n);

const zero = PositiveInt64.fromUnknown(0n);
assertErr(zero, { type: "GreaterThan0n", value: 0n, min: 0n });
assertEqual(
  PositiveInt64.formatError(zero.error),
  "The value 0 must be greater than 0.",
);
```