import { ForkableIterator } from 'forkable-iterator';
export type Reader<T, TReturn = void> = Iterator<T, TReturn>;
export type ReaderResult<T, TReturn = void> = IteratorResult<T, TReturn>;
export declare function emptyReader<T>(): Reader<T>;
export type ForkableReader<T, TReturn = void> = ForkableIterator<T, TReturn>;
/**
 * Returns a reader that can be forked with the `fork` function.
 *
 * The source reader must not be read from directly.
 */
export declare function buildForkableReader<T, TReturn = void>(sourceReader: Reader<T, TReturn>): ForkableReader<T, TReturn>;
/**
 * Chains an array of readers together that run consecutively.
 */
export declare function chainReaders<T>(readers: readonly Reader<T>[]): Reader<T>;
/**
 * Builds a reader that yields each item in the input array.
 */
export declare function buildArrayReader<T>(input: readonly T[]): Reader<T>;
