tezx
Version:
TezX is a modern, ultra-lightweight, and high-performance JavaScript framework built specifically for Bun. It provides a minimal yet powerful API, seamless environment management, and a high-concurrency HTTP engine for building fast, scalable web applicat
19 lines (18 loc) • 495 B
TypeScript
export declare function createRateLimitDefaultStorage(): {
get: (key: string) => {
count: number;
resetTime: number;
} | undefined;
set: (key: string, value: {
count: number;
resetTime: number;
}) => Map<string, {
count: number;
resetTime: number;
}>;
clearExpired: () => void;
};
export declare function isRateLimit(key: string, store: any, maxRequests: number, windowMs: number): {
check: boolean;
entry: any;
};