Skip to main content
Module

x/dext/deps/mod.ts>oak.composeMiddleware

The Preact Framework for Deno
Latest
function oak.composeMiddleware
import { oak } from "https://deno.land/x/dext@0.10.5/deps/mod.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>