跳转到内容

assertAdmittedProjectInput

此内容尚不支持你的语言。

assertAdmittedProjectInput(value): void

Defined in: packages/project-schema/src/admission.ts:412

Re-checks the bounded-shape half of snapshotProjectInput against a value that is already an owned JSON snapshot, without cloning it or touching the reflection machinery.

This exists for hot paths that mutate an admitted document in place, such as a transaction commit. It enforces every documented admission limit — node count, depth, array length, object key count, per-string and total UTF-8 budgets — plus canonical numbers and JSON-only types, so a document can never grow past its budget through repeated edits.

It deliberately does not repeat the checks that only a hostile caller object can fail: prototype identity, accessor properties, array density and cycles. Callers must therefore route every externally supplied value through snapshotProjectInput before it reaches the document. A cycle that slipped through anyway still terminates here, on the node budget.

unknown

void