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

x/superdeno/test/deps.ts>Oak.composeMiddleware

Super-agent driven library for testing Deno HTTP servers.
Go to Latest
function Oak.composeMiddleware
import { Oak } from "https://deno.land/x/superdeno@4.8.0/test/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<unknown>) => Promise<unknown>