/** * Type definition for a dehydrated function value */ export declare type DehydratedFunctionValue = { /** * The encoded type identifier */ _encodedType: 'function'; /** * The encoded value type identifier */ _encodedValueType: 'string'; /** * The encoded function as a string */ _encodedValue: string; /** * Optional named bindings for the function */ _namedBindings?: Record; }; /** * A portable function serializer that can dehydrate and rehydrate functions * from strings, with support for named bindings and various function types. */ export declare class FunctionSerializer { #private; /** * Private constructor - use static methods instead */ private constructor(); /** * Check if a value can be serialized as a function * @param value - The value to check * @returns True if the value can be serialized, false otherwise */ static canSerialize(value: any): boolean; /** * Dehydrate a function into a serializable format * @param fn - The function to dehydrate * @param namedBindings - Optional named bindings for the function * @returns The dehydrated function value */ static dehydrate(fn: Function, namedBindings?: Record): DehydratedFunctionValue; /** * Rehydrate a function from its dehydrated format or raw function string * @param input - The dehydrated function value or raw function string * @param namedBindings - Optional named bindings for the function * @returns The rehydrated function */ static rehydrate any>(input: DehydratedFunctionValue | string, namedBindings?: Record): T; } export { }