/** * Generates an HTTP error response based on the request's "Accept" header. * * If the "Accept" header includes "text/html" and debugging is enabled, it returns * an HTML response with the error message and stack trace. * * If the "Accept" header includes "application/json" or debugging is enabled, it * returns a JSON response with the error message and optionally the stack trace. * * Otherwise, it returns a plain text response indicating an internal server error. * * @param error - The error object or message to include in the response. * @param req - The incoming HTTP request object. * @param debug - A boolean indicating whether debugging information should be included. * @returns A Response object with the appropriate error details and status code. */ export declare function errorResponse(error: unknown, req: Request, debug: boolean): Response;