forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
javascript-bignum.d.ts
53 lines (52 loc) · 1.71 KB
/
javascript-bignum.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Type definitions for javascript-bignum
// Project: https://github.com/jtobey/javascript-bignum
// Definitions by: Nathan Shively-Sanders <https://github.com/sandersn>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Documentation: http://john-edwin-tobey.org/Scheme/javascript-bignum/docs/files/schemeNumber-js.html
// This version only includes typing for schemeNumber, not the full library
declare type SchemeOperator = (...args: (string | SchemeNumber | number)[]) => SchemeNumber;
declare var VERSION: number[];
declare function raise(conditionType: string, message: string, ...irritants: any[]): void;
declare var maxIntegerDigits: number;
declare interface SchemeFn {
[opname: string]: SchemeOperator;
inexact: SchemeOperator;
exact: SchemeOperator;
max: SchemeOperator;
min: SchemeOperator;
abs: SchemeOperator;
div: SchemeOperator;
mod: SchemeOperator;
div0: SchemeOperator;
mod0: SchemeOperator;
gcd: SchemeOperator;
lcm: SchemeOperator;
numerator: SchemeOperator;
denominator: SchemeOperator;
floor: SchemeOperator;
ceiling: SchemeOperator;
truncate: SchemeOperator;
round: SchemeOperator;
rationalize: SchemeOperator;
exp: SchemeOperator;
log: SchemeOperator;
sin: SchemeOperator;
cos: SchemeOperator;
tan: SchemeOperator;
asin: SchemeOperator;
acos: SchemeOperator;
atan: SchemeOperator;
sqrt: SchemeOperator;
expt: SchemeOperator;
magnitude: SchemeOperator;
angle: SchemeOperator;
}
declare interface SchemeNumber {
(value: string | number): SchemeNumber;
toString(radix: number): string;
toFixed(fractionDigits: number): string;
toExponential(fractionDigits: number): string;
toPrecision(precision: number): string;
fn: SchemeFn;
}
declare var SchemeNumber: SchemeNumber;