Revert "ES2020: fix String.prototype.matchAll type and description" (#62885)

This commit is contained in:
Jake Bailey 2025-12-11 14:21:52 -08:00 committed by GitHub
parent bbb5322c96
commit c84cb94778
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View File

@ -4,11 +4,11 @@
interface String {
/**
* Matches a string with a regular expression or string, and returns an iterable of matches
* Matches a string with a regular expression, and returns an iterable of matches
* containing the results of that search.
* @param regexp A regular expression or string literal with which to search the string
* @param regexp A regular expression
*/
matchAll(regexp: RegExp | string): RegExpStringIterator<RegExpExecArray>;
matchAll(regexp: RegExp): RegExpStringIterator<RegExpExecArray>;
/** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
toLocaleLowerCase(locales?: Intl.LocalesArgument): string;

View File

@ -6,12 +6,12 @@ const matches = "matchAll".matchAll(/\w/g);
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>"matchAll".matchAll(/\w/g) : RegExpStringIterator<RegExpExecArray>
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>"matchAll".matchAll : (regexp: RegExp | string) => RegExpStringIterator<RegExpExecArray>
> : ^ ^^ ^^^^^
>"matchAll".matchAll : (regexp: RegExp) => RegExpStringIterator<RegExpExecArray>
> : ^ ^^ ^^^^^
>"matchAll" : "matchAll"
> : ^^^^^^^^^^
>matchAll : (regexp: RegExp | string) => RegExpStringIterator<RegExpExecArray>
> : ^ ^^ ^^^^^
>matchAll : (regexp: RegExp) => RegExpStringIterator<RegExpExecArray>
> : ^ ^^ ^^^^^
>/\w/g : RegExp
> : ^^^^^^