createOperationPipeline

Function

Returns a function that orchestrates a pipeline of smaller functions. See Composing Workflows for more information.

All the functions must adhere to the PipelineFn<T> signature:

(value: IPipeable<T>) => Promise<IPipeable<T>>

Given an array of OperationPipeFns, run them in sequence and return the resultant promise

i.e. createOperationPipeline([fn1, fn2, f3]) will return in a function that chains the functions like this: fn1(input).then(fn2).then(fn3).then(result)

Returns a function that orchestrates a pipeline of smaller functions. See Composing Workflows for more information.

All the functions must adhere to the PipelineFn<T> signature:

(value: IPipeable<T>) => Promise<IPipeable<T>>

Given an array of OperationPipeFns, run them in sequence and return the resultant promise

i.e. createOperationPipeline([fn1, fn2, f3]) will return in a function that chains the functions like this: fn1(input).then(fn2).then(fn3).then(result)

  • createOperationPipeline(fns: Array<PipelineFn<>>) : (Anonymous function)

Parameters

Parameter Type Default Notes
fns Required Array<PipelineFn<>>

functions to be run in sequence

Returns

Promise<Pipable>

(Anonymous function)

Function defined in common/src/utils/create-operation-pipeline.ts:35