import type { ClappEvents, ClappState } from '../types'; import type { Key } from 'node:readline'; import type { Readable, Writable } from 'node:stream'; export declare interface PromptOptions> { render: (this: Omit) => string | undefined initialValue?: any initialUserInput?: string validate?: ((_value: TValue | undefined) => string | Error | undefined) | undefined input?: Readable output?: Writable debug?: boolean signal?: AbortSignal } export default class Prompt { protected input: Readable; protected output: Writable; protected _cursor: number; state: ClappState; error: string; value: TValue | undefined; userInput: string; constructor(options: PromptOptions>, trackValue?: boolean); protected unsubscribe(): void; on>(event: T, cb: ClappEvents[T]): this; once>(event: T, cb: ClappEvents[T]): this; emit>(event: T, ...data: Parameters[T]>): this; prompt(): Promise; protected _isActionKey(char: string | undefined, _key: Key): boolean; protected _setValue(value: TValue | undefined): void; protected _setUserInput(value: string | undefined, write?: boolean): void; protected close(): void; }