/// //exclude types from the InputHTMLAttributes declare const {defaultValue, value, ...inputAttributes}: React.InputHTMLAttributes; type InputAttributes = typeof inputAttributes; declare module "react-number-format" { export interface NumberFormatState { value?: string; numAsString?: string; } export interface NumberFormatValues { floatValue: number; formattedValue: string; value: string; } export type FormatInputValueFunction = (inputValue: string) => string; export interface SyntheticInputEvent extends React.SyntheticEvent { readonly target: HTMLInputElement; data: any; } export interface NumberFormatProps extends InputAttributes { thousandSeparator?: boolean | string; decimalSeparator?: boolean | string; thousandsGroupStyle?: 'thousand' | 'lakh' | 'wan'; decimalScale?: number; fixedDecimalScale?: boolean; displayType?: 'input' | 'text'; prefix?: string; suffix?: string; format?: string | FormatInputValueFunction; removeFormatting?: (formattedValue: string) => string; mask?: string | string[]; value?: number | string | null; defaultValue?: number | string; isNumericString?: boolean; customInput?: React.ComponentType; allowNegative?: boolean; allowEmptyFormatting?: boolean; onValueChange?: (values: NumberFormatValues) => void; /** * these are already included in React.HTMLAttributes * onKeyDown: Function; * onMouseUp: Function; * onChange: Function; * onFocus: Function; * onBlur: Function; */ type?: 'text' | 'tel' | 'password'; isAllowed?: (values: NumberFormatValues) => boolean; renderText?: (formattedValue: string) => React.ReactNode; getInputRef?: ((el: HTMLInputElement) => void) | React.Ref; [key: string]: any; } class NumberFormat extends React.Component {} export default NumberFormat; }