Skip to content

innerPipe

The innerPipe() method prepares a reusable synchronous pipeline: it returns a function that will apply the chain of transformations to any compatible input.

Interactive example

Syntax

typescript
function innerPipe<Input, Output1>(
	pipe1: (input: Input) => Output1
): (input: Input) => Output1

function innerPipe<Input, Output1, Output2>(
	pipe1: (input: Input) => Output1,
	pipe2: (input: Output1) => Output2
): (input: Input) => Output2

// ... additional overloads (up to 15 functions)

Parameters

  • pipe1, pipe2, ... : Functions applied sequentially. Each output is the input of the next.

Return value

A function that accepts the initial input and returns the final result of the pipeline, with strict typing at each step.

See also

  • pipe - Immediate version that runs the pipeline directly
  • asyncInnerPipe - Asynchronous variant composing promises or FutureEither

Released under the MIT license.