Skip to main content
Module

x/fastro/server/types.ts

Fast and simple web application framework for deno
Go to Latest
File
import { ConnInfo, Handler } from "./deps.ts";
export type PathArgument = string | RegExp;
export interface Next { (error?: unknown): void;}export type RequestHandler = ( request: Request, connInfo: ConnInfo, next: Next,) => void | Promise<void> | Response | Promise<Response>;
export type HandlerArgument = Handler | RequestHandler | RequestHandler[];
export type Route = { method: string; path: PathArgument; handlers: HandlerArgument[];};