File tree Expand file tree Collapse file tree
tests/baselines/reference Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,5 +6,5 @@ interface String {
66 * containing the results of that search.
77 * @param regexp A variable name or string literal containing the regular expression pattern and flags.
88 */
9- matchAll ( regexp : RegExp ) : IterableIterator < RegExpMatchArray > ;
9+ matchAll ( regexp : RegExp ) : IterableIterator < RegExpExecArray > ;
1010}
Original file line number Diff line number Diff line change 22
33=== stringMatchAll.ts ===
44const matches = "matchAll".matchAll(/\w/g);
5- >matches : IterableIterator<RegExpMatchArray >
6- >"matchAll".matchAll(/\w/g) : IterableIterator<RegExpMatchArray >
7- >"matchAll".matchAll : (regexp: RegExp) => IterableIterator<RegExpMatchArray >
5+ >matches : IterableIterator<RegExpExecArray >
6+ >"matchAll".matchAll(/\w/g) : IterableIterator<RegExpExecArray >
7+ >"matchAll".matchAll : (regexp: RegExp) => IterableIterator<RegExpExecArray >
88>"matchAll" : "matchAll"
9- >matchAll : (regexp: RegExp) => IterableIterator<RegExpMatchArray >
9+ >matchAll : (regexp: RegExp) => IterableIterator<RegExpExecArray >
1010>/\w/g : RegExp
1111
1212const array = [...matches];
13- >array : RegExpMatchArray []
14- >[...matches] : RegExpMatchArray []
15- >...matches : RegExpMatchArray
16- >matches : IterableIterator<RegExpMatchArray >
13+ >array : RegExpExecArray []
14+ >[...matches] : RegExpExecArray []
15+ >...matches : RegExpExecArray
16+ >matches : IterableIterator<RegExpExecArray >
1717
1818const { index, input } = array[0];
1919>index : number
2020>input : string
21- >array[0] : RegExpMatchArray
22- >array : RegExpMatchArray []
21+ >array[0] : RegExpExecArray
22+ >array : RegExpExecArray []
2323>0 : 0
2424
You can’t perform that action at this time.
0 commit comments