Skip to content

js-bao-wss-client


js-bao-wss-client / ChannelSubscription

Interface: ChannelSubscription ​

A live channel membership, returned by JsBaoClient.subscribeToChannel.

expiresAt is epoch milliseconds and is the membership's whole lifetime: expiry is the only revocation a channel grant has, so past it the server stops delivering even though this socket stays open. Renewing means asking the authorizing function for another grant and subscribing again — which replaces this membership rather than adding one.

Properties ​

channel ​

channel: string


expiresAt ​

expiresAt: number


unsubscribe ​

unsubscribe: () => void

Leave the channel. Idempotent.

Returns ​

void

Documentation validated against js-bao-wss-client 3.4.0 · js-bao 0.11.0 · primitive-admin 1.0.62 · primitive-app 3.1.0 — 2026-09-30