/** * options type for input options */ import { MapEmitSelect } from '../helpers'; export interface KcOption { value: V; key?: K; label?: L; compareFn?: (selectedOption: V | KcOptionGroupValue, currentOption: V) => boolean; } export type KcGroup = { [K: string]: KcGroup | OptionGroup; }; export interface OptionGroup { value: KcOption[] | KcOption[][]; label?: string; } /** * options type for output options */ export type KcOptionValue = V | V[]; export type KcOptionGroupValue = { [K: string]: KcOptionValue | KcOptionGroupValue; }; /** * options for internal structure */ export type KcOptionSelection = MapEmitSelect | KcOptionSelection, string | V | K, boolean>;