/** * In-memory storage backend for the rate limiter. Tracks integer counters * per key with optional TTL expiry. Ported to TypeScript from the upstream * MemoryStorage class. See `THIRDPARTY-LICENSES.md` for attribution. */ import { LimiterResult } from './types'; import { StorageRecord } from './record'; export declare class MemoryStorage { private _storage; /** * Increment the counter for `key` by `value`. If the key has no record * (or its TTL has expired), a new record is created with `durationSec` * lifetime. */ incrby(key: string, value: number, durationSec: number): LimiterResult; /** * Write the counter for `key` to `value`, replacing any existing * record. `durationSec` of 0 means "never expires". */ set(key: string, value: number, durationSec: number): LimiterResult; get(key: string): LimiterResult | null; delete(key: string): boolean; /** Inspect the underlying map. Test-only and not part of the public API. */ _dump(): IterableIterator<[string, StorageRecord]>; /** Clear all records. Used by tests and by `Limiter.dispose()`. */ clear(): void; } //# sourceMappingURL=memory-storage.d.ts.map