Objective
Instead of
type SelectRenderCounter = (originalComponent: React.ReactElement<SelectCounterProps>, counterProps: SelectCounterProps) => React.ReactElement;
It can be
type SelectRenderCounter = (originalComponent: React.ReactElement<SelectCounterProps>, counterProps: SelectCounterProps) => React.ReactNode;
Because counter can be in some cases null or just number.
Solution Proposal
Change return type from React.ReactElement to React.ReactNode
Definition of done
Changed type
Added to documentation the renderCounter prop description