import { AbortOptions, Semaphore } from '@mithic/commons'; /** A semaphore that limits access to resources by issuing fixed number of permits per period. */ export declare class RateLimiter implements Semaphore { /** The interval. */ private readonly interval; /** Function to return the current time. */ private readonly now; private semaphore; private resetQueue; private resetTimer; constructor( /** Total number of permits over given interval. */ limit?: number, /** The interval. */ interval?: number, /** Function to return the current time. */ now?: () => number); acquire(options?: AbortOptions): Promise; tryAcquire(): boolean; release(): void; private triggerPermitReset; private resetLimit; } //# sourceMappingURL=ratelimiter.d.ts.map