import fs from 'node:fs';
import { Server as HttpServer } from 'node:http';
import type { Express } from 'express';
import TypedEmitter from 'typed-emitter';
import { Converter, ConvertedCallback } from './converter';
declare const Server_base: new () => TypedEmitter<Server.Events>;
export declare class Server extends Server_base {
    readonly converter: Converter;
    readonly inputDir: string;
    readonly options: Server.Options;
    readonly port: number;
    directoryIndex: string[];
    httpServer: HttpServer | undefined;
    server: Express | undefined;
    private static script;
    constructor(converter: Converter, opts?: Server.Options);
    start(): Promise<void>;
    stop(): Promise<void>;
    private convertMarkdown;
    private loadScript;
    private preprocess;
    private setup;
    private template;
    private validateMarkdown;
}
export declare namespace Server {
    type Events = {
        converted: ConvertedCallback;
        error: (err: Error) => void;
    };
    interface Options {
        directoryIndex?: string[];
    }
    interface ValidateResult {
        path: string;
        stats?: fs.Stats;
        valid: boolean;
    }
}
export {};
