Interfacetypesv0.14.4
interface IRateLimitercharge(
key: string,
window: RateLimitWindow
): Promise<RateLimitResult>Parameter:
keyThe bucket to charge. Build it from your own scope, or with buildKey from @seedcord/rate-limiter.
Parameter:
windowThe usage window to apply.
peek(
key: string,
window: RateLimitWindow
): Promise<RateLimitResult>