minishouyin/node_modules/rc-input/lib/hooks/useCount.d.ts
2025-11-12 11:35:57 +08:00

13 lines
530 B
TypeScript

import type { InputProps } from '..';
import type { CountConfig, ShowCountFormatter } from '../interface';
type ForcedCountConfig = Omit<CountConfig, 'show'> & Pick<Required<CountConfig>, 'strategy'> & {
show: boolean;
showFormatter?: ShowCountFormatter;
};
/**
* Cut `value` by the `count.max` prop.
*/
export declare function inCountRange(value: string, countConfig: ForcedCountConfig): boolean;
export default function useCount(count?: CountConfig, showCount?: InputProps['showCount']): ForcedCountConfig;
export {};