import type { Maybe } from "../interfaces.ts"; import type { Step } from "../step.ts"; declare const $$isDistributor: unique symbol; export interface Distributor { [$$isDistributor]: true; iterableFor(stepId: number): AsyncIterable; releaseIfUnused(stepId: number): void; } export declare function isDistributor(value: null | undefined | (object & { [$$isDistributor]?: true; })): value is Distributor; /** * Creates a "distributor" for the sourceIterable such that the dependent steps * may each consume it independently and safely. * * @param sourceIterable - the iterable or async iterable to clone * @param dependentSteps - the steps we're expecting to depend on this (so we * know how many clones we'll need) * @param abortSignal - signal to abort distribution * @param distributorOptions - the options (from the preset) that may be relevant */ export declare function distributor(sourceIterable: AsyncIterable | Iterable, dependentSteps: readonly Step[], abortSignal: AbortSignal, distributorOptions: DistributorOptions): Distributor; export type DistributorOptions = Required>; export declare function resolveDistributorOptions(options: Maybe): DistributorOptions; export {}; //# sourceMappingURL=distributor.d.ts.map