File tree Expand file tree Collapse file tree
lib/internal/streams/iter Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -343,7 +343,7 @@ class BroadcastImpl {
343343 // Private methods
344344
345345 #recomputeMinCursor( ) {
346- const [ minCursor ] = getMinCursor (
346+ const { minCursor } = getMinCursor (
347347 this . #consumers, this . #bufferStart + this . #buffer. length ) ;
348348 this . #cachedMinCursor = minCursor ;
349349 this . #minCursorDirty = false ;
Original file line number Diff line number Diff line change @@ -357,7 +357,7 @@ class ShareImpl {
357357 }
358358
359359 #recomputeMinCursor( ) {
360- const [ minCursor , minCursorConsumers ] = getMinCursor (
360+ const { minCursor, minCursorConsumers } = getMinCursor (
361361 this . #consumers, this . #bufferStart + this . #buffer. length ) ;
362362 this . #cachedMinCursor = minCursor ;
363363 this . #cachedMinCursorConsumers = minCursorConsumers ;
@@ -606,7 +606,7 @@ class SyncShareImpl {
606606 }
607607
608608 #recomputeMinCursor( ) {
609- const [ minCursor , minCursorConsumers ] = getMinCursor (
609+ const { minCursor, minCursorConsumers } = getMinCursor (
610610 this . #consumers, this . #bufferStart + this . #buffer. length ) ;
611611 this . #cachedMinCursor = minCursor ;
612612 this . #cachedMinCursorConsumers = minCursorConsumers ;
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ function onSignalAbort(signal, handler) {
7474 * consumers are at that cursor.
7575 * @param {Set } consumers - Set of objects with a `cursor` property
7676 * @param {number } fallback - Cursor to return when set is empty
77- * @returns {[ number, number] }
77+ * @returns {{ minCursor: number, minCursorConsumers: number } }
7878 */
7979function getMinCursor ( consumers , fallback ) {
8080 let minCursor = fallback ;
@@ -87,7 +87,7 @@ function getMinCursor(consumers, fallback) {
8787 minCursorConsumers ++ ;
8888 }
8989 }
90- return [ minCursor , minCursorConsumers ] ;
90+ return { __proto__ : null , minCursor, minCursorConsumers } ;
9191}
9292
9393/**
You can’t perform that action at this time.
0 commit comments