@routup/rate-limit
Version:
Routup rate limiter.
7 lines • 544 B
TypeScript
import type { Request } from 'routup';
import type { RateLimitInfo } from './type';
export declare function useRequestRateLimitInfo(req: Request): RateLimitInfo;
export declare function useRequestRateLimitInfo<K extends keyof RateLimitInfo>(req: Request, key: K): RateLimitInfo[K];
export declare function setRequestRateLimitInfo<K extends keyof RateLimitInfo>(req: Request, key: K, value: RateLimitInfo[K]): void;
export declare function setRequestRateLimitInfo(req: Request, record: RateLimitInfo): void;
//# sourceMappingURL=request.d.ts.map