mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* 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
33 lines
871 B
TypeScript
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;
|
|
}
|
|
}
|
|
|