Skip to content

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

Description

@mia1024

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.

Activity

slevithan commented on Jun 1, 2021

@slevithan
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions