1 | # Installation
|
2 | > `npm install --save @types/node-int64`
|
3 |
|
4 | # Summary
|
5 | This package contains type definitions for node-int64 (https://github.com/broofa/node-int64).
|
6 |
|
7 | # Details
|
8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-int64.
|
9 | ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node-int64/index.d.ts)
|
10 | ````ts
|
11 | /// <reference types="node" />
|
12 |
|
13 | declare class Int64 {
|
14 | static MAX_INT: number;
|
15 | static MIN_INT: number;
|
16 |
|
17 | public buffer: Buffer;
|
18 | public offset: number;
|
19 |
|
20 | constructor(buffer: Buffer, offset?: number);
|
21 | constructor(array: Uint8Array, offset?: number);
|
22 | constructor(str: string);
|
23 | constructor(num: number);
|
24 | constructor(hi: number, lo: number);
|
25 |
|
26 | _2scomp(): void;
|
27 |
|
28 | // setValue(string) - A hexidecimal string
|
29 | setValue(str: string): void;
|
30 | // setValue(number) - Number (throws if n is outside int64 range)
|
31 | setValue(num: number): void;
|
32 | // setValue(hi, lo) - Raw bits as two 32-bit values
|
33 | setValue(hi: number, lo: number): void;
|
34 |
|
35 | toNumber(allowImprecise?: boolean): number;
|
36 | valueOf(): number;
|
37 | toString(radix?: number): string;
|
38 | toOctetString(separator?: string): string;
|
39 | toBuffer(rawBuffer?: boolean): Buffer;
|
40 | copy(targetBuffer: Buffer, targetOffset?: number): void;
|
41 | compare(other: Int64): number;
|
42 | equals(other: Int64): boolean;
|
43 | inspect(): string;
|
44 | }
|
45 |
|
46 | export = Int64;
|
47 |
|
48 | ````
|
49 |
|
50 | ### Additional Details
|
51 | * Last updated: Tue, 07 Nov 2023 09:09:39 GMT
|
52 | * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
|
53 |
|
54 | # Credits
|
55 | These definitions were written by [Benno Dreissig](https://github.com/x3cion), and [Kevin Greene](https://github.com/kevin-greene-ck).
|
56 |
|
\ | No newline at end of file |