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.
Currently, the return type of
XRegExp
declared intypes/index.d.ts
isHowever, 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.