/** * @module node-opcua-address-space */ import type { IAddressSpace } from "node-opcua-address-space-base"; import type { NodeSetLoaderOptions } from "../interfaces/nodeset_loader_options.js"; import { type NodesetRecord, type NodesetRecordProducer } from "./nodeset_record.js"; /** * loads NodeSet2 documents into an address space: each document is a stream of records (see * {@link NodesetRecord}) that an applier turns into nodes; `terminate` runs the work deferred * until every document is in */ export declare class NodeSetLoader { private readonly addressSpace; private readonly options; private readonly queues; private readonly applier; private readonly yieldEveryBytes; constructor(addressSpace: IAddressSpace, options?: NodeSetLoaderOptions); /** load a document given whole */ addNodeSetAsync(xmlData: string): Promise; /** * load a document delivered as text chunks; see {@link NodesetSource}. The records a chunk * completes are applied together: one turn of the microtask queue per chunk, not per record */ addNodeSetStream(chunks: AsyncIterable | Iterable): Promise; /** * load a document from any producer of records: the XML reader, or a replayed image. A * synchronous iterable (an image given whole) is consumed without a microtask per record. */ addRecords(records: NodesetRecordProducer | Iterable): Promise; private sinceLastYield; private applyOne; private yieldDue; private applyAll; /** the address space holds what was loaded before the failure and must be disposed; it is not left in the middle of a load */ private failed; terminate(): Promise; }