added /dist

This commit is contained in:
2026-08-03 12:24:28 +02:00
parent dd97bb67fe
commit 05150e7ece
490 changed files with 6667 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
export type RateLimitArgs = {
/** Identifier to limit on — typically the client IP. */
key: string;
/** Max submissions allowed per window. Defaults to 5. */
max?: number;
/** Window length in ms. Defaults to 60_000 (one minute). */
windowMs?: number;
};
/**
* Returns true when the request is within the limit, false when it should be
* rejected. A missing key (no IP) is allowed through — better to accept a
* submission than to block everyone behind a proxy that strips the header.
*/
export declare function checkRateLimit({ key, max, windowMs }: RateLimitArgs): boolean;