From c4d10a6f2d14f23367500d4eb46de7097b00d209 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 20 Nov 2017 11:05:37 -0600 Subject: Do simple inits inline --- packages/0x.js/src/order_watcher/expiration_watcher.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'packages/0x.js/src') diff --git a/packages/0x.js/src/order_watcher/expiration_watcher.ts b/packages/0x.js/src/order_watcher/expiration_watcher.ts index 5153cd8b9..b211ee826 100644 --- a/packages/0x.js/src/order_watcher/expiration_watcher.ts +++ b/packages/0x.js/src/order_watcher/expiration_watcher.ts @@ -15,14 +15,13 @@ const DEFAULT_ORDER_EXPIRATION_CHECKING_INTERVAL_MS = 50; */ export class ExpirationWatcher { private orderHashHeapByExpiration: Heap; - private expiration: {[orderHash: string]: BigNumber}; + private expiration: {[orderHash: string]: BigNumber} = {}; private callbackIfExists?: (orderHash: string) => void; private orderExpirationCheckingIntervalMs: number; private orderExpirationCheckingIntervalIdIfExists?: NodeJS.Timer; constructor(orderExpirationCheckingIntervalMs?: number) { this.orderExpirationCheckingIntervalMs = orderExpirationCheckingIntervalMs || DEFAULT_ORDER_EXPIRATION_CHECKING_INTERVAL_MS; - this.expiration = {}; const scoreFunction = ((orderHash: string) => { return this.expiration[orderHash].toNumber(); }).bind(this); -- cgit v1.2.3