Skip to content

Intermact API Reference / @intermact/core / validateSerializedProject

Function: validateSerializedProject()

validateSerializedProject(project): asserts project is SerializedProject

Defined in: packages/core/src/serialize/serialize.ts:112

Validate the structural shape of a SerializedProject before reconstruction (design.md §17). Catches corrupt/hand-edited/malicious payloads at the boundary with a clear serialization-error instead of letting a deep rebuildObject/unbakeOp throw an opaque error. Checks required fields, id/parent references, and op shapes — not value ranges (those degrade safely).

Parameters

project

unknown

Returns

asserts project is SerializedProject

Intermact v1.0 — 文档覆盖 Phase-1 / Phase-2 / Phase-3(全阶段)