Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/alloy/deps.ts>cliffy.Checkbox

An application installer for restriced macOS
Latest
class cliffy.Checkbox
extends GenericList<string[], string[], CheckboxSettings>
import { cliffy } from "https://deno.land/x/alloy@v0.0.9/deps.ts";
const { Checkbox } = cliffy;

Checkbox prompt representation.

Methods

protected
checkValue(): void

Check selected option.

protected
format(value: string[]): string

Format output value.

protected
getListItem(item: CheckboxOptionSettings, isSelected?: boolean): string

Render checkbox option.

protected
getValue(): string[]

Get value of checked options.

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

Handle user input event.

protected
transform(value: string[]): string[]

Map input value to output value.

protected
validate(value: string[]): boolean | string

Validate input value.

Static Methods

protected
mapOptions(options: CheckboxOptions): CheckboxValueSettings

Map string option values to options and set option defaults.

inject(value: string[]): void

Inject prompt value. Can be used for unit tests or pre selections.

prompt(options: CheckboxOptions): Promise<string[]>

Execute the prompt and show cursor on end.

separator(label?: string): CheckboxOption

Create list separator.