-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Revert "ES2020: fix String.prototype.matchAll type and description" #62885
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR reverts a previous change that modified the String.prototype.matchAll type signature. The revert restores the original behavior where matchAll only accepts RegExp parameter instead of RegExp | string, aligning with TypeScript's strictness policy on similar methods.
- Reverts the type signature of
String.prototype.matchAllfrom acceptingRegExp | stringback to onlyRegExp - Updates JSDoc description to reflect the reverted parameter type
- Updates test baseline to match the reverted type signature
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/lib/es2020.string.d.ts | Reverts matchAll parameter type from RegExp | string to RegExp and updates JSDoc |
| tests/baselines/reference/stringMatchAll.types | Updates type baseline to reflect reverted matchAll signature |
|
for posterity for other readers, see thread at #62873 (comment) |
Reverts #62873
It did not fix the linked issue, but instead actually "fixed" #47310, which is marked as working-as-intended for the same reason as why we ban other params for strictness' sake.