UNPKG

honestjs

Version:

HonestJS - a modern web framework built on top of Hono

10 lines (9 loc) 544 B
import type { MiddlewareType } from '../interfaces'; import type { Constructor } from '../types'; /** * Decorator that applies middleware to a controller class or method * Middleware functions run before the route handler and can modify the request/response * @param middleware - Array of middleware functions to apply * @returns A decorator function that can be used at class or method level */ export declare function UseMiddleware(...middleware: MiddlewareType[]): (target: Constructor | object, propertyKey?: string | symbol) => void;