mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-09-06 09:10:30 +00:00
Merge pull request #26557 from denkpark/patch-1
Middleware properties optional; req.brute
This commit is contained in:
Vendored
+11
-3
@@ -67,19 +67,19 @@ declare namespace ExpressBrute {
|
||||
* @summary Allows you to override the value of failCallback for this middleware.
|
||||
* @type {Function}
|
||||
*/
|
||||
failCallback: Function;
|
||||
failCallback?: Function;
|
||||
|
||||
/**
|
||||
* @summary Disregard IP address when matching requests if set to true. Defaults to false.
|
||||
* @type {boolean}
|
||||
*/
|
||||
ignoreIP: boolean;
|
||||
ignoreIP?: boolean;
|
||||
|
||||
/**
|
||||
* @summary Key.
|
||||
* @type {any}
|
||||
*/
|
||||
key: any;
|
||||
key?: any;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -156,5 +156,13 @@ declare namespace ExpressBrute {
|
||||
reset(key: string, callback: (error: any) => void): void;
|
||||
}
|
||||
}
|
||||
|
||||
declare module "express-serve-static-core" {
|
||||
export interface Request {
|
||||
brute?: {
|
||||
reset?: (callback?: () => void) => void
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export = ExpressBrute;
|
||||
|
||||
Reference in New Issue
Block a user