import { HttpProxyMiddleware } from './http-proxy-middleware'; import type { Options, RequestHandler, NextFunction } from './types'; import type * as http from 'http'; export function createProxyMiddleware< TReq = http.IncomingMessage, TRes = http.ServerResponse, TNext = NextFunction, >(options: Options): RequestHandler { const { middleware } = new HttpProxyMiddleware(options); return middleware as unknown as RequestHandler; }