swaf/src/types/Express.d.ts

22 lines
555 B
TypeScript
Raw Normal View History

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