Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Middleware

import type { Middleware } from "https://raw.githubusercontent.com/mandarineorg/mandarinets/master/deps.ts";

Middleware are functions which are chained together to deal with requests.

interface Middleware <S extends State = Record<string, any>, T extends Context = Context<S>> {
(context: T, next: () => Promise<void>): Promise<void> | void;
}

§Type Parameters

§
S extends State = Record<string, any>
[src]
§
T extends Context = Context<S>
[src]

§Call Signatures

§
(context: T, next: () => Promise<void>): Promise<void> | void
[src]