import type { Interface as ReadlineInterface } from "node:readline"; import { UsageError } from "./errors.js"; /** * Error thrown when attempting to prompt in a non-interactive context. * Extends UsageError because it's a usage issue (user needs --force in non-interactive mode). */ export declare class NonInteractiveError extends UsageError { constructor(message: string); } /** * Check if stdin is a TTY (interactive terminal). * Returns false when input is piped or redirected. */ export declare function isStdinTTY(): boolean; /** * Options for confirmAction, primarily for testing. */ export interface ConfirmActionOptions { /** Custom readline interface (for testing) */ rl?: ReadlineInterface; /** Skip TTY check (for testing) */ skipTTYCheck?: boolean; } /** * Prompt the user for confirmation. * Returns true if the user enters 'y', 'yes', 'Y', or 'YES', false otherwise. * Returns false if the user sends EOF (Ctrl+D). * * @throws {NonInteractiveError} if stdin is not a TTY (non-interactive context) */ export declare function confirmAction(message: string, options?: ConfirmActionOptions): Promise; //# sourceMappingURL=prompt.d.ts.map