TLSerializedStore

See source code

A serialized representation of a tldraw store that can be persisted or transmitted. Contains all store records in a JSON-serializable format.

type TLSerializedStore = SerializedStore<TLRecord>;

Example

// Serialize a store
const serializedStore: TLSerializedStore = store.serialize();

// Save to localStorage
localStorage.setItem("drawing", JSON.stringify(serializedStore));
Prev
TLSchema
Next
TLShape