aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/src/configured_bignumber.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/utils/src/configured_bignumber.ts')
-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 {