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