You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Array.from(str.matchAll(separator)).forEach(m=>{// doesn't compile with `strictNullChecks`, since `m.index` is `number | undefined`constlastIdx=m.index+m[0].length;});
⚙ Compilation target
ESNext
⚙ Library
ESNext
Missing / Incorrect Definition
es2020.string.d.ts
definesmatchAll
as returningRegExpMatchArray
:RegExpMatchArray
has optionalindex
andinput
:MDN says that
matchAll
returns an iterator of matches:But
RegExpExecArray
'sindex
andinput
are not optional:Sample Code
Documentation Link
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/matchAll#return_value
The text was updated successfully, but these errors were encountered: