xregexp icon indicating copy to clipboard operation
xregexp copied to clipboard

Incorrect return type of XRegExp in types/index.d.ts

Open mia1024 opened this issue 4 years ago • 1 comments
trafficstars

Currently, the return type of XRegExp declared in types/index.d.ts is

declare function XRegExp(pattern: string, flags?: string): RegExp;

However, this annotation is incorrect because it does not capture the two custom properties <regexp>.xregexp.source and <regexp>.xregexp.flags as indicated in the API documentation.

I'm happy to open a PR to fix this issue if necessary.

mia1024 avatar Jun 01 '21 21:06 mia1024

Thanks for the report, @jeriewang, and for offering to submit a PR to fix it! Would you mind opening a PR with the desired change?

slevithan avatar Jun 01 '21 21:06 slevithan