/** * Node.js Stream - Collector * * A writable stream that collects all chunks. */ import type { WritableStreamOptions, ICollector } from "../types.js"; import { Writable } from "./writable.js"; /** * A writable stream that collects all chunks */ export declare class Collector extends Writable { chunks: T[]; constructor(options?: WritableStreamOptions); /** * Get all collected data as a single Uint8Array (for binary mode) */ toUint8Array(): Uint8Array; /** * Get all collected data as a string */ toString(): string; /** * Whether the collector has finished receiving data */ get isFinished(): boolean; } /** * Create a collector stream */ export declare function createCollector(options?: WritableStreamOptions): ICollector;