/** * Mask function settings */ export declare type MaskProps = { /** * The masks that will be applied to the target. By default the characters ?, #, @ will be replaced by letters or numbers, numbers, letters, respectively. This character pattern can be changed. You can also use a Numerical Range to limit a numeric value to be entered using the pattern [-]. To escape a replacement character use \ before it. */ masks: [string, ...string[]] | string; /** * Autofill of the mask to be filled */ patterns?: { [key in string]: RegExp; }; /** * Autofill of the mask to be filled */ placeholder?: string; /** * Mask fill in inverted mode */ reverse?: boolean; /** * Allows data entry indefinitely by the last mask replacement character */ infinity?: boolean | Extra; /** * Apply a transformation to the result string */ transform?: 'uppercase' | 'lowercase' | 'capitalize' | 'capitalizeAll' | 'none'; /** * Characters to be substituted in the mask if approved by the regular expression */ maxentries?: number | null; }; /** * Mask function settings */ export declare type RequiredMaskProps = Required<{ masks: string[]; } & Omit>; /** * Applies characters to the infinite mask */ declare type Extra = { each: number; add: string; }; /** * Types that can become strings */ export declare type Stringable = { toString: () => string; }; /** * Application mask core */ export default class Mask { static defaultPatterns: RequiredMaskProps['patterns']; static reverser(target: string): string; static transform(target: string, type: RequiredMaskProps['transform']): string; static padding(target: string | number, length: number, char?: string, left?: boolean): string; private readonly _reserveds; private _completed; private _cleaned; private _remnant; private _props; constructor(props: MaskProps); get props(): Readonly; get completed(): boolean; get cleaned(): string; get entries(): number; apply(target: T): string; private _apply; } export {};