///
///
import { ServerResponse as Response, IncomingMessage } from 'http';
import { EventEmitter } from 'events';
type NextFunction = (err?: any) => void;
export type ReqWithBody = IncomingMessage & {
body?: T;
} & EventEmitter;
export declare const hasBody: (method: string) => boolean;
export declare const p: (fn: (body: any) => any) => (req: ReqWithBody, _res: Response, next: (err?: any) => void) => Promise;
declare const custom: (fn: (body: any) => any) => (req: ReqWithBody, _res: Response, next: NextFunction) => Promise;
declare const json: () => (req: ReqWithBody, res: Response, next: NextFunction) => Promise;
declare const raw: () => (req: ReqWithBody, _res: Response, next: NextFunction) => Promise;
declare const text: () => (req: ReqWithBody, _res: Response, next: NextFunction) => Promise;
declare const urlencoded: () => (req: ReqWithBody, res: Response, next: NextFunction) => Promise;
export { custom, json, raw, text, urlencoded };