diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-11 23:38:51 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-05-14 16:35:13 +0800 |
commit | b74957acdfc8d67d154bcb4698acd7575db7cc47 (patch) | |
tree | 3f33c2faac3b55e52098ab0b5b9883a9b62f5aee /packages/utils/src | |
parent | 6aed4fb1ae27dabed027c855f2cbdc0bfb4f3b6b (diff) | |
download | dexon-sol-tools-b74957acdfc8d67d154bcb4698acd7575db7cc47.tar dexon-sol-tools-b74957acdfc8d67d154bcb4698acd7575db7cc47.tar.gz dexon-sol-tools-b74957acdfc8d67d154bcb4698acd7575db7cc47.tar.bz2 dexon-sol-tools-b74957acdfc8d67d154bcb4698acd7575db7cc47.tar.lz dexon-sol-tools-b74957acdfc8d67d154bcb4698acd7575db7cc47.tar.xz dexon-sol-tools-b74957acdfc8d67d154bcb4698acd7575db7cc47.tar.zst dexon-sol-tools-b74957acdfc8d67d154bcb4698acd7575db7cc47.zip |
Add missing type definitions
Diffstat (limited to 'packages/utils/src')
-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(); |