Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SavedStateTree

Optimized representation of saved state used by Collab.save and Collab.load.

A Collab with children may store the children's save data in children; this is usually more convenient than serializing everything into a single Uint8Array.

The return value of Collab.save is normalized before being passed to Collab.load:

  • If self was undefined, it is replaced by an empty Uint8Array.
  • If children was undefined, it is replaced by an empty Map.

Hierarchy

  • SavedStateTree

Index

Properties

Properties

children?: Map<string, SavedStateTree>

Saved states for child Collabs, keyed by name.

Iterator order is preserved.

Normalization: undefined -> empty map.

self?: Uint8Array

Saved state for the current Collab.

Normalization: undefined -> empty Uint8Array.

Generated using TypeDoc