Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/react-text-mask

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/react-text-mask

TypeScript definitions for react-text-mask

  • 5.4.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
175K
increased by1.95%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/react-text-mask

Summary

This package contains type definitions for react-text-mask (https://github.com/text-mask/text-mask/tree/master/react).

Details

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

index.d.ts

// Type definitions for react-text-mask 5.4
// Project: https://github.com/text-mask/text-mask/tree/master/react
// Definitions by: Guilherme Hübner <https://github.com/guilhermehubner>
//                 Deividi Cavarzan <https://github.com/cavarzan>
//                 Artem Lyubchuk <https://github.com/needpower>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 3.9

import * as React from "react";

export type maskArray = Array<string | RegExp> | false;

export interface MaskedInputProps
    extends React.InputHTMLAttributes<HTMLInputElement> {
    mask: maskArray | ((value: string) => maskArray);

    guide?: boolean | undefined;

    placeholderChar?: string | undefined;

    keepCharPositions?: boolean | undefined;

    pipe?: ((
        conformedValue: string,
        config: any
    ) => false | string | { value: string; indexesOfPipedChars: number[] }) | undefined;

    showMask?: boolean | undefined;

    render?: ((ref: (inputElement: HTMLElement) => void, props: any) => any) | undefined;
}

export interface conformToMaskResult {
    conformedValue: string;
    meta: {
        someCharsRejected: boolean;
    };
}

export default class MaskedInput extends React.Component<
    MaskedInputProps,
    any
> {
  inputElement: HTMLElement;
}

export function conformToMask(
    text: string,
    mask: maskArray | ((value: string) => maskArray),
    config?: any
): conformToMaskResult;

Additional Details

  • Last updated: Wed, 04 Aug 2021 09:31:28 GMT
  • Dependencies: @types/react
  • Global values: none

Credits

These definitions were written by Guilherme Hübner, Deividi Cavarzan, and Artem Lyubchuk.

FAQs

Package last updated on 04 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc