/**
 * A convenience function that uses SampleTransform to sample an iterable.
 *
 * @param {number} n
 * @param {Iterable<T>} iterable
 * @param {function(T):R} accessor
 * @returns {R[]}
 * @template T
 * @template R
 */
export function sampleIterable<T, R>(n: number, iterable: Iterable<T>, accessor: (arg0: T) => R): R[];
/**
 * A reservoir sampler, based on: https://www.wikiwand.com/en/Reservoir_sampling
 */
export default class SampleTransform extends Transform {
    /**
     *
     * @param {import("../../spec/transform.js").SampleParams} params
     */
    constructor(params: import("../../spec/transform.js").SampleParams);
    params: import("../../spec/transform.js").SampleParams;
    k: number;
    /** @type {any[]} */
    reservoir: any[];
    /** @type {number} */
    W: number;
    ingester: ((item: any) => void) | ((item: any) => void);
    /**
     *
     * @param {any} item
     */
    _initialIngester(item: any): void;
    i: number;
    next: number;
    /**
     *
     * @param {any} item
     */
    _finalIngester(item: any): void;
    _setNextStop(): void;
}
import Transform from "./transform.js";
//# sourceMappingURL=sample.d.ts.map