caminho
Version:
Tool for creating efficient data pipelines in a JavaScript environment
24 lines • 1.13 kB
TypeScript
import type { ValueBag, Loggers } from '../types';
import { type OperatorApplier } from './helpers/operatorHelpers';
export type PipeParams = {
/**
* The name of the property to be assigned to the cumulate context.
* The value of the property is the returned value from the step.
*/
provides?: string;
/**
* Name of the step, useful when logging the steps
*/
name?: string;
/**
* Concurrency is unlimited by default, it means a step can be run concurrently as many times as the flow produces
* You can limit the concurrency by using the `maxConcurrency` property.
* This is useful for example when you are calling an API that can't handle too many concurrent requests.
*/
maxConcurrency?: number;
fn: (valueBag: ValueBag) => unknown | Promise<unknown>;
};
export declare function pipe(params: PipeParams, loggers: Loggers): OperatorApplier;
export declare function valueBagGetterNoProvides(): (valueBag: ValueBag) => any;
export declare function valueBagGetterProvides(provides: string): (valueBag: ValueBag, value: unknown) => any;
//# sourceMappingURL=pipe.d.ts.map