123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429 |
- export = Long;
- export as namespace Long;
- declare namespace Long { }
- declare class Long {
-
- constructor(low: number, high?: number, unsigned?: boolean);
- /**
- * Maximum unsigned value.
- */
- static MAX_UNSIGNED_VALUE: Long;
- /**
- * Maximum signed value.
- */
- static MAX_VALUE: Long;
- /**
- * Minimum signed value.
- */
- static MIN_VALUE: Long;
- /**
- * Signed negative one.
- */
- static NEG_ONE: Long;
- /**
- * Signed one.
- */
- static ONE: Long;
- /**
- * Unsigned one.
- */
- static UONE: Long;
- /**
- * Unsigned zero.
- */
- static UZERO: Long;
- /**
- * Signed zero
- */
- static ZERO: Long;
- /**
- * The high 32 bits as a signed value.
- */
- high: number;
- /**
- * The low 32 bits as a signed value.
- */
- low: number;
- /**
- * Whether unsigned or not.
- */
- unsigned: boolean;
- /**
- * Returns a Long representing the 64 bit integer that comes by concatenating the given low and high bits. Each is assumed to use 32 bits.
- */
- static fromBits(lowBits: number, highBits: number, unsigned?: boolean): Long;
- /**
- * Returns a Long representing the given 32 bit integer value.
- */
- static fromInt(value: number, unsigned?: boolean): Long;
- /**
- * Returns a Long representing the given value, provided that it is a finite number. Otherwise, zero is returned.
- */
- static fromNumber(value: number, unsigned?: boolean): Long;
- /**
- * Returns a Long representation of the given string, written using the specified radix.
- */
- static fromString(str: string, unsigned?: boolean | number, radix?: number): Long;
- /**
- * Creates a Long from its byte representation.
- */
- static fromBytes(bytes: number[], unsigned?: boolean, le?: boolean): Long;
- /**
- * Creates a Long from its little endian byte representation.
- */
- static fromBytesLE(bytes: number[], unsigned?: boolean): Long;
- /**
- * Creates a Long from its big endian byte representation.
- */
- static fromBytesBE(bytes: number[], unsigned?: boolean): Long;
- /**
- * Tests if the specified object is a Long.
- */
- static isLong(obj: any): obj is Long;
- /**
- * Converts the specified value to a Long.
- */
- static fromValue(val: Long | number | string | {low: number, high: number, unsigned: boolean}, unsigned?: boolean): Long;
-
- add(addend: number | Long | string): Long;
-
- and(other: Long | number | string): Long;
-
- compare(other: Long | number | string): number;
-
- comp(other: Long | number | string): number;
-
- divide(divisor: Long | number | string): Long;
-
- div(divisor: Long | number | string): Long;
-
- equals(other: Long | number | string): boolean;
-
- eq(other: Long | number | string): boolean;
-
- getHighBits(): number;
-
- getHighBitsUnsigned(): number;
-
- getLowBits(): number;
-
- getLowBitsUnsigned(): number;
-
- getNumBitsAbs(): number;
-
- greaterThan(other: Long | number | string): boolean;
-
- gt(other: Long | number | string): boolean;
-
- greaterThanOrEqual(other: Long | number | string): boolean;
-
- gte(other: Long | number | string): boolean;
-
- ge(other: Long | number | string): boolean;
-
- isEven(): boolean;
-
- isNegative(): boolean;
-
- isOdd(): boolean;
-
- isPositive(): boolean;
-
- isZero(): boolean;
-
- eqz(): boolean;
-
- lessThan(other: Long | number | string): boolean;
-
- lt(other: Long | number | string): boolean;
-
- lessThanOrEqual(other: Long | number | string): boolean;
-
- lte(other: Long | number | string): boolean;
-
- le(other: Long | number | string): boolean;
-
- modulo(other: Long | number | string): Long;
-
- mod(other: Long | number | string): Long;
-
- rem(other: Long | number | string): Long;
-
- multiply(multiplier: Long | number | string): Long;
-
- mul(multiplier: Long | number | string): Long;
-
- negate(): Long;
-
- neg(): Long;
-
- not(): Long;
-
- notEquals(other: Long | number | string): boolean;
-
- neq(other: Long | number | string): boolean;
-
- ne(other: Long | number | string): boolean;
-
- or(other: Long | number | string): Long;
-
- shiftLeft(numBits: number | Long): Long;
-
- shl(numBits: number | Long): Long;
-
- shiftRight(numBits: number | Long): Long;
-
- shr(numBits: number | Long): Long;
-
- shiftRightUnsigned(numBits: number | Long): Long;
-
- shru(numBits: number | Long): Long;
-
- shr_u(numBits: number | Long): Long;
-
- rotateLeft(numBits: number | Long): Long;
-
- rotl(numBits: number | Long): Long;
-
- rotateRight(numBits: number | Long): Long;
-
- rotr(numBits: number | Long): Long;
-
- subtract(subtrahend: number | Long | string): Long;
-
- sub(subtrahend: number | Long |string): Long;
-
- toInt(): number;
-
- toNumber(): number;
-
- toBytes(le?: boolean): number[];
-
- toBytesLE(): number[];
-
- toBytesBE(): number[];
-
- toSigned(): Long;
-
- toString(radix?: number): string;
-
- toUnsigned(): Long;
-
- xor(other: Long | number | string): Long;
- }
|