Merge pull request #25720 from cavarzan/master

[react-text-mask] Update react-text-mask: added optional render function
This commit is contained in:
Ron Buckton
2018-05-17 22:02:02 -07:00
committed by GitHub

View File

@@ -1,10 +1,10 @@
// Type definitions for react-text-mask 5.1
// Type definitions for react-text-mask 5.4
// Project: https://github.com/text-mask/text-mask
// Definitions by: Guilherme Hübner <https://github.com/guilhermehubner>
// Definitions by: Guilherme Hübner <https://github.com/guilhermehubner>, Deividi Cavarzan <https://github.com/cavarzan>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.6
import * as React from "react";
import * as React from 'react';
export type maskArray = Array<string | RegExp>;
@@ -17,15 +17,17 @@ export interface MaskedInputProps extends React.InputHTMLAttributes<HTMLInputEle
keepCharPositions?: boolean;
pipe?: (conformedValue: string, config: any) => false | string | { value: string, indexesOfPipedChars: number[] };
pipe?: (conformedValue: string, config: any) => false | string | { value: string; indexesOfPipedChars: number[] };
showMask?: boolean;
render?: (ref: MaskedInput, props: any) => any;
}
export interface conformToMaskResult {
conformedValue: string;
meta: {
someCharsRejected: boolean
someCharsRejected: boolean;
};
}