session-flash 1.0.5 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +21 -14
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
|
+
import type { RequestHandler } from "express";
|
|
2
|
+
import "express-serve-static-core";
|
|
1
3
|
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
/* Express Request augmentation */
|
|
5
|
+
declare module "express-serve-static-core" {
|
|
6
|
+
interface Request {
|
|
7
|
+
flash(): { [key: string]: string[] };
|
|
8
|
+
flash(type: string): string[];
|
|
9
|
+
flash(type: string, message: string | string[]): number;
|
|
10
|
+
flash(type: string, format: string, ...args: unknown[]): number;
|
|
11
|
+
}
|
|
9
12
|
}
|
|
10
13
|
|
|
14
|
+
/* session-flash module declaration */
|
|
11
15
|
declare module "session-flash" {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
interface SessionFlashOptions {
|
|
17
|
+
unsafe?: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function sessionFlash(
|
|
21
|
+
options?: SessionFlashOptions
|
|
22
|
+
): RequestHandler;
|
|
23
|
+
|
|
24
|
+
export = sessionFlash;
|
|
25
|
+
}
|