import { type ElementType } from './MultiArray.js'; /** Wire format version for encoded runtime values. */ export declare const runtimeValueCodecVersion: 1; /** Transport-safe numeric, text, array and structure values; decimal parts retain textual precision. */ export type EncodedRuntimeValue = { readonly type: 'complex'; readonly real: string; readonly imaginary: string; readonly numericType: number; } | { readonly type: 'char'; readonly value: string; readonly quote: "'" | '"'; } | { readonly type: 'array'; readonly dimensions: readonly number[]; readonly cell: boolean; readonly values?: readonly EncodedRuntimeValue[]; readonly packed?: { readonly real: Float64Array; readonly imaginary: Float64Array; readonly numericType: Uint8Array; }; readonly emptyStructureFields?: readonly string[]; } | { readonly type: 'structure'; readonly fields: Readonly>; }; /** Reports unsupported or cyclic values at the runtime transport boundary. */ export declare class RuntimeValueCodecError extends TypeError { readonly code = "MATHJSLAB_VALUE_NOT_SERIALIZABLE"; constructor(message: string); } /** * Encode supported values without changing source storage. Numeric arrays use * transferable Float64 buffers only when textual numeric identity survives the * conversion; other decimal arrays retain string components. Decode uses the * receiving realm's configured numeric backend, not backend negotiation. */ export declare const RuntimeValueCodec: { encode: (value: ElementType) => EncodedRuntimeValue; decode: (value: EncodedRuntimeValue) => ElementType; transferables: (value: EncodedRuntimeValue) => ArrayBuffer[]; };