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

x/alloy_folk/deps.ts>cliffy.GenericList

An application installer for restriced macOS
Go to Latest
class cliffy.GenericList
extends GenericInput<T, V, S>
Re-export
Abstract
import { cliffy } from "https://deno.land/x/alloy_folk@v1.1.1/deps.ts";
const { GenericList } = cliffy;

Generic list prompt representation.

Constructors

new
GenericList(settings: S)

Properties

protected
listIndex: number
protected
listOffset: number
protected
options: S["options"]

Methods

protected
addChar(char: string): void
protected
body(): string | Promise<string>

Render options.

protected
deleteChar(): void
protected
deleteCharRight(): void
protected
getInfo(): string
protected
getList(): string

Render options list.

protected
getListHeight(): number

Get options row height.

protected
getListIndex(value?: string)
protected
abstract
getListItem(item: GenericListOptionSettings, isSelected?: boolean): string

Render option.

protected
getOptionByValue(value: string): GenericListOptionSettings | undefined

Find option by value.

protected
getPageOffset(index: number)
protected
handleEvent(event: KeyCode): Promise<void>

Handle user input event.

protected
match(): void
protected
message(): string
protected
moveCursorLeft(): void
protected
moveCursorRight(): void
protected
read(): Promise<boolean>

Read user input.

protected
selectNext(): void

Select next option.

protected
selectNextPage(): void

Select next page.

protected
selectPrevious(): void

Select previous option.

protected
selectPreviousPage(): void

Select previous page.

Static Methods

Set list option defaults.

Create list separator.