Skip to content

IBroadcastSubscriber

Defined in: packages/async/src/synchro/broadcast.ts:30

A subscriber to a Broadcast channel.

T extends DefinedValue

readonly closed: boolean

Defined in: packages/async/src/synchro/broadcast.ts:36

Indicates whether the subscriber is closed.

True if the subscriber is closed, false otherwise.

close(): void

Defined in: packages/async/src/synchro/broadcast.ts:44

Closes the subscriber.

This will prevent further messages from being received. Any pending receive operations will be aborted.

void


receive(signal?): Promise<T>

Defined in: packages/async/src/synchro/broadcast.ts:53

Wait to receive a message from the broadcast channel.

AbortSignal | null

An optional AbortSignal to cancel the receive operation.

Promise<T>

If the subscriber has lagged behind and missed messages.