import { type Interface, type ReadLineOptions } from 'node:readline/promises'; export interface SetReadlineOptions extends Omit { /** * Whether to throw if the options can't be applied * @experimental A breaking change may occur during a non-major release */ $required?: boolean; } export declare function setReadlineOptions(options: SetReadlineOptions): boolean; /** * Get a readline reference. While held, this means process.stdin is ref'ed if it's a TTY. * A new instance is created when the previous one was closed. * Ctrl+C closes it and sends SIGINT to the process. */ export declare function getReadline(): Interface; /** * Close the readline instance, if any, so something else can read from stdin directly. * @internal */ export declare function closeReadline(): void; /** * Ask a question and wait for a line of input. * Lines that arrived before they were asked for, like piped input, answer questions first. * Rejects when the input ends first. */ export declare function ask(question: string): Promise; /** * Ask a question without showing the answer as it is typed, e.g. for passwords. * Otherwise behaves like {@link ask}. */ export declare function askHidden(question: string): Promise; /** * Confirm a yes/no question */ export declare function confirm(question?: string | null, defaultAnswer?: boolean): Promise; /** * Assert that the answer to a question is yes, otherwise fail and exit */ export declare function assertYes(question?: string | null, failureMessage?: string): Promise;