forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
node-int64.d.ts
39 lines (27 loc) · 932 Bytes
/
node-int64.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Type definitions for node-int64 v0.4.0
// Project: https://github.com/broofa/node-int64
// Definitions by: Benno Dreissig <https://github.com/x3cion>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../node/node.d.ts" />
declare module "node-int64" {
class Int64 {
static MAX_INT: number;
static MIN_INT: number;
constructor(buffer:Buffer, offset?:number);
constructor(array:Uint8Array, offset?:number);
constructor(str:string);
constructor(hi:number, lo:number);
_2scomp(): void;
setValue(str:string): void;
toNumber(allowImprecise?:boolean): number;
valueOf(): number;
toString(radix?:number): string;
toOctetString(separator?:string): string;
toBuffer(rawBuffer?:boolean): Buffer;
copy(targetBuffer: Buffer, targetOffset?:number): void;
compare(other: Int64): number;
equals(other: Int64): boolean;
inspect(): string;
}
export = Int64;
}