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

x/alloy_folk/deps.ts>cliffy.Toggle

An application installer for restriced macOS
Go to Latest
class cliffy.Toggle
extends GenericPrompt<boolean, string, ToggleSettings>
import { cliffy } from "https://deno.land/x/alloy_folk@v1.1.1/deps.ts";
const { Toggle } = cliffy;

Toggle prompt representation.

Properties

protected
status: string

Methods

protected
format(value: boolean): string

Format output value.

protected
getValue(): string

Get input value.

protected
handleEvent(event: KeyCode): Promise<void>

Handle user input event.

protected
message(): string
protected
read(): Promise<boolean>

Read user input from stdin, handle events and validate user input.

protected
selectActive()

Set active.

protected
selectInactive()

Set inactive.

protected
transform(value: string): boolean | undefined

Map input value to output value.

protected
validate(value: string): boolean | string

Validate input value.

Static Methods

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

Execute the prompt and show cursor on end.