serializeWorkspaceLayoutStateRecord
Builds the record to persist into a serialized layout: leaf buckets for leaves absent from the layout are left out, and so are plugins with nothing left.
Import:
import { serializeWorkspaceLayoutStateRecord } from '@mnaoumov/obsidian-lib/components/workspace-layout-state-component';Signature:
function serializeWorkspaceLayoutStateRecord(record: WorkspaceLayoutStateRecord, layout: unknown): WorkspaceLayoutStateRecord | nullParameters:
| Parameter | Type | Description |
|---|---|---|
record |
WorkspaceLayoutStateRecord | The current record. |
layout |
unknown | The serialized layout. |
Returns: WorkspaceLayoutStateRecord | null — The record to persist, or null when there is nothing to persist.