Skip to content

Home > @idealeap/pipeline > Pipe > (constructor)

Pipe.(constructor)

Constructs a new instance of the Pipe.

Signature:

typescript
constructor(callback: (input: T, context: PipelineContext) => MaybePromise<R>, options: PipeOptions<T, R>);
constructor(callback: (input: T, context: PipelineContext) => MaybePromise<R>, options: PipeOptions<T, R>);

Parameters

ParameterTypeDescription
callback(input: T, context: PipelineContext) => MaybePromise<R>The core processing function for this pipe.
optionsPipeOptions<T, R>Configuration options for this pipe.

Released under the MIT License.