/** * return a random integer value in the range of min inclusive and max exclusive * @method getRandomInt * @param min * @param max * @return {*} * @private */ export declare function getRandomInt(min: number, max: number): number; export declare function isPromise(p: any): p is Promise; /** * simple promise based lock * * simple usage: * ``` * const lock = new Lock(); * const locked = await lock.acquire(); * try { * ... * } finally { * locked.release(); * } * ``` * * advanced usage (avoid unnecessary microtasks): * ``` * const lock = new Lock(); * let locked = lock.acquire(); * if(locked) { * await locked; * } * try { * ... * } finally { * lock.release(); * } * ``` */ export declare class Lock { private pHead?; private pCurrent?; private currentReleaseLockFN?; acquire(): Promise | undefined; release(): void; } //# sourceMappingURL=utils.d.ts.map