/// <reference types="node" />
import type { Server } from 'node:http';
import type { HttpHandler } from './HttpHandler';
import { ServerConfigurator } from './ServerConfigurator';
/**
 * A {@link ServerConfigurator} that attaches an {@link HttpHandler} to the `request` event of a {@link Server}.
 * All incoming requests will be sent to the provided handler.
 * Failsafes are added to make sure a valid response is sent in case something goes wrong.
 *
 * The `showStackTrace` parameter can be used to add stack traces to error outputs.
 */
export declare class HandlerServerConfigurator extends ServerConfigurator {
    protected readonly logger: import("..").Logger;
    protected readonly errorLogger: (error: Error) => void;
    /** The main HttpHandler */
    private readonly handler;
    private readonly showStackTrace;
    constructor(handler: HttpHandler, showStackTrace?: boolean);
    handle(server: Server): Promise<void>;
    /**
     * Creates a readable error message based on the error and the `showStackTrace` parameter.
     */
    private createErrorMessage;
}
