Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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.323.6/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>>