UNPKG

434 BTypeScriptView Raw
1/// <reference types="node" />
2import * as http from "http";
3import * as Types from "./types";
4export type Request = http.IncomingMessage & {
5 body: any;
6};
7export type Response = http.ServerResponse;
8export type NextCallback = (err?: Error) => void;
9export type Middleware = (req: Request, res: Response, next: NextCallback) => void | Promise<void>;
10export default function middleware(config: Types.MiddlewareConfig): Middleware;