import {Files} from "formidable"; import {Type} from "../Utils"; import Middleware from "../Middleware"; import {FlashMessages} from "../components/SessionComponent"; declare global { namespace Express { export interface Request { getSession(): Session; files: Files; middlewares: Middleware[]; as(type: Type): M; flash(): FlashMessages; flash(message: string): unknown[]; flash(event: string, message: string): void; } export interface Response { redirectBack(defaultUrl?: string): void; } } }