@types/react-text-mask
Advanced tools
Comparing version 5.4.7 to 5.4.8
@@ -15,18 +15,18 @@ // Type definitions for react-text-mask 5.4 | ||
extends React.InputHTMLAttributes<HTMLInputElement> { | ||
mask?: maskArray | ((value: string) => maskArray); | ||
mask?: maskArray | ((value: string) => maskArray) | undefined; | ||
guide?: boolean; | ||
guide?: boolean | undefined; | ||
placeholderChar?: string; | ||
placeholderChar?: string | undefined; | ||
keepCharPositions?: boolean; | ||
keepCharPositions?: boolean | undefined; | ||
pipe?: ( | ||
pipe?: (( | ||
conformedValue: string, | ||
config: any | ||
) => false | string | { value: string; indexesOfPipedChars: number[] }; | ||
) => false | string | { value: string; indexesOfPipedChars: number[] }) | undefined; | ||
showMask?: boolean; | ||
showMask?: boolean | undefined; | ||
render?: (ref: (inputElement: HTMLElement) => void, props: any) => any; | ||
render?: ((ref: (inputElement: HTMLElement) => void, props: any) => any) | undefined; | ||
} | ||
@@ -33,0 +33,0 @@ |
{ | ||
"name": "@types/react-text-mask", | ||
"version": "5.4.7", | ||
"version": "5.4.8", | ||
"description": "TypeScript definitions for react-text-mask", | ||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-text-mask", | ||
"license": "MIT", | ||
@@ -34,4 +35,4 @@ "contributors": [ | ||
}, | ||
"typesPublisherContentHash": "13f1eb105c273899171710899d20542fa4bacaec3a3076fbb0716ebe6dea06c4", | ||
"typeScriptVersion": "3.5" | ||
"typesPublisherContentHash": "ba07e8d4935ef31ba73505c585e95b5c0b799b7aba640fac12cd3310b89c48ef", | ||
"typeScriptVersion": "3.6" | ||
} |
@@ -9,5 +9,60 @@ # Installation | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-text-mask. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-text-mask/index.d.ts) | ||
````ts | ||
// Type definitions for react-text-mask 5.4 | ||
// Project: https://github.com/text-mask/text-mask/tree/master/react | ||
// Definitions by: Guilherme Hübner <https://github.com/guilhermehubner> | ||
// Deividi Cavarzan <https://github.com/cavarzan> | ||
// Artem Lyubchuk <https://github.com/needpower> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.8 | ||
import * as React from "react"; | ||
export type maskArray = Array<string | RegExp> | boolean; | ||
export interface MaskedInputProps | ||
extends React.InputHTMLAttributes<HTMLInputElement> { | ||
mask?: maskArray | ((value: string) => maskArray) | undefined; | ||
guide?: boolean | undefined; | ||
placeholderChar?: string | undefined; | ||
keepCharPositions?: boolean | undefined; | ||
pipe?: (( | ||
conformedValue: string, | ||
config: any | ||
) => false | string | { value: string; indexesOfPipedChars: number[] }) | undefined; | ||
showMask?: boolean | undefined; | ||
render?: ((ref: (inputElement: HTMLElement) => void, props: any) => any) | undefined; | ||
} | ||
export interface conformToMaskResult { | ||
conformedValue: string; | ||
meta: { | ||
someCharsRejected: boolean; | ||
}; | ||
} | ||
export default class MaskedInput extends React.Component< | ||
MaskedInputProps, | ||
any | ||
> { | ||
inputElement: HTMLElement; | ||
} | ||
export function conformToMask( | ||
text: string, | ||
mask: maskArray | ((value: string) => maskArray), | ||
config?: any | ||
): conformToMaskResult; | ||
```` | ||
### Additional Details | ||
* Last updated: Thu, 08 Apr 2021 20:31:23 GMT | ||
* Last updated: Wed, 07 Jul 2021 18:31:47 GMT | ||
* Dependencies: [@types/react](https://npmjs.com/package/@types/react) | ||
@@ -14,0 +69,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
6077
0
72