5.1.3 • Published 6 months ago
@types/text-mask-core v5.1.3
Installation
npm install --save @types/text-mask-core
Summary
This package contains type definitions for text-mask-core (https://github.com/text-mask/text-mask/core/#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/text-mask-core.
index.d.ts
// Type definitions for text-mask-core 5.1
// Project: https://github.com/text-mask/text-mask/core/#readme
// Definitions by: josh <https://github.com/huntjosh>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
export type Mask = Array<string | RegExp>;
export interface PipeAddResult {
value: string;
indexesOfPipedChars: number[];
}
export type PipeResult = PipeAddResult | string | false;
export type Pipe = (conformedValue: string, config: any) => PipeResult;
export interface CreateTextMaskConfig {
inputElement: HTMLInputElement;
mask: Mask;
guide?: string | undefined;
pipe?: Pipe | undefined;
placeholderChar?: string | undefined;
keepCharPositions?: boolean | undefined;
showMask?: boolean | undefined;
}
export interface TextMaskInputElement {
update: (rawValue?: string) => void;
}
export function createTextMaskInputElement(config: CreateTextMaskConfig): TextMaskInputElement;
Additional Details
- Last updated: Fri, 02 Jul 2021 21:32:20 GMT
- Dependencies: none
- Global values: none
Credits
These definitions were written by josh.