Interfacetypesv0.11.0
interface IRateLimiterasync charge(
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.
async peek(
key: string,
window: RateLimitWindow
): Promise<RateLimitResult>