mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 12:11:47 +00:00
Add onLimitReached for express-rate-limit RateLimit.Options, and add function signatures for all Options (#17009)
* Update index.d.ts * Update index.d.ts * Update index.d.ts
This commit is contained in:
committed by
Mohamed Hegazy
parent
f13ae6ba59
commit
bf3471c59d
Vendored
+5
-4
@@ -1,4 +1,4 @@
|
||||
// Type definitions for express-rate-limit 2.6
|
||||
// Type definitions for express-rate-limit 2.8
|
||||
// Project: https://github.com/nfriedly/express-rate-limit
|
||||
// Definitions by: Cyril Schumacher <https://github.com/cyrilschumacher>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -17,14 +17,15 @@ declare namespace RateLimit {
|
||||
interface Options {
|
||||
delayAfter?: number;
|
||||
delayMs?: number;
|
||||
handlers?(): any;
|
||||
handlers?(req?: express.Request, res?: express.Response, next?: express.NextFunction): any;
|
||||
headers?: boolean;
|
||||
keyGenerator?(): string;
|
||||
keyGenerator?(req?: express.Request, res?: express.Response): string;
|
||||
max?: number;
|
||||
message?: string;
|
||||
skip?(): boolean;
|
||||
skip?(req?: express.Request, res?: express.Response): boolean;
|
||||
statusCode?: number;
|
||||
store?: Store;
|
||||
onLimitReached?(req?: express.Request, res?: express.Response, optionsUsed?: Options): void;
|
||||
windowMs?: number;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user