Middleware
Type. Router route and error handler.
Table of contents
Category
Type
Type import
tsimport type { Middleware } from "valyrian.js/router";Public signature
tsinterface Middleware { (request: Request, error?: unknown): Promise<unknown | Component | POJOComponent | VnodeComponentInterface> | unknown | Component | POJOComponent | VnodeComponentInterface; }Type usage
Middleware receives the current Router Request and optional route error, then returns or resolves the route output.