- License
- MIT
- Install Size
- 6.1 kB/-
- Vulns
- 0
- Published
$
npm install @types/react-text-mask@5.4.8$
pnpm add @types/react-text-mask@5.4.8$
yarn add @types/react-text-mask@5.4.8$
bun add @types/react-text-mask@5.4.8$
deno add npm:@types/react-text-mask@5.4.8$
vlt install @types/react-text-mask@5.4.8# Usually installed as a dev dependency
$
npm install -D @types/react-text-mask@5.4.8$
pnpm add -D @types/react-text-mask@5.4.8$
yarn add -D @types/react-text-mask@5.4.8$
bun add -d @types/react-text-mask@5.4.8$
deno add -D npm:@types/react-text-mask@5.4.8$
vlt install -D @types/react-text-mask@5.4.8Installation
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
// TypeScript Version: 2.8
import * as React from "react";
export type maskArray = Array<string | RegExp> | boolean;
export interface MaskedInputProps
extends React.InputHTMLAttributes<HTMLInputElement> {
mask?: maskArray | ((value: string) => maskArray) | undefined;
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, 07 Jul 2021 18:31:47 GMT
- Dependencies: @types/react
- Global values: none
Credits
These definitions were written by Guilherme Hübner, Deividi Cavarzan, and Artem Lyubchuk.