import {Environment} from "nunjucks"; import Model from "../db/Model"; import AuthGuard from "../auth/AuthGuard"; import {Files} from "formidable"; import User from "../auth/models/User"; declare global { namespace Express { export interface Request { env: Environment; models: { user?: User | null, [p: string]: Model | null | undefined, }; modelCollections: { [p: string]: Model[] | null }; authGuard: AuthGuard; files: Files; flash(): { [key: string]: string[] }; flash(message: string): any; flash(event: string, message: any): any; } export interface Response { redirectBack(defaultUrl?: string): any; } } }