useCount.d.ts 530 B

123456789101112
  1. import type { InputProps } from '..';
  2. import type { CountConfig, ShowCountFormatter } from '../interface';
  3. type ForcedCountConfig = Omit<CountConfig, 'show'> & Pick<Required<CountConfig>, 'strategy'> & {
  4. show: boolean;
  5. showFormatter?: ShowCountFormatter;
  6. };
  7. /**
  8. * Cut `value` by the `count.max` prop.
  9. */
  10. export declare function inCountRange(value: string, countConfig: ForcedCountConfig): boolean;
  11. export default function useCount(count?: CountConfig, showCount?: InputProps['showCount']): ForcedCountConfig;
  12. export {};