session-flash
Advanced tools
+21
-14
@@ -0,18 +1,25 @@ | ||
| import type { RequestHandler } from "express"; | ||
| import "express-serve-static-core"; | ||
| declare namespace Express { | ||
| export interface Request { | ||
| flash(): { [key: string]: string[] }; | ||
| flash(message: string): string[]; | ||
| flash(type: string, message: string[] | string): number; | ||
| flash(type: string, format: string, ...args: any[]): number; | ||
| } | ||
| /* Express Request augmentation */ | ||
| declare module "express-serve-static-core" { | ||
| interface Request { | ||
| flash(): { [key: string]: string[] }; | ||
| flash(type: string): string[]; | ||
| flash(type: string, message: string | string[]): number; | ||
| flash(type: string, format: string, ...args: unknown[]): number; | ||
| } | ||
| } | ||
| /* session-flash module declaration */ | ||
| declare module "session-flash" { | ||
| import express = require("express"); | ||
| interface IConnectFlashOptions { | ||
| unsafe?: boolean | undefined; | ||
| } | ||
| function e(options?: IConnectFlashOptions): express.RequestHandler; | ||
| export = e; | ||
| } | ||
| interface SessionFlashOptions { | ||
| unsafe?: boolean; | ||
| } | ||
| function sessionFlash( | ||
| options?: SessionFlashOptions | ||
| ): RequestHandler; | ||
| export = sessionFlash; | ||
| } |
+1
-1
| { | ||
| "name": "session-flash", | ||
| "version": "1.0.5", | ||
| "version": "1.0.6", | ||
| "description": "Flash message middleware for express.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.cjs", |
6812
1.58%131
4.8%