import { Cliffy } from "https://deno.land/x/dmm@v2.1.2/tests/integration/up-to-date-deps/original_deps.ts";
const { Select } = Cliffy;
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.