UNPKG

@fastly/js-compute

Version:

JavaScript SDK and CLI for building JavaScript applications on [Fastly Compute](https://www.fastly.com/products/edge-compute/serverless).

7 lines (6 loc) 516 B
export type PipelineOpts<TValue> = { beforeStep?: (args: TValue, index: number, arr: PipelineStep<TValue>[]) => void | PromiseLike<void>; afterStep?: (args: TValue, index: number, arr: PipelineStep<TValue>[]) => void | PromiseLike<void>; }; export type PipelineStep<TValue> = (acc: TValue, index: number, arr: PipelineStep<TValue>[]) => TValue | PromiseLike<TValue>; export declare function pipeline<TValue>(steps: PipelineStep<TValue>[], initialValue: TValue, opts?: PipelineOpts<TValue>): Promise<TValue>;