aboutsummaryrefslogtreecommitdiffstats
path: root/src/globalsAugment.d.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2017-10-30 22:17:39 +0800
committerFabio Berger <me@fabioberger.com>2017-10-30 22:17:39 +0800
commitb49d1dae7debbb50c57dc4755447f2cffee35ccd (patch)
tree25397180b858b508312cc4a6c721b848cf1cd1d2 /src/globalsAugment.d.ts
parent9b0496b0491e9fbe353a4c29d8082cf56ede9e38 (diff)
parentfec8f8a881dde19132dcf0eea727ae9fbb25adb6 (diff)
downloaddexon-sol-tools-b49d1dae7debbb50c57dc4755447f2cffee35ccd.tar
dexon-sol-tools-b49d1dae7debbb50c57dc4755447f2cffee35ccd.tar.gz
dexon-sol-tools-b49d1dae7debbb50c57dc4755447f2cffee35ccd.tar.bz2
dexon-sol-tools-b49d1dae7debbb50c57dc4755447f2cffee35ccd.tar.lz
dexon-sol-tools-b49d1dae7debbb50c57dc4755447f2cffee35ccd.tar.xz
dexon-sol-tools-b49d1dae7debbb50c57dc4755447f2cffee35ccd.tar.zst
dexon-sol-tools-b49d1dae7debbb50c57dc4755447f2cffee35ccd.zip
Merge branch 'development' of github.com:0xProject/0x.js into development
* 'development' of github.com:0xProject/0x.js: Update CHANGELOG 0.22.4 Add HACK comments Add a forgotten augmentation file Upgrade bignumber to the version with native typings and remove typings Downgrade typedoc Upgrade bignumber to the version with native typings and remove typings
Diffstat (limited to 'src/globalsAugment.d.ts')
-rw-r--r--src/globalsAugment.d.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/globalsAugment.d.ts b/src/globalsAugment.d.ts
new file mode 100644
index 000000000..60e2312a3
--- /dev/null
+++ b/src/globalsAugment.d.ts
@@ -0,0 +1,23 @@
+import BigNumber from 'bignumber.js';
+
+// HACK: This module overrides the Chai namespace so that we can use BigNumber types inside.
+// Source: https://github.com/Microsoft/TypeScript/issues/7352#issuecomment-191547232
+declare global {
+ // HACK: In order to merge the bignumber declaration added by chai-bignumber to the chai Assertion
+ // interface we must use `namespace` as the Chai definitelyTyped definition does. Since we otherwise
+ // disallow `namespace`, we disable tslint for the following.
+ /* tslint:disable */
+ namespace Chai {
+ interface NumberComparer {
+ (value: number|BigNumber, message?: string): Assertion;
+ }
+ interface NumericComparison {
+ greaterThan: NumberComparer;
+ }
+ }
+ /* tslint:enable */
+ interface DecodedLogArg {
+ name: string;
+ value: string|BigNumber;
+ }
+}