import { Prompt } from "https://deno.land/x/alloy_folk@v1.1.1/deps.ts";
const { Select } = Prompt;
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.