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
| Parameter | Type | Description |
|---|---|---|
| callback | (input: T, context: PipelineContext) => MaybePromise<R> | The core processing function for this pipe. |
| options | PipeOptions<T, R> | Configuration options for this pipe. |