New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
String#matchAll should return iterable of RegExpExecArray (fixes #36788) #55565
Conversation
@microsoft-github-policy-service agree |
@typescript-bot test this |
Heya @jakebailey, I've started to run the parallelized Definitely Typed test suite on this PR at d0be0cd. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the diff-based user code test suite on this PR at d0be0cd. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the tsc-only perf test suite on this PR at d0be0cd. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the diff-based top-repos suite on this PR at d0be0cd. You can monitor the build here. Update: The results are in! |
@jakebailey Here are the results of running the user test suite comparing There were infrastructure failures potentially unrelated to your change:
Otherwise... Something interesting changed - please have a look. Details
|
@jakebailey Here they are:
CompilerComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
@jakebailey Here are the results of running the top-repos suite comparing Everything looks good! |
Hey @jakebailey, the results of running the DT tests are ready. Branch only errors:Package: string.prototype.matchall
|
@jakebailey, sorry, I'm new here. Where |
That's over in https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/string.prototype.matchall This is somewhat an expected failure because that other package duplicated the type, so is going to need typesVersions to fix. |
I've made a pull request to DefinitelyTyped but it's failing the tests and it'll continue to fail unless this pull request is merged. |
I think we can take this in post-beta. Thoughts @sandersn? |
It seems quite safe for a change to the stdlib, since it's only in es2020 and above. |
Fixes #36788.
matchAll
accepts only globalRegExp
s and thus, if it didn't throw, it always returnsRegExpExecArray
with non-optionalindex
andinput
.Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/matchAll#return_value.