mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-30 23:30:06 +00:00
Merge pull request #25720 from cavarzan/master
[react-text-mask] Update react-text-mask: added optional render function
This commit is contained in:
12
types/react-text-mask/index.d.ts
vendored
12
types/react-text-mask/index.d.ts
vendored
@@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user