import type { AsyncValueCallback, ErrorCallback, ValueCallback } from "./callback.js"; import { STOP } from "./constants.js"; import type { StopCallback } from "./start.js"; /** * Is a value an async iterable object? * - Any object with a `Symbol.iterator` property is iterable. * - Note: Array and Map instances etc will return true because they implement `Symbol.iterator` */ export declare function isSequence(value: unknown): value is AsyncIterable; /** Infinite sequence that yields until a `SIGNAL` is received. */ export declare function repeatUntil(source: AsyncIterable, ...signals: [Promise, ...Promise[]]): AsyncIterable; /** Infinite sequence that yields every X milliseconds (yields a count of the number of iterations). */ export declare function repeatDelay(ms: number): AsyncIterable; /** Dispatch items in a sequence to a (possibly async) callback. */ export declare function callSequence(sequence: AsyncIterable, callback: AsyncValueCallback): AsyncIterable; /** Pull values from a sequence until the returned function is called. */ export declare function runSequence(sequence: AsyncIterable, onNext?: ValueCallback, onError?: ErrorCallback): StopCallback; /** Merge several sequences (calls the sequences in series). */ export declare function mergeSequences(...sequences: AsyncIterable[]): AsyncIterable;