import { Select } from "https://deno.land/x/cliffy@v0.23.0/prompt/mod.ts";
Select prompt representation.
Type Parameters
optional
S 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.