/** * Interface for objects that support conversion to plain JavaScript objects. */ interface Jsonable { toJSON(options?: { skipErrors?: boolean; }): any; toObject?(options?: { skipErrors?: boolean; }): any; } /** * Converts a "Jsonable" value (one with `toObject` or `toJSON` methods) * into a plain JavaScript object/value. * * This function is the primary entry point for converting IO instances * back to standard JavaScript data structures. * * @param value - The value to convert. Must implement `toObject` or `toJSON`. * @param options - Conversion options. * @throws {TypeError} If the value is null/undefined or does not have conversion methods. * @returns The plain JavaScript representation. */ declare function toObject(value: Jsonable, options?: { skipErrors?: boolean; }): any; /** * Alias for `toObject`. */ declare const toJSON: typeof toObject; export { type Jsonable, toJSON, toObject };