import { GroupBase } from './types' ; export const formatGroupLabel = < Option , Group extends GroupBase < Option > > ( group ) : string => group . label as string ; export const getOptionLabel = < Option > ( option ) : string => ( option as { label ? : unknown ; } ) . label as string ; export const getOptionValue = < Option > ( option ) : string => ( option as { value ? : unknown ; } ) . value as string ; export const isOptionDisabled = < Option > ( option ) : boolean => ! ! ( option as { isDisabled ? : unknown ; } ) . isDisabled ;