@navikt/ds-react
Version:
React components from the Norwegian Labour and Welfare Administration.
11 lines (10 loc) • 570 B
TypeScript
import { ComboboxOption } from "./types.js";
/**
*
* @param option ComboboxOption will be compared by both label and value, while a string option is checked if it matches either the label or value in the list.
* @param list
*/
declare const isInList: (option: ComboboxOption | string, list: ComboboxOption[]) => boolean;
declare const toComboboxOption: (value: string) => ComboboxOption;
declare const mapToComboboxOptionArray: (options?: string[] | ComboboxOption[]) => ComboboxOption[] | undefined;
export { isInList, mapToComboboxOptionArray, toComboboxOption };