import http from 'http'; import { Handler, Event, Response } from './lambda'; import { Config } from './config'; import { Hooks } from './createEmitter'; export interface HttpError extends Error { statusCode?: number; message: string; } export declare function createHttpError(statusCode: number, message: string): HttpError; export declare function getMimeType(response: Response): string; export declare function loadLambdaFroManifest(url: string, manifest: { [route: string]: string; }): { handler: Handler; }; export declare function processHandler(event: Event, lambda: { handler: Handler; }): Promise<{ statusCode: number; headers?: { [header: string]: string | number | boolean; } | undefined; multiValueHeaders?: { [header: string]: readonly (string | number | boolean)[]; } | undefined; body?: string | undefined; isBase64Encoded?: boolean | undefined; }>; export declare function createRequestHandler({ port, config }: { port: number; config: Config; }): (req: http.IncomingMessage, res: http.ServerResponse) => Promise; export declare function createServerHandler({ port, config }: { port: number; config: Config; }): (req: http.IncomingMessage, res: http.ServerResponse) => Promise; export declare function serve(config: Config, hooks: Hooks): { close(): Promise; };