Skip to main content
Module

x/deno_books/deps.ts>Select#mapOptions

Access OpenLibrary's API with Deno.
Go to Latest
method Select.prototype.mapOptions
import { Select } from "https://deno.land/x/deno_books@v1.4.0/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>>