/**
 * Collects (materializes) the data that flows through this node.
 * The collected data can be optionally grouped and sorted.
 *
 * Grouping is primarily intended for handling faceted data.
 */
export default class Collector extends FlowNode {
    /**
     * @param {import("../spec/transform.js").CollectParams} [params]
     */
    constructor(params?: import("../spec/transform.js").CollectParams);
    params: import("../spec/transform.js").CollectParams;
    /** @type {Set<function(Collector):void>} */
    observers: Set<(arg0: Collector) => void>;
    /** @type {Map<import("../spec/channel.js").Scalar[], Data>} TODO: proper type for key */
    facetBatches: Map<import("../spec/channel.js").Scalar[], import("./flowNode.js").Data>;
    /**
     * @param {function(Collector):void} listener
     * @returns {() => void}
     */
    observe(listener: (arg0: Collector) => void): () => void;
    /**
     * @param {string} domainKey
     * @param {import("../spec/channel.js").Type} type
     * @param {import("../types/encoder.js").Accessor} accessor
     * @returns {import("../utils/domainArray.js").DomainArray}
     */
    getDomain(domainKey: string, type: import("../spec/channel.js").Type, accessor: import("../types/encoder.js").Accessor): import("../utils/domainArray.js").DomainArray;
    /**
     * @param {string} domainKey
     * @param {() => void} listener
     * @returns {() => void}
     */
    subscribeDomainChanges(domainKey: string, listener: () => void): () => void;
    /**
     * @returns {Iterable<Datum>}
     */
    getData(): Iterable<import("./flowNode.js").Datum>;
    /**
     *
     * @param {(datum: Datum) => void} visitor
     */
    visitData(visitor: (datum: import("./flowNode.js").Datum) => void): void;
    /**
     * Returns the total number of data items collected.
     */
    getItemCount(): number;
    /**
     * Use an index to find a datum by its unique id.
     *
     * @param {number} uniqueId
     */
    findDatumByUniqueId(uniqueId: number): import("./flowNode.js").Datum;
    /**
     * Uses a lazy index to find a datum by its key fields.
     *
     * @param {string[]} keyFields
     * @param {import("../spec/channel.js").Scalar[]} keyTuple
     */
    findDatumByKey(keyFields: string[], keyTuple: import("../spec/channel.js").Scalar[]): import("./flowNode.js").Datum;
    #private;
}
import FlowNode from "./flowNode.js";
//# sourceMappingURL=collector.d.ts.map