2020-06-14 21:47:18 +02:00
|
|
|
import {Files} from "formidable";
|
2020-09-25 22:03:22 +02:00
|
|
|
import {Type} from "../Utils";
|
|
|
|
import Middleware from "../Middleware";
|
2020-09-25 23:42:15 +02:00
|
|
|
import {FlashMessages} from "../components/SessionComponent";
|
2020-04-22 15:52:17 +02:00
|
|
|
|
2020-04-23 11:16:05 +02:00
|
|
|
declare global {
|
|
|
|
namespace Express {
|
|
|
|
export interface Request {
|
2020-09-25 23:42:15 +02:00
|
|
|
getSession(): Session;
|
|
|
|
|
|
|
|
|
2020-06-14 21:47:18 +02:00
|
|
|
files: Files;
|
2020-04-22 15:52:17 +02:00
|
|
|
|
2020-09-25 22:03:22 +02:00
|
|
|
|
|
|
|
middlewares: Middleware[];
|
|
|
|
|
|
|
|
as<M extends Middleware>(type: Type<M>): M;
|
|
|
|
|
|
|
|
|
2020-09-25 23:42:15 +02:00
|
|
|
flash(): FlashMessages;
|
2020-04-22 15:52:17 +02:00
|
|
|
|
2020-09-25 23:42:15 +02:00
|
|
|
flash(message: string): unknown[];
|
2020-04-22 15:52:17 +02:00
|
|
|
|
2020-09-25 23:42:15 +02:00
|
|
|
flash(event: string, message: string): void;
|
2020-04-23 11:16:05 +02:00
|
|
|
}
|
2020-04-22 15:52:17 +02:00
|
|
|
|
2020-04-23 11:16:05 +02:00
|
|
|
export interface Response {
|
2020-09-25 23:42:15 +02:00
|
|
|
redirectBack(defaultUrl?: string): void;
|
2020-04-23 11:16:05 +02:00
|
|
|
}
|
2020-04-22 15:52:17 +02:00
|
|
|
}
|
2020-09-25 23:42:15 +02:00
|
|
|
}
|