mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-10 18:04:18 -05:00
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
This commit is contained in:
2
src/lib/es2020.string.d.ts
vendored
2
src/lib/es2020.string.d.ts
vendored
@@ -6,7 +6,7 @@ interface String {
|
||||
* containing the results of that search.
|
||||
* @param regexp A variable name or string literal containing the regular expression pattern and flags.
|
||||
*/
|
||||
matchAll(regexp: RegExp): IterableIterator<RegExpMatchArray>;
|
||||
matchAll(regexp: RegExp): IterableIterator<RegExpExecArray>;
|
||||
|
||||
/** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
|
||||
toLocaleLowerCase(locales?: Intl.LocalesArgument): string;
|
||||
|
||||
@@ -2,23 +2,23 @@
|
||||
|
||||
=== stringMatchAll.ts ===
|
||||
const matches = "matchAll".matchAll(/\w/g);
|
||||
>matches : IterableIterator<RegExpMatchArray>
|
||||
>"matchAll".matchAll(/\w/g) : IterableIterator<RegExpMatchArray>
|
||||
>"matchAll".matchAll : (regexp: RegExp) => IterableIterator<RegExpMatchArray>
|
||||
>matches : IterableIterator<RegExpExecArray>
|
||||
>"matchAll".matchAll(/\w/g) : IterableIterator<RegExpExecArray>
|
||||
>"matchAll".matchAll : (regexp: RegExp) => IterableIterator<RegExpExecArray>
|
||||
>"matchAll" : "matchAll"
|
||||
>matchAll : (regexp: RegExp) => IterableIterator<RegExpMatchArray>
|
||||
>matchAll : (regexp: RegExp) => IterableIterator<RegExpExecArray>
|
||||
>/\w/g : RegExp
|
||||
|
||||
const array = [...matches];
|
||||
>array : RegExpMatchArray[]
|
||||
>[...matches] : RegExpMatchArray[]
|
||||
>...matches : RegExpMatchArray
|
||||
>matches : IterableIterator<RegExpMatchArray>
|
||||
>array : RegExpExecArray[]
|
||||
>[...matches] : RegExpExecArray[]
|
||||
>...matches : RegExpExecArray
|
||||
>matches : IterableIterator<RegExpExecArray>
|
||||
|
||||
const { index, input } = array[0];
|
||||
>index : number
|
||||
>input : string
|
||||
>array[0] : RegExpMatchArray
|
||||
>array : RegExpMatchArray[]
|
||||
>array[0] : RegExpExecArray
|
||||
>array : RegExpExecArray[]
|
||||
>0 : 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user