declare module 'react-imask' { import Imask from 'imask' /** * The props accepted by react-imask, based * on the implementation of imask, with some additions */ export type IMaskInputProps = Partial< Pick< AnyMaskedOptionsAlt, | 'mask' | 'value' | 'prepare' | 'validate' | 'commit' | 'overwrite' | 'placeholderChar' | 'lazy' | 'definitions' | 'blocks' | 'pattern' | 'format' | 'parse' | 'autofix' | 'radix' | 'thousandsSeparator' | 'mapToRadix' | 'scale' | 'signed' | 'normalizeZeros' | 'padFractionalZeros' | 'min' | 'max' | 'dispatch' > > & { unmask?: boolean | 'typed' onAccept?: ( value: string, mask: InstanceType, ...args: T[] ) => void onComplete?: ( value: string, mask: InstanceType, ...args: T[] ) => void inputRef?: React.Ref } /** * A HOC that decorates a react component * with 'imask' props * * @param Component Any React Component */ export function IMaskMixin( Component: React.ComponentType<{ inputRef: React.Ref } & T> ): React.ComponentType /** * A basic IMask React Input */ export const IMaskInput: React.ComponentClass // extend IMask's type signature type MaskedOptions = { mask: MaskType } & Partial< Pick, 'parent' | 'prepare' | 'validate' | 'commit' | 'overwrite'> > // eslint-disable-next-line @typescript-eslint/no-empty-interface interface AnyMaskedOptionsArray extends Array {} export type AnyMaskedOptionsAlt = MaskedOptions | Imask.AnyMaskedOptions }