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

x/wmill/deps.ts>Select#mapOptions

Open-source developer platform to turn scripts into workflows and UIs. Fastest workflow engine (5x vs Airflow). Open-source alternative to Airplane and Retool.
Go to Latest
method Select.prototype.mapOptions
import { Select } from "https://deno.land/x/wmill@v1.345.2/deps.ts";

Map string option values to options and set option defaults.

Parameters

promptOptions: SelectOptions<TValue>
options: Array<
| Extract<TValue, string | number>
| Extract<WidenType<TValue>, string | number>
| SelectOption<TValue>
| SelectOptionGroup<TValue>
| GenericListSeparatorOption
>

Returns

Array<SelectOptionSettings<TValue> | SelectOptionGroupSettings<TValue>>