Grounds
    Preparing search index...

    Function I64

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

      Use for large signed integers that exceed JavaScript's safe integer range (±2^53-1).

      Parameters

      • value: bigint

        BigInt in range -9223372036854775808 to 9223372036854775807

      Returns RelishI64

      RelishI64 value

      Error if value is out of range

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

      const valid = I64(BigInt('-9007199254740992'));
      const max = I64(BigInt('9223372036854775807'));
      const min = I64(BigInt('-9223372036854775808'));

      // Runtime errors:
      // I64(BigInt('-9223372036854775809')) // Error: out of range
      // I64(BigInt('9223372036854775808')) // Error: out of range
      • I32 for 32-bit signed
      • I128 for 128-bit signed