Module

x/cliffy/packages/prompt/prompts/toggle.ts>Toggle

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
class Toggle
extends GenericPrompt<boolean, string, ToggleSettings>
import { Toggle } from "https://dotland.deno.dev/x/cliffy@v0.12.0/packages/prompt/prompts/toggle.ts";

Properties

protected
status: string

Methods

protected
format(value: boolean): string
protected
getValue(): string
protected
handleEvent(event: KeyEvent): Promise<boolean>
protected
read(): Promise<boolean>
protected
selectActive()
protected
selectInactive()
protected
setPrompt(message: string)
protected
transform(value: string): boolean | undefined
protected
validate(value: string): boolean | string

Static Methods

prompt(options: string | ToggleOptions): Promise<boolean>