injectYjsWebsocket

Connects a Y.Doc to a y-websocket server. Exposes status() and isSynced() read-only Signals to track real-time WebSocket connection state.

TypeScriptexample.ts
import { injectYjsWebsocket } from '@angular-helpers/yjs'

# Properties

FieldTypeDescription
serverUrlstringThe WebSocket server endpoint (e.g. wss://demos.yjs.dev)
roomNamestringRoom/document identifier key.
docY.DocTarget Y.Doc instance.
options?YjsWebsocketOptionsOptional provider params or polyfills.
LCP N/A
CLS N/A
INP N/A