import type { Readable, Writable } from 'stream'; export declare function isCancel(value: unknown): value is symbol; export interface PromptOptions { render(this: Omit): string | void; placeholder?: string; initialValue?: any; validate?: ((value: any) => string | void) | undefined; input?: Readable; output?: Writable; debug?: boolean; } export type State = 'initial' | 'active' | 'cancel' | 'submit' | 'error'; export default class Prompt { protected input: Readable; protected output: Writable; private rl; private opts; private _track; private _render; protected _cursor: number; state: State; value: any; error: string; constructor({ render, input, output, ...opts }: PromptOptions, trackValue?: boolean); prompt(): Promise; private subscribers; on(event: string, cb: (...args: any) => any): void; once(event: string, cb: (...args: any) => any): void; emit(event: string, ...data: any[]): void; private unsubscribe; private onKeypress; protected close(): void; private restoreCursor; private _prevFrame; private render; }