/**
 * readline shim - Terminal readline is not available in browser
 * Provides stubs for common usage patterns
 */
import { EventEmitter } from './events';
export interface ReadLineOptions {
    input?: unknown;
    output?: unknown;
    terminal?: boolean;
    prompt?: string;
}
export declare class Interface extends EventEmitter {
    private promptText;
    private input;
    private output;
    private closed;
    private questionCallback;
    constructor(_options?: ReadLineOptions);
    prompt(_preserveCursor?: boolean): void;
    setPrompt(prompt: string): void;
    getPrompt(): string;
    question(query: string, callback: (answer: string) => void): void;
    question(query: string, options: object, callback: (answer: string) => void): void;
    pause(): this;
    resume(): this;
    close(): void;
    write(_data: string, _key?: {
        ctrl?: boolean;
        name?: string;
    }): void;
    line: string;
    cursor: number;
    getCursorPos(): {
        rows: number;
        cols: number;
    };
}
export declare function createInterface(options?: ReadLineOptions): Interface;
export declare function clearLine(stream: any, dir: number, callback?: () => void): boolean;
export declare function clearScreenDown(stream: any, callback?: () => void): boolean;
export declare function cursorTo(stream: any, x: number, y?: number | (() => void), callback?: () => void): boolean;
export declare function moveCursor(stream: any, dx: number, dy: number, callback?: () => void): boolean;
export declare function emitKeypressEvents(stream: any, _interface?: Interface): void;
export declare const promises: {
    createInterface: (options?: ReadLineOptions) => {
        question: (query: string) => Promise<string>;
        close: () => void;
        [Symbol.asyncIterator]: () => AsyncGenerator<never, void, unknown>;
    };
};
declare const _default: {
    Interface: typeof Interface;
    createInterface: typeof createInterface;
    clearLine: typeof clearLine;
    clearScreenDown: typeof clearScreenDown;
    cursorTo: typeof cursorTo;
    moveCursor: typeof moveCursor;
    emitKeypressEvents: typeof emitKeypressEvents;
    promises: {
        createInterface: (options?: ReadLineOptions) => {
            question: (query: string) => Promise<string>;
            close: () => void;
            [Symbol.asyncIterator]: () => AsyncGenerator<never, void, unknown>;
        };
    };
};
export default _default;
//# sourceMappingURL=readline.d.ts.map