forked from asmarques/chai-bignumber
-
Notifications
You must be signed in to change notification settings - Fork 21
/
chai-bn.d.ts
35 lines (34 loc) · 1.05 KB
/
chai-bn.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
import chai from "chai";
import BN from "bn.js";
export default function (BNModule: any): any;
declare global {
export namespace Chai {
export interface BNComparer extends NumberComparer {
(value: BN | string, message?: string): BNAssertion;
}
export interface BNCloseTo extends CloseTo {
(value: BN | string, delta: BN | string, message?: string): BNAssertion;
}
export interface BNAssertion extends Assertion {
equal: BNComparer;
equals: BNComparer;
eq: BNComparer;
above: BNComparer;
greaterThan: BNComparer;
gt: BNComparer;
gte: BNComparer;
below: BNComparer;
lessThan: BNComparer;
lt: BNComparer;
lte: BNComparer;
least: BNComparer;
most: BNComparer;
closeTo: BNCloseTo;
negative: Assertion;
zero: Assertion;
}
export interface Assertion {
bignumber: BNAssertion;
}
}
}