/**
 * Wrapper for an `async-mutex` {@link Semaphore} that can have its total increased if a weight
 * exceeds the maximum.
 */
export default class ElasticSemaphore {
    private readonly semaphoreValue;
    private readonly semaphore;
    constructor(value: number);
    /**
     * Run some {@link callback} with a required {@link weight}.
     */
    runExclusive<T>(callback: (value: number) => Promise<T> | T, weight: number): Promise<T>;
}
