UNPKG

@envelop/rate-limiter

Version:
14 lines (13 loc) 445 B
import type { Store } from './store.js'; import type { Identity } from './types.js'; interface StoreData { readonly [identity: string]: { readonly [fieldIdentity: string]: readonly number[]; }; } declare class InMemoryStore implements Store { state: StoreData; setForIdentity(identity: Identity, timestamps: readonly number[]): void; getForIdentity(identity: Identity): readonly number[]; } export { InMemoryStore };