/** * XML → Plain Object — Shared Conversion Logic * * Internal module used by both `toPlainObject` (DOM path) and * `parseXmlToObject` (SAX-direct path). Not part of the public API. */ import type { ToPlainObjectOptions } from "./types.js"; /** Options with all defaults resolved — no more `??` checks at hot-path call sites. */ export interface ResolvedOptions { readonly ignoreAttributes: boolean; readonly attrPrefix: string; readonly textKey: string; readonly alwaysArray: boolean; readonly isArray: ((name: string) => boolean) | null; readonly preserveCData: boolean; readonly ignoreWS: boolean; } export declare function resolveOptions(options?: ToPlainObjectOptions): ResolvedOptions; /** * Determine the final plain-object value for an element given its parts. * * Returns either: * - a string (text-only / empty element) * - the `obj` record (element with attributes and/or children) */ export declare function resolveValue(obj: Record, text: string, hasAttributes: boolean, hasChildren: boolean, opts: ResolvedOptions): unknown; /** * Add a resolved child value into a parent object, merging repeated names * into arrays. */ export declare function addChildValue(parent: Record, name: string, value: unknown, alwaysArray: boolean, isArray: ((name: string) => boolean) | null): void;