/** * DvalaValue Serialization Contract * * Defines which runtime value types can be serialized to JSON and restored. * Used at suspension time to produce clear errors when non-serializable * values are found in the continuation stack. * * Serializable value types: * - Primitives: number, string, boolean, null * - Containers: array, object (if all contents are serializable) * - RegularExpression: stored as {s, f} string data * - UserDefinedFunction: {params, body, capturedEnv} — all plain data * - NormalBuiltinFunction: identified by normalBuiltinSymbolType (number) * - SpecialBuiltinFunction: identified by specialBuiltinSymbolType (number) * - ModuleFunction: identified by {moduleName, functionName} * - PartialFunction, CompFunction, ConstantlyFunction, JuxtFunction, * ComplementFunction, EveryPredFunction, SomePredFunction, FNullFunction: * serializable only if all inner values/functions are serializable * - EffectRef: stored as just the name string */ import type { Any } from '../interface'; /** * Checks whether a Dvala runtime value is fully JSON-serializable. * * Returns `true` if the value can be serialized and later restored. * Returns `false` if any part of the value contains a non-serializable reference. * * Uses a `Set` to track visited objects and avoid infinite loops from * circular references (which are themselves not serializable). */ export declare function isSerializable(value: Any, visited?: Set): boolean; /** * Describes why a value is not serializable. * Returns `null` if the value is serializable. * Returns a human-readable string describing the first non-serializable * component found. */ export declare function describeSerializationIssue(value: Any, path?: string): string | null;