Interfacetypesv0.8.0-next.6
interface IRateLimiterinterface IRateLimiterasync charge(
key: string,
window: RateLimitWindow
): Promise<RateLimitResult>async charge(
key: string,
window: RateLimitWindow
): Promise<RateLimitResult>Parameter:
keyThe bucket to charge. Build it from your own scope, or with buildKeybuildKey from @seedcord/rate-limiter@seedcord/rate-limiter.
Parameter:
windowThe usage window to apply.
async peek(
key: string,
window: RateLimitWindow
): Promise<RateLimitResult>async peek(
key: string,
window: RateLimitWindow
): Promise<RateLimitResult>