Do simple inits inline

This commit is contained in:
Leonid Logvinov 2017-11-20 11:05:37 -06:00
parent e755ed927c
commit c4d10a6f2d
No known key found for this signature in database
GPG Key ID: 0DD294BFDE8C95D4

View File

@ -15,14 +15,13 @@ const DEFAULT_ORDER_EXPIRATION_CHECKING_INTERVAL_MS = 50;
*/
export class ExpirationWatcher {
private orderHashHeapByExpiration: Heap<string>;
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);