RobinHerbots / Inputmask

Input Mask plugin
https://robinherbots.github.io/Inputmask/
MIT License
6.37k stars 2.17k forks source link

Property 'escapeRegex' does not exist on type 'Static' typescript 5.0.3 #2743

Open muhyasin89 opened 9 months ago

muhyasin89 commented 9 months ago

I'm using 5.0.3 for typescript i'm using typescript in an vue3 project when I try

import Inputmask from "inputmask";

Inputmask.escapeRegex(opts.groupSeparator)

I get

Property 'escapeRegex' does not exist on type 'Static'

to resolve this i'm adding manual in

index.d.ts - (DefinitelyTyped/types/inputmask/index.d.ts)

interface Static {
...
 escapeRegex(str: string) : string;
}