dax
Version:
Cross platform shell tools inspired by zx.
25 lines • 914 B
TypeScript
import { type SelectionOptions } from "./utils.js";
/** Options for showing an alert message. */
export interface AlertOptions {
/** Message to display to the user. */
message: string;
/**
* Whether the user must press Enter to dismiss the alert.
* When `false`, any key press dismisses it.
* @default `false`
*/
requireEnter?: boolean;
/**
* Whether to not clear the prompt text on selection.
* @default `false`
*/
noClear?: boolean;
/**
* Signal that cancels the alert. When aborted, the returned promise
* rejects with `signal.reason`.
*/
signal?: AbortSignal;
}
export declare function alert(optsOrMessage: AlertOptions | string, options?: Omit<AlertOptions, "message">): Promise<void>;
export declare function innerAlert(opts: AlertOptions): Pick<SelectionOptions<true>, "render" | "onKey">;
//# sourceMappingURL=alert.d.ts.map