@types/react-maskedinput
TypeScript icon, indicating that this package has built-in type declarations

4.0.10 • Public • Published

Installation

npm install --save @types/react-maskedinput

Summary

This package contains type definitions for react-maskedinput (https://github.com/insin/react-maskedinput).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-maskedinput.

import * as React from "react";

declare namespace MaskedInput {
    interface FormatCharacter {
        validate(char: string): string;
        transform?(char: string): string;
    }

    interface CharsFormatters {
        [char: string]: FormatCharacter;
    }

    interface MaskedInputProps extends
        Omit<
            React.InputHTMLAttributes<HTMLInputElement>,
            | "maxLength"
            | "onKeyDown"
            | "onKeyPress"
            | "onPaste"
        >
    {
        /**
         * The masking pattern to be applied to the `<input>`.
         * See the {@link https://github.com/insin/inputmask-core#pattern|inputmask-core} docs for
         * supported formatting characters.
         */
        mask: string;
        /**
         * Customised format character definitions for use in the pattern.
         * See the {@link https://github.com/insin/inputmask-core#formatcharacters|inputmask-core}
         * docs for details of the structure of this object.
         */
        formatCharacters?: CharsFormatters | undefined;
        /**
         * Customised placeholder character used to fill in editable parts of the pattern.
         * See the {@link https://github.com/insin/inputmask-core#placeholderchar--string|inputmask-core}
         * docs for details.
         */
        placeholderChar?: string | undefined;
    }
}

declare class MaskedInput extends React.Component<MaskedInput.MaskedInputProps> {}

export = MaskedInput;

Additional Details

  • Last updated: Tue, 24 Sep 2024 17:37:38 GMT
  • Dependencies: @types/react

Credits

These definitions were written by Karol Janyst, and Carlos Bonetti.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-maskedinput

Weekly Downloads

41,946

Version

4.0.10

License

MIT

Unpacked Size

5.84 kB

Total Files

5

Last publish

Collaborators

  • types