mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-10 22:44:43 +08:00
Add missing Request.flash function overload in connect-flash
This commit is contained in:
@@ -13,4 +13,5 @@ app.use(flash({
|
||||
app.use(function(req: Express.Request, res: Express.Response, next: Function) {
|
||||
req.flash('Message');
|
||||
req.flash('info', 'Message');
|
||||
req.flash();
|
||||
});
|
||||
|
||||
1
types/connect-flash/index.d.ts
vendored
1
types/connect-flash/index.d.ts
vendored
@@ -7,6 +7,7 @@
|
||||
|
||||
declare namespace Express {
|
||||
export interface Request {
|
||||
flash(): { [key: string]: string[] };
|
||||
flash(message: string): any;
|
||||
flash(event: string, message: string): any;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user