DefinitelyTyped/react-maskedinput/index.d.ts
Karol Janyst 43751cf91f Add definitions for react-maskedinput (#13430)
* Add definitions for react-maskedinput

* Add tslint.json

* Add required compiler option

* Add flag to compile against typescript 2.1

* Add semicolon, remove ts 2.1 target
2016-12-28 11:09:04 -05:00

33 lines
871 B
TypeScript

// Type definitions for react-maskedinput 3.3
// Project: https://github.com/insin/react-maskedinput
// Definitions by: Karol Janyst <https://github.com/LKay>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { ComponentClass, HTMLAttributes } from "react";
export as namespace MaskedInput;
export = MaskedInput;
declare const MaskedInput: MaskedInput;
type MaskedInput = ComponentClass<MaskedInput.MaskedInputProps>;
declare namespace MaskedInput {
export interface FormatCharacter {
validate(char: string): string;
transform?(char: string): string;
}
export interface CharsFormatters {
[char: string]: FormatCharacter;
}
export interface MaskedInputProps extends HTMLAttributes<any> {
mask: string;
formatCharacter?: CharsFormatters;
placeholderChar?: string;
}
}