Skip to main content

@lexical/y/server

Type Aliases​

UpdateRoots​

UpdateRoots = object

Defined in: packages/lexical-y/src/server.ts:23

Experimental

The result of inspectUpdateRoots.

Properties​

roots​

roots: Set<string>

Defined in: packages/lexical-y/src/server.ts:25

Root names the update writes to (inserts and deletes).

unresolved​

unresolved: number

Defined in: packages/lexical-y/src/server.ts:30

Structs and deleted ranges whose root could not be resolved: their parent is neither in the update nor in doc.

Functions​

inspectUpdateRoots()​

inspectUpdateRoots(update, doc?): UpdateRoots

Defined in: packages/lexical-y/src/server.ts:61

Experimental

Transport-agnostic server helper: the shared roots an incoming Yjs update writes to (inserts and deletions). Pass the server's copy of the document to resolve items nested in types, and deleted ranges, that the update does not contain. Linear in the update size (each struct's root is resolved once, lookups are binary searches).

Parameters​

update​

Uint8Array

doc?​

Doc

Returns​

UpdateRoots

References​

DEFAULT_ROOT_NAME​

Re-exports DEFAULT_ROOT_NAME


LAYOUT_VERSION​

Re-exports LAYOUT_VERSION