Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/workers_middleware/context.ts>combine

Placeholder for Worker-based middleware solution
Latest
function combine
import { combine } from "https://deno.land/x/workers_middleware@v0.1.0-pre.36/context.ts";

Type-enforcing left-to-right function composition function. The first parameter can be a function of any arity, but the remaining parameters must be unary functions. The return type of one function must be compatible with the argument of next function in the argument list (i.e. types flow from left-to-right)

Type Parameters

TIn extends any[]
TOut

Parameters

f0: Func<TIn, TOut>

Returns

Func<TIn, TOut>

A function with the arguments of the first function in the argument list and a return type of the last function in the argument list

Type Parameters

TIn extends any[]
T1
TOut

Parameters

f0: Func<TIn, T1>
f1: UnaryFunction<T1, TOut>

Type Parameters

TIn extends any[]
T1
T2
TOut

Parameters

f0: Func<TIn, T1>
f1: UnaryFunction<T1, T2>
f2: UnaryFunction<T2, TOut>