UNPKG

@envelop/rate-limiter

Version:
14 lines (13 loc) 447 B
import type { Store } from './store.cjs'; import type { Identity } from './types.cjs'; 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 };