Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/cliffy/prompt/mod.ts>GenericPromptOptions

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
interface GenericPromptOptions
import { type GenericPromptOptions } from "https://deno.land/x/cliffy@v1.0.0-rc.1/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: Deno.Reader & { readonly rid: number; setRaw(mode: boolean, options?: Deno.SetRawOptions): void; }

Change the prompt input stream.

optional
writer: Deno.WriterSync

Change the prompt output stream.