Metakit / @doeixd/metakit/interpreter
prepare
function · packages/metakit/src/interpreterPrepare.ts:196
function prepare<Env, A>(
expr: Expr.Expr<Env, A>,
options?: PrepareOptions,
): Effect.Effect<
PreparedPlan<Env, A>,
Artifact.EncodeError | Artifact.Hash.Unhashable
>Prepare expr into a preplanned, CSP-safe closure tree bound to the current
Interpreter backend's foreign table, with ArtifactFingerprint and
EvidenceKey metadata.
The fingerprint is Option.none() only where expr holds an Opaque node
or a non-portable literal; an expression the codec cannot encode for another
reason (past Artifact.DEFAULT_LIMITS) fails with that error.
Observable behavior (values, null, Refusal, short-circuiting, numeric
bounds, text normalization) is identical to Expr.evaluate.