Function: processable()
processable<
TInput,TOutput>(fn,name?):Processable<TInput,TOutput>
Defined in: packages/core/src/pipeline/helpers.ts:83
Alias for step(). Explicitly wraps a function as a Processable. Use this when you want to be explicit about creating a processable.
Type Parameters
TInput
TInput
Input type for the function
TOutput
TOutput
Output type from the function
Parameters
fn
(input) => TOutput | Promise<TOutput>
Function to wrap
name?
string
Optional name for debugging and tracing
Returns
Processable<TInput, TOutput>
Processable that executes the function
Example
const transform = processable((data: Data) => {
return { ...data, processed: true };
}, 'transform');