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
{{ message }}
Repository navigation
Rename broadcast result property to something else (example channel) #29
This also makes the relationship between the two returned endpoints easier to understand:
writer is the producer-facing endpoint.
channel is the consumer-facing endpoint.
Alternatives considered
Rename Stream.broadcast() to Stream.multicast()
multicast is technically accurate, but broadcast is already understandable and contrasts well with Stream.share(). It would also require a broader API migration without resolving the need to name the returned consumer-facing endpoint.
Use source
const{ writer, source }=Stream.broadcast();
This describes its role but loses the useful broadcast-channel terminology and could be confused with an upstream input source.
Use readable
const{ writer, readable }=Stream.broadcast();
The returned object creates multiple readable consumers rather than being a single readable stream, so readable could be misleading.
Yeah this is reasonable. I do wonder if channel is the right name as it could be confusing with BroadcastChannel. Completely different things but the name pairing could cause confusion.
Activity
trivikr commentedon Aug 30, 2026
Changes for the proposed API posted in draft PR #32
jasnell commentedon Sep 28, 2026
Yeah this is reasonable. I do wonder if channel is the right name as it could be confusing with BroadcastChannel. Completely different things but the name pairing could cause confusion.