aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemco Bloemen <remco@wicked.ventures>2018-08-22 05:45:14 +0800
committerRemco Bloemen <remco@wicked.ventures>2018-08-22 05:45:14 +0800
commitad0fe2f0799100e305f437c38e657f668d74670b (patch)
tree29fb15053ad9342116bb114f48ee6baea1235c62
parent9b4f5dfddae9defbd797dbd416868aa381c44b2c (diff)
downloaddexon-sol-tools-ad0fe2f0799100e305f437c38e657f668d74670b.tar
dexon-sol-tools-ad0fe2f0799100e305f437c38e657f668d74670b.tar.gz
dexon-sol-tools-ad0fe2f0799100e305f437c38e657f668d74670b.tar.bz2
dexon-sol-tools-ad0fe2f0799100e305f437c38e657f668d74670b.tar.lz
dexon-sol-tools-ad0fe2f0799100e305f437c38e657f668d74670b.tar.xz
dexon-sol-tools-ad0fe2f0799100e305f437c38e657f668d74670b.tar.zst
dexon-sol-tools-ad0fe2f0799100e305f437c38e657f668d74670b.zip
Use const require instead of import
-rw-r--r--packages/utils/src/configured_bignumber.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/utils/src/configured_bignumber.ts b/packages/utils/src/configured_bignumber.ts
index a838b1e3b..b7de1b1fc 100644
--- a/packages/utils/src/configured_bignumber.ts
+++ b/packages/utils/src/configured_bignumber.ts
@@ -14,7 +14,11 @@ BigNumber.config({
// Set a debug print function for NodeJS
import isNode = require('detect-node');
if (!isNode) {
- import util = require('util');
+ // Dynamically load a NodeJS specific module.
+ // Typescript requires all imports to be global, so we need to use
+ // `const` here and disable the tslint warning.
+ // tslint:disable-next-line: no-var-requires
+ const util = require('util');
// Set a custom util.inspect function
(BigNumber.prototype as any)[util.inspect.custom] = function(): string {