import { RuntypedError } from '../core/index.js'; export { stringifyValueWithType } from '../core/index.js'; /** * Error thrown during serialization/deserialization when type conversion fails. * * @example * ```typescript * throw new SerializationError('Expected string, got number', 'type', 'user.name'); * // Message: "Serialization failed. user.name: Expected string, got number" * ``` */ export declare class SerializationError extends RuntypedError { originalMessage: string; errorType: string; path: string; constructor(originalMessage: string, errorType?: string, path?: string); /** * Create a SerializationError from a value and expected type. */ static fromValue(value: unknown, expectedType: string, path?: string): SerializationError; } /** * Represents a dynamic code segment in error paths. * Used when the path segment is computed at runtime (e.g., array index in a loop). */ export declare class RuntimeCode { code: string; constructor(code: string); } /** * Collapse a path array into a string expression. * Static segments are quoted, RuntimeCode segments are inlined. * * @example * ```typescript * collapsePath(['user', 'addresses', new RuntimeCode('i'), 'street']) * // Returns: '"user"+\'.\'+\"addresses\"+\'.\'+i+\'.\'+\"street\"' * ``` */ export declare function collapsePath(path: (string | RuntimeCode)[], prefix?: string): string; /** * Get a property name as a string expression for error messages. */ export declare function getPropertyNameString(propertyName?: string | RuntimeCode): string;