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
As per documentation, RTCStatsReport is a Map-like object so it should include methods such as values(), entries() and members such as size. Note that it must NOT include delete(), clear() or set() since it's read-only (see doc links at the bottom).
However RTCStatsReport TypeScript definition only exposes forEach().
Sample Code
constpc=newRTCPeerConnection();pc.createDataChannel('foo',{negotiated: true,id: 123,ordered: true});conststats=awaitpc.getStats();console.log('--- num stats:',stats.size);for(const[id,stat]ofstats){console.log('--- stat:',stat);console.log('--- stats.get(id):',stats.get(id));}
⚙ Compilation target
ESNEXT
⚙ Library
No idea why this item is mandatory
Missing / Incorrect Definition
RTCStatsReport
is defined as follows:As per documentation,
RTCStatsReport
is aMap-like
object so it should include methods such asvalues()
,entries()
and members such assize
. Note that it must NOT includedelete()
,clear()
orset()
since it's read-only (see doc links at the bottom).However
RTCStatsReport
TypeScript definition only exposesforEach()
.Sample Code
Produces:
Documentation Link
The text was updated successfully, but these errors were encountered: