Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/alosaur/src/models/middleware-target.ts

Alosaur - Deno web framework with many decorators
Very Popular
Go to Latest
File
import { HttpContext } from "./http-context.ts";
export type IMiddleware<TState = unknown> = | PreRequestMiddleware<TState> | PostRequestMiddleware<TState> | MiddlewareTarget<TState>;
export interface PreRequestMiddleware<TState = unknown> { onPreRequest(context: HttpContext<TState>): void;}
export interface PostRequestMiddleware<TState = unknown> { onPreRequest(context: HttpContext<TState>): void;}
export interface MiddlewareTarget<TState = unknown> { onPreRequest(context: HttpContext<TState>): void; onPostRequest(context: HttpContext<TState>): void;}