Skip to content

InputPromptConfig

Free-text input prompt — maps to string and number flags. Part of PromptConfig.

Signatures

ts
interface InputPromptConfig extends PromptConfigBase {}

Members

Properties

kind

Discriminator identifying this as a free-text input prompt.

ts
kind: "input";

message

The question displayed to the user.

ts
message: string;

placeholder

Placeholder text shown before user types (informational only).

ts
placeholder?: string;

validate

Inline validation function. Return true if valid, or a string error message if invalid. Called before coercion to flag kind.

ts
validate?: { (value: string): string | true; };

See Also

Released under the MIT License.