Grounds
    Preparing search index...

    Function I128

    • Creates a signed 128-bit integer Relish value using JavaScript BigInt.

      Use for extremely large signed integers not representable in 64 bits.

      Parameters

      • value: bigint

        BigInt in range ±170141183460469231731687303715884105728

      Returns RelishI128

      RelishI128 value

      Error if value is out of range

      import { I128 } from '@grounds/core';

      const valid = I128(BigInt('-170141183460469231731687303715884105728'));
      const max = I128(BigInt('170141183460469231731687303715884105727'));

      // Runtime errors:
      // I128(BigInt('-170141183460469231731687303715884105729')) // Error: out of range
      // I128(BigInt('170141183460469231731687303715884105728')) // Error: out of range

      I64 for 64-bit signed