swaf/src/types/Express.d.ts

20 lines
509 B
TypeScript
Raw Normal View History

2020-04-22 15:52:17 +02:00
import {Environment} from "nunjucks";
import Model from "../db/Model";
declare module 'express-serve-static-core' {
export interface Request {
env: Environment;
models: { [p: string]: Model | null };
modelCollections: { [p: string]: Model[] | null };
flash(): { [key: string]: string[] };
flash(message: string): any;
flash(event: string, message: any): any;
}
export interface Response {
redirectBack(defaultUrl?: string): any;
}
}