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