import http from 'http'; /** * Create an HTTP request listener based on the supplied function. * * - The request body is JSON parsed and passed into the function as parameters. * - The function's return value is JSON stringified into the response body. */ export declare const createRequestListenerFromFunction: (fn: (...args: unknown[]) => Promise) => http.RequestListener; /** * Create a HTTP server based on the supplied `http.RequestListener`. * * This function resolves when the server is closed. */ export declare const serveRequestListener: (requestListener: http.RequestListener, port?: number) => Promise;