Skip to main content
Module

x/cliffy/prompt/mod.ts>GenericPromptOptions

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Latest
interface GenericPromptOptions
import { type GenericPromptOptions } from "https://deno.land/x/cliffy@v1.0.0-rc.4/prompt/mod.ts";

Generic prompt options.

Type Parameters

TValue
TRawValue

Properties

message: string

The prompt message.

optional
default: TValue

The default value of the prompt.

optional
hideDefault: boolean

Don't show the default value after the prompt message.

optional
validate: (value: TRawValue) => ValidateResult

Validate prompt value.

optional
transform: (value: TRawValue) => TValue | undefined

Transform input value to output value.

optional
hint: string

Show a hint below the prompt.

optional
pointer: string

Change the prompt pointer. Default is brightBlue("›").

optional
indent: string

Indent the prompt.

optional
keys: GenericPromptKeys

Keymap to assign key names to prompt actions.

optional
cbreak: boolean

Enable cbreak mode. For more information see Deno.SetRawOptions.

optional
prefix: string

Change the prompt prefix. Default is: yellow("? ").

optional
reader: Reader & { setRaw(mode: boolean, options?: Deno.SetRawOptions): void; isTerminal(): boolean; }

Change the prompt input stream.

optional
writer: WriterSync

Change the prompt output stream.