Skip to main content
Latest
function oak.composeMiddleware
import { oak } from "https://deno.land/x/create_react_app@v0.1.2/deps.ts";
const { composeMiddleware } = oak;

Compose multiple middleware functions into a single middleware function.

Type Parameters

optional
S extends State = Record<string, any>
optional
T extends Context = Context<S>

Parameters

middleware: Middleware<S, T>[]

Returns

(context: T, next?: () => Promise<void>) => Promise<void>