interface Long {
    high: number;
    low: number;
    unsigned: boolean;
    add(addend: string | number | Long.Long): Long.Long;
    and(other: string | number | Long.Long): Long.Long;
    comp(other: string | number | Long.Long): number;
    compare(other: string | number | Long.Long): number;
    div(divisor: string | number | Long.Long): Long.Long;
    divide(divisor: string | number | Long.Long): Long.Long;
    eq(other: string | number | Long.Long): boolean;
    equals(other: string | number | Long.Long): boolean;
    getHighBits(): number;
    getHighBitsUnsigned(): number;
    getLowBits(): number;
    getLowBitsUnsigned(): number;
    getNumBitsAbs(): number;
    greaterThan(other: string | number | Long.Long): boolean;
    greaterThanOrEqual(other: string | number | Long.Long): boolean;
    gt(other: string | number | Long.Long): boolean;
    gte(other: string | number | Long.Long): boolean;
    isEven(): boolean;
    isNegative(): boolean;
    isOdd(): boolean;
    isPositive(): boolean;
    isZero(): boolean;
    lessThan(other: string | number | Long.Long): boolean;
    lessThanOrEqual(other: string | number | Long.Long): boolean;
    lt(other: string | number | Long.Long): boolean;
    lte(other: string | number | Long.Long): boolean;
    mod(other: string | number | Long.Long): Long.Long;
    modulo(other: string | number | Long.Long): Long.Long;
    mul(multiplier: string | number | Long.Long): Long.Long;
    multiply(multiplier: string | number | Long.Long): Long.Long;
    neg(): Long.Long;
    negate(): Long.Long;
    neq(other: string | number | Long.Long): boolean;
    not(): Long.Long;
    notEquals(other: string | number | Long.Long): boolean;
    or(other: string | number | Long.Long): Long.Long;
    shiftLeft(numBits: number | Long.Long): Long.Long;
    shiftRight(numBits: number | Long.Long): Long.Long;
    shiftRightUnsigned(numBits: number | Long.Long): Long.Long;
    shl(numBits: number | Long.Long): Long.Long;
    shr(numBits: number | Long.Long): Long.Long;
    shru(numBits: number | Long.Long): Long.Long;
    sub(subtrahend: string | number | Long.Long): Long.Long;
    subtract(subtrahend: string | number | Long.Long): Long.Long;
    toBytes(le?: boolean): number[];
    toBytesBE(): number[];
    toBytesLE(): number[];
    toInt(): number;
    toNumber(): number;
    toSigned(): Long.Long;
    toString(radix?: number): string;
    toUnsigned(): Long.Long;
    xor(other: string | number | Long.Long): Long.Long;
}

Properties

high: number

The high 32 bits as a signed value.

low: number

The low 32 bits as a signed value.

unsigned: boolean

Whether unsigned or not.

Methods

  • Returns the sum of this and the specified Long.

    Parameters

    Returns Long.Long

  • Returns the bitwise AND of this Long and the specified.

    Parameters

    Returns Long.Long

  • Compares this Long's value with the specified's.

    Parameters

    Returns number

  • Compares this Long's value with the specified's.

    Parameters

    Returns number

  • Returns this Long divided by the specified.

    Parameters

    Returns Long.Long

  • Returns this Long divided by the specified.

    Parameters

    Returns Long.Long

  • Tests if this Long's value equals the specified's.

    Parameters

    Returns boolean

  • Tests if this Long's value equals the specified's.

    Parameters

    Returns boolean

  • Gets the high 32 bits as a signed integer.

    Returns number

  • Gets the high 32 bits as an unsigned integer.

    Returns number

  • Gets the low 32 bits as a signed integer.

    Returns number

  • Gets the low 32 bits as an unsigned integer.

    Returns number

  • Gets the number of bits needed to represent the absolute value of this Long.

    Returns number

  • Tests if this Long's value is greater than the specified's.

    Parameters

    Returns boolean

  • Tests if this Long's value is greater than or equal the specified's.

    Parameters

    Returns boolean

  • Tests if this Long's value is greater than the specified's.

    Parameters

    Returns boolean

  • Tests if this Long's value is greater than or equal the specified's.

    Parameters

    Returns boolean

  • Tests if this Long's value is even.

    Returns boolean

  • Tests if this Long's value is negative.

    Returns boolean

  • Tests if this Long's value is odd.

    Returns boolean

  • Tests if this Long's value is positive.

    Returns boolean

  • Tests if this Long's value equals zero.

    Returns boolean

  • Tests if this Long's value is less than the specified's.

    Parameters

    Returns boolean

  • Tests if this Long's value is less than or equal the specified's.

    Parameters

    Returns boolean

  • Tests if this Long's value is less than the specified's.

    Parameters

    Returns boolean

  • Tests if this Long's value is less than or equal the specified's.

    Parameters

    Returns boolean

  • Returns this Long modulo the specified.

    Parameters

    Returns Long.Long

  • Returns this Long modulo the specified.

    Parameters

    Returns Long.Long

  • Returns the product of this and the specified Long.

    Parameters

    Returns Long.Long

  • Returns the product of this and the specified Long.

    Parameters

    Returns Long.Long

  • Negates this Long's value.

    Returns Long.Long

  • Negates this Long's value.

    Returns Long.Long

  • Tests if this Long's value differs from the specified's.

    Parameters

    Returns boolean

  • Returns the bitwise NOT of this Long.

    Returns Long.Long

  • Tests if this Long's value differs from the specified's.

    Parameters

    Returns boolean

  • Returns the bitwise OR of this Long and the specified.

    Parameters

    Returns Long.Long

  • Returns this Long with bits shifted to the left by the given amount.

    Parameters

    Returns Long.Long

  • Returns this Long with bits arithmetically shifted to the right by the given amount.

    Parameters

    Returns Long.Long

  • Returns this Long with bits logically shifted to the right by the given amount.

    Parameters

    Returns Long.Long

  • Returns this Long with bits shifted to the left by the given amount.

    Parameters

    Returns Long.Long

  • Returns this Long with bits arithmetically shifted to the right by the given amount.

    Parameters

    Returns Long.Long

  • Returns this Long with bits logically shifted to the right by the given amount.

    Parameters

    Returns Long.Long

  • Returns the difference of this and the specified Long.

    Parameters

    Returns Long.Long

  • Returns the difference of this and the specified Long.

    Parameters

    Returns Long.Long

  • Converts this Long to its byte representation.

    Parameters

    • Optionalle: boolean

    Returns number[]

  • Converts this Long to its big endian byte representation.

    Returns number[]

  • Converts this Long to its little endian byte representation.

    Returns number[]

  • Converts the Long to a 32 bit integer, assuming it is a 32 bit integer.

    Returns number

  • Converts the Long to a the nearest floating-point representation of this value (double, 53 bit mantissa).

    Returns number

  • Converts this Long to signed.

    Returns Long.Long

  • Converts the Long to a string written in the specified radix.

    Parameters

    • Optionalradix: number

    Returns string

  • Converts this Long to unsigned.

    Returns Long.Long

  • Returns the bitwise XOR of this Long and the given one.

    Parameters

    Returns Long.Long