@types/text-mask-core
TypeScript icon, indicating that this package has built-in type declarations

5.1.3 • Public • Published

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

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: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by josh.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/text-mask-core

Weekly Downloads

8,106

Version

5.1.3

License

MIT

Unpacked Size

4.01 kB

Total Files

5

Last publish

Collaborators

  • types