UNPKG

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