import { ExportNode } from "./types.cjs"; import { ImmutableTree } from "../immutable-tree.cjs"; //#region src/export/exporter.d.ts /** * Exporter exports nodes from an ImmutableTree in depth-first post-order (LRN). * This order must be preserved when importing to recreate the same tree structure. * * Based on Go IAVL export.go lines 28-99. * * Usage: * ```typescript * const exporter = tree.export(); * for await (const node of exporter) { * // Process exported node * } * ``` */ declare class Exporter { private tree; constructor(tree: ImmutableTree); /** * Returns an async iterator that yields exported nodes in post-order (LRN). * Nodes are exported depth-first post-order, which means: * - Left child nodes are exported before right child nodes * - Child nodes are exported before parent nodes * * This order is required for import to work correctly. * * Based on Go export.go lines 62-80. */ [Symbol.asyncIterator](): AsyncIterableIterator; /** * Alternative API compatible with Go's Next() pattern. * Returns the next exported node, or null when done. * * Note: Prefer using `for await (const node of exporter)` instead. */ private iterator; next(): Promise; } //#endregion export { Exporter }; //# sourceMappingURL=exporter.d.cts.map