import { Awaitable } from 'justypes'; type Release = () => void; export declare class KeyedMutex { protected createKey: (val: T) => U; protected lockedKeys: Set; private keyToUnlockDeferredQueue; constructor(createKey: (val: T) => U); acquire(val: T, handler: () => Awaitable): Promise; acquire(val: T): Promise; private lock; private tryLock; private waitForUnlock; private unlock; } export {};