/** * In-memory rate limiter backed by `MemoryStorage`. Implements the * `consume()` / `penalty()` / `reward()` / `block()` / `get()` / * `delete()` surface from the upstream limiter library. * * Ported to TypeScript from RateLimiterMemory. See * `THIRDPARTY-LICENSES.md` for attribution. */ import { AbstractLimiter } from './abstract'; import type { LimiterOptions, LimiterConsumeOptions, IRateLimiterRes } from './types'; export declare class MemoryLimiter extends AbstractLimiter { private _storage; constructor(opts: LimiterOptions); consume(key: string, pointsToConsume?: number, options?: LimiterConsumeOptions): Promise; penalty(key: string, points?: number, options?: LimiterConsumeOptions): Promise; reward(key: string, points?: number, options?: LimiterConsumeOptions): Promise; block(key: string, secDuration: number): Promise; get(key: string): Promise; delete(key: string): Promise; /** Test/teardown helper. Drops every key and clears timers. */ dispose(): void; } //# sourceMappingURL=memory.d.ts.map