ZenFG TypeScript API / snapshot / root / finalizeFrameGraphSnapshot
Function: finalizeFrameGraphSnapshot()
finalizeFrameGraphSnapshot(
draft):FrameGraphSnapshotV1
Defined in: packages/snapshot/src/codec.ts:66
Finalizes a producer-owned Snapshot draft into a canonical Snapshot 1.2 value.
Parameters
draft
unknown
Returns
Remarks
Object properties whose value is undefined are omitted to support producer drafts assembled from optional fields. The result is detached from the draft and has passed JSON-safety and semantic validation. All JSON objects in the result have null prototypes; arrays remain ordinary arrays. Use Object.hasOwn(object, key) to test for own fields.
Throws
FrameGraphSnapshotValidationError when the draft cannot be finalized as a valid Snapshot 1.2 document.