Transport
Minimal message bus. Implementations: BroadcastChannelTransport (same-origin), NoopTransport (SSR / local-only), MemoryTransport (tests). A transport never echoes a client’s own posts back to it.
Methods
Section titled “Methods”close()
Section titled “close()”close(): void;Returns
Section titled “Returns”void
post()
Section titled “post()”post(data): void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
data | unknown |
Returns
Section titled “Returns”void
subscribe()
Section titled “subscribe()”subscribe(listener): () => void;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
listener | (data) => void |
Returns
Section titled “Returns”() => void