UNPKG

537 BPlain TextView Raw
1import { Request as ERequest, Response as EResponse } from "express";
2
3/**
4 * This is the base class for any response returned by a non-API controller.
5 * This class is used by the framework to correctly generate the response.
6 */
7export default abstract class Response {
8 /**
9 * Generate the correct response, injecting it to the standard Express response.
10 * @param req the standard Express request
11 * @param res the standard Express response
12 */
13 abstract performResponse(req: ERequest, res: EResponse): void;
14}