/** * @copyright Sister Software * @license AGPL-3.0 * @author Teffen Ellis, et al. * * Order-preserving tuple projection. * * Emits `Array<[tag, value]>` in source order (sorted by `start`). Preserves repeated tags (e.g. * two `locality` entries for "Springfield, IL — sent from Springfield, MA"). Hierarchy is lost — * use `decodeAsXML` when containment matters. */ import type { ComponentTag } from "../types/component.ts"; import type { AddressNode, AddressTree } from "./types.ts"; /** * Options for {@link decodeAsTuples}. */ export interface SerializeTuplesOpts { /** * Interleave `["unknown", value]` tuples for the all-O spans the model left unclassified (#493), in source order. * Default false — keeps the existing tag-only shape unless the caller asks for the gaps. */ includeUnknown?: boolean; } /** * Recursively flattens an `AddressNode` tree into a source-ordered list of nodes. * * @param node The root node to flatten. * @param out The output array to which flattened nodes will be appended. */ export declare function flatten(node: AddressNode, out: AddressNode[]): void; /** * Project an `AddressTree` to a source-ordered list of (tag, value) pairs. */ export declare function decodeAsTuples(tree: AddressTree): Array<[ComponentTag, string]>; export declare function decodeAsTuples(tree: AddressTree, opts: SerializeTuplesOpts): Array<[ComponentTag | "unknown", string]>; //# sourceMappingURL=serialize-tuples.d.ts.map