Shumoku Docs

Search documentation

Shared docs and current release

Loading search…

日本語

@shumoku/core · 0.4.0 · function

assertLayoutConstraints

Source

Standing-fixture gate (engine-v3-migration.md §B4, finally wired): verify after a layout and — when a BLOCKING constraint is violated — throw under `NODE_ENV=test` (CI fixtures pin the guarantee), log an error otherwise. A runtime layout must NEVER fail to render because of the gate: Bun defaults NODE_ENV to 'development', and throwing there turned a constraint report into "no diagram at all" (the flat-tree path on a 1.5k-node graph violates massively — that's a finding for #481, not a reason to refuse the bake).

assertLayoutConstraints(layout: ResolvedLayout, context?: string): void

Parameters

Parameter Type Description Default
layout ResolvedLayout No additional description.
context string No additional description. 'layout'

Returns

void

libs/@shumoku/core/src/layout/constraints.ts:304