UNPKG

827 BTypeScriptView Raw
1import { ReactNode } from 'react';
2import { GroupTypeBase, OptionTypeBase } from './types';
3
4export type formatGroupLabel<
5 OptionType extends OptionTypeBase = any,
6 GroupType extends GroupTypeBase<OptionType> = GroupTypeBase<OptionType>
7> = (group: GroupType) => ReactNode;
8export function formatGroupLabel(group: GroupTypeBase<any>): ReactNode;
9
10export type getOptionLabel<OptionType extends OptionTypeBase = any> = (option: OptionType) => string;
11export function getOptionLabel(option: any): string;
12
13export type getOptionValue<OptionType extends OptionTypeBase = any> = (option: OptionType) => string;
14export function getOptionValue(option: any): string;
15
16export type isOptionDisabled<OptionType extends OptionTypeBase = any> = (option: OptionType) => boolean;
17export function isOptionDisabled(option: any): boolean;