DefinitelyTyped/types/react-maskedinput/index.d.ts
Adam Lavin 45a98df700 Updated react-maskedinput for 4.0.0 (#18058)
* Updated react-maskedinput for 4.0.0

* Add namespace back in, change the way component class is defined

* Removed namespaces and export interfaces
2017-07-17 11:24:12 -07:00

27 lines
775 B
TypeScript

// Type definitions for react-maskedinput 4.0
// Project: https://github.com/insin/react-maskedinput
// Definitions by: Karol Janyst <https://github.com/LKay>,
// Adam Lavin <https://github.com/lavoaster>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import * as React from "react";
export interface FormatCharacter {
validate(char: string): string;
transform?(char: string): string;
}
export interface CharsFormatters {
[char: string]: FormatCharacter;
}
export interface MaskedInputProps extends React.HTMLAttributes<any> {
mask: string;
formatCharacter?: CharsFormatters;
placeholderChar?: string;
}
declare class MaskedInput extends React.Component<MaskedInputProps> {}
export default MaskedInput;