import type { NonNegativeInteger, Predicate } from '@naturalcycles/js-lib/types'; import { Pipeline } from '../pipeline.js'; import type { TransformOptions, WritableTyped } from '../stream.model.js'; /** * Allows to "split the stream" into chunks, and attach a new Pipeline to * each of the chunks. * * Example use case: you want to write to Cloud Storage, 1000 rows per file, * each file needs its own destination Pipeline. * * @experimental */ export declare function writableChunk(splitPredicate: Predicate, fn: (pipeline: Pipeline, splitIndex: NonNegativeInteger) => Promise, opt?: TransformOptions): WritableTyped;