import { type MapKey } from "./type/map";
import { type CriticalSection } from "./async-monitor/critical-section";
/**
 * Acquires an exclusive lock on the specified key.
 */
export declare function enter<T>(key: MapKey, scope: (criticalSection: CriticalSection) => Promise<T> | T): Promise<T>;
/**
 * Attempts, for the specified amount of time, to acquire an exclusive lock on the specified key.
 */
export declare function tryEnter<T>(key: MapKey, timeout: number, scope: (criticalSection: CriticalSection | null) => Promise<T> | T): Promise<T>;
/**
 * Attempts to get the current CriticalSection
 */
export declare function tryGet(key: MapKey): CriticalSection | null;
