import { Select } from "https://deno.land/x/lume@v1.16.1/deps/cliffy.ts";
Select prompt representation.
Type Parameters
optional
TSettings extends SelectSettings = SelectSettingsMethods
protected
format(value: string): stringFormat output value.
protected
getListItem(item: SelectOptionSettings, isSelected?: boolean): stringRender select option.
protected
getValue(): stringGet value of selected option.
protected
input(): stringprotected
transform(value: string): stringMap input value to output value.
protected
validate(value: string): boolean | stringValidate input value.
Static Methods
protected
mapOptions(options: SelectOptions): SelectValueSettingsinject(value: string): void
Inject prompt value. Can be used for unit tests or pre selections.
prompt(options: SelectOptions): Promise<string>
Execute the prompt and show cursor on end.