UNPKG

@hestjs/core

Version:

HestJS Core Framework - A TypeScript framework built on Hono with dependency injection and decorators

41 lines 789 B
import { HttpMethod } from '../utils/constants'; /** * 路由元数据 */ export interface RouteInfo { method: HttpMethod; path: string; handler: string; controller: string; } /** * 路由元数据收集器 */ export declare class RouteMetadata { private routes; /** * 添加路由 */ add(route: RouteInfo): void; /** * 获取所有路由 */ getAll(): RouteInfo[]; /** * 根据控制器获取路由 */ getByController(controller: string): RouteInfo[]; /** * 根据方法获取路由 */ getByMethod(method: HttpMethod): RouteInfo[]; /** * 清空路由 */ clear(): void; /** * 路由数量 */ get size(): number; } //# sourceMappingURL=route-metadata.d.ts.map