/** * The array-like methods on `Readable.prototype` (`map`, `filter`, `take`, `reduce`, ...). * Importing this module installs them; the package entry point does so for you. * @module */ import type { ReadableOperatorOptions } from 'node:stream'; import type { Readable, Readable as ReadableClass } from './readable.js'; type Fn = (value: any, options: { signal: AbortSignal; }) => any; export declare function map(this: Readable, fn: Fn, options?: ReadableOperatorOptions): AsyncGenerator; export declare function filter(this: Readable, fn: Fn, options?: ReadableOperatorOptions): AsyncGenerator; export declare function flatMap(this: Readable, fn: Fn, options?: ReadableOperatorOptions): AsyncGenerator; export declare function drop(this: Readable, number: number, options?: ReadableOperatorOptions): AsyncGenerator; export declare function take(this: Readable, number: number, options?: ReadableOperatorOptions): AsyncGenerator; export declare function some(this: Readable, fn: Fn, options?: ReadableOperatorOptions): Promise; export declare function every(this: Readable, fn: Fn, options?: ReadableOperatorOptions): Promise; export declare function find(this: Readable, fn: Fn, options?: ReadableOperatorOptions): Promise; export declare function forEach(this: Readable, fn: Fn, options?: ReadableOperatorOptions): Promise; export declare function toArray(this: Readable, options?: ReadableOperatorOptions): Promise; export declare function reduce(this: Readable, reducer: (previous: any, value: any, options: { signal: AbortSignal; }) => any, initialValue?: any, options?: ReadableOperatorOptions): Promise; /** Operators that produce another Readable. */ export declare const streamReturningOperators: { drop: typeof drop; filter: typeof filter; flatMap: typeof flatMap; map: typeof map; take: typeof take; }; /** Operators that produce a promise. */ export declare const promiseReturningOperators: { every: typeof every; forEach: typeof forEach; reduce: typeof reduce; toArray: typeof toArray; some: typeof some; find: typeof find; }; /** Installs the operators on `Readable.prototype`. The package entry point calls this. */ export declare function installOperators(Readable: typeof ReadableClass): void; export {};