For example, I want to add a static quote
method to the RegExp
type:
RegExp.quote = (text: String) => { ... };
But when I try to do this, I receive the following error:
The property 'quote' does not exist on value of type '{ $1: string; $2: string; $3: string; $4: string; $5: string; $6: string; $7: string; $8: string; $9: string; lastMatch: string; (pattern: string, flags?: string): RegExp; new(pattern: string, flags?: string): RegExp; }'.