/// import {Duplex} from 'node:stream'; import type {StreamBaseOptions} from '../core/streamers/stream-base.js'; import type {StreamArrayItem as CoreStreamArrayItem} from '../core/streamers/stream-array.js'; import type parser from '../core/parser.js'; /** * Streams elements of a top-level JSON array as `{key, value}` objects. * * Node-flavored entry: the returned factory has both `streamArray.asStream(options)` * (Node Duplex) and `streamArray.asWebStream(options)` (Web `{readable, writable}` pair) attached, * plus `withParserAsStream` / `withParserAsWebStream` parser-included variants. * * @param options - Streamer options (assembler settings, `objectFilter`). */ declare function streamArray(options?: StreamBaseOptions): ReturnType>; declare namespace streamArray { /** An item emitted by `streamArray`. Generic in `T` — declare `StreamArrayItem` to type `value`. */ export type StreamArrayItem = CoreStreamArrayItem; /** Creates a streamArray wrapped as a Node Duplex stream. */ export function asStream(options?: StreamBaseOptions): Duplex; /** Creates a streamArray wrapped as a Web `TransformStream`-shaped pair. */ export function asWebStream(options?: StreamBaseOptions): {readable: ReadableStream; writable: WritableStream}; /** Creates a `parser() + streamArray()` pipeline as a flushable function. */ export function withParser( options?: StreamBaseOptions & parser.ParserOptions ): ReturnType>; /** Creates a `parser() + streamArray()` pipeline as a Node Duplex stream. */ export function withParserAsStream(options?: StreamBaseOptions & parser.ParserOptions): Duplex; /** Creates a `parser() + streamArray()` pipeline as a Web `TransformStream`-shaped pair. */ export function withParserAsWebStream(options?: StreamBaseOptions & parser.ParserOptions): {readable: ReadableStream; writable: WritableStream}; /** Self-reference for `streamArray.streamArray === streamArray`. */ export const streamArray: typeof import('./stream-array.js').default; } type StreamArrayItem = streamArray.StreamArrayItem; export default streamArray; export {streamArray}; export type {StreamArrayItem};