forked from OpenZeppelin/chai-bn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chai-ethers-bignumber.d.ts
35 lines (34 loc) · 1.1 KB
/
chai-ethers-bignumber.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 {BigNumber} from "@ethersproject/bignumber";
export default function (BNModule: any): any;
declare global {
export namespace Chai {
export interface BNComparer extends NumberComparer {
(value: BigNumber | string, message?: string): BNAssertion;
}
export interface BNCloseTo extends CloseTo {
(value: BigNumber | string, delta: BigNumber | 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;
}
}
}