Interface PromptOptions

interface PromptOptions {
    default?: null | string;
    message?: string;
    timeout?: number;
    validate?: Callable<string, boolean>;
}

Properties

default?: null | string

Default value. Will be triggered on empty responses, timeout expiration, and non-interactive contexts.

message?: string

A message to prompt.

timeout?: number

A timeout for the prompt.

validate?: Callable<string, boolean>

Tests the validity of a response. Returns true for valid responses, false for non-valid ones.