Skip to content

js-bao-wss-client


js-bao-wss-client / DatabaseSubscribeOptions

Interface: DatabaseSubscribeOptions<T, P> ​

Options for databases.subscribe().

T types the record payload delivered on each change (change.data / change.previousData), P types the bound params bag. Both are optional additive generics; they default to today's untyped shapes so existing untyped callers keep compiling. Typed subscribe binds T across the whole delivery path (event → payload envelope → onChange).

Type Parameters ​

T ​

T = unknown

P ​

P extends object = Record<string, unknown>

Properties ​

onChange ​

onChange: (event) => void

Called for every matching db.change frame until unsub() is called

Parameters ​

event ​

DatabaseChangePayload<T>

Returns ​

void


params? ​

optional params?: P

Bound params passed to the server; available in filter CEL as params.*

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