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

x/lume/deps/cliffy.ts>GenericList

🔥 Static site generator for Deno 🦕
Very Popular
Go to Latest
class GenericList
Re-export
Abstract
import { GenericList } from "https://deno.land/x/lume@v1.14.1/deps/cliffy.ts";

Generic list prompt representation.

Constructors

new
GenericList(settings: TSettings)

Type Parameters

TValue
TRawValue

Properties

protected
listIndex: number
protected
listOffset: number
protected
options: TSettings["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.