diff options
author | Fabio Berger <me@fabioberger.com> | 2018-05-14 17:30:51 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-05-14 17:30:51 +0800 |
commit | c94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6 (patch) | |
tree | 986b220cf80aab8d8e8ef6c4cef8c08be6eeab10 /packages/utils | |
parent | 7d60356facce60c1d4d80c703bfc565c5c47e73b (diff) | |
parent | 58fa35641d3016ef106496c929e48febcf827dc6 (diff) | |
download | dexon-0x-contracts-c94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6.tar.gz dexon-0x-contracts-c94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6.tar.zst dexon-0x-contracts-c94d1b22754c1d1bf10f0dd2b9c13eea91e17cb6.zip |
Merge branch 'development' of github.com:0xProject/0x-monorepo into development
* 'development' of github.com:0xProject/0x-monorepo:
Add missing type definitions
Diffstat (limited to 'packages/utils')
-rw-r--r-- | packages/utils/src/abi_decoder.ts | 2 | ||||
-rw-r--r-- | packages/utils/src/interval_utils.ts | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/packages/utils/src/abi_decoder.ts b/packages/utils/src/abi_decoder.ts index 150f74a15..d329f917a 100644 --- a/packages/utils/src/abi_decoder.ts +++ b/packages/utils/src/abi_decoder.ts @@ -17,7 +17,7 @@ import { BigNumber } from './configured_bignumber'; export class AbiDecoder { private _savedABIs: AbiDefinition[] = []; private _methodIds: { [signatureHash: string]: EventAbi } = {}; - private static _padZeros(address: string) { + private static _padZeros(address: string): string { let formatted = address; if (_.startsWith(formatted, '0x')) { formatted = formatted.slice(2); diff --git a/packages/utils/src/interval_utils.ts b/packages/utils/src/interval_utils.ts index ebecc7015..6984bf42d 100644 --- a/packages/utils/src/interval_utils.ts +++ b/packages/utils/src/interval_utils.ts @@ -1,7 +1,11 @@ import * as _ from 'lodash'; export const intervalUtils = { - setAsyncExcludingInterval(fn: () => Promise<void>, intervalMs: number, onError: (err: Error) => void) { + setAsyncExcludingInterval( + fn: () => Promise<void>, + intervalMs: number, + onError: (err: Error) => void, + ): NodeJS.Timer { let locked = false; const intervalId = setInterval(async () => { if (locked) { @@ -21,7 +25,7 @@ export const intervalUtils = { clearAsyncExcludingInterval(intervalId: NodeJS.Timer): void { clearInterval(intervalId); }, - setInterval(fn: () => void, intervalMs: number, onError: (err: Error) => void) { + setInterval(fn: () => void, intervalMs: number, onError: (err: Error) => void): NodeJS.Timer { const intervalId = setInterval(() => { try { fn(); |