UNPKG

@the-teacher/the-router

Version:

Simple router for Express.js, making routes and actions easy to manage.

19 lines 602 B
import { Router, RequestHandler, RouterOptions } from "express"; export type RouteInfo = { method: string; path: string; action: string; middlewares: RequestHandler[]; }; export type RouterState = { router: Router | null; currentScope: string | null; scopeMiddlewares: RequestHandler[]; actionsPath: string; isCustomPath: boolean; routerOptions: RouterOptions; routesMap: Map<string, RouteInfo>; }; export declare const createRouterState: () => RouterState; export declare const resetRouterState: () => RouterState; //# sourceMappingURL=router-state.d.ts.map