UNPKG

curated-node

Version:

Not a framework. Not a module. Just a bunch of Node.js packages you most likely familiar with and probably already use, bundled together in a modular fashion.

24 lines (23 loc) 892 B
import express from "express"; interface ExpressRoute { path: string; method: ExpressRouterRequestMethod; handler: ExpressRouterRequestHandler; middleware?: { preRoute?: ExpressRouterRequestHandler[]; postRoute?: ExpressRouterRequestHandler[]; }; } declare type ExpressRouterRequestMethod = "get" | "head" | "post" | "put" | "patch" | "delete" | "options" | "trace"; declare type ExpressRouterRequestHandler = (...args: any[]) => any; export declare class ExpressRouterWrapper { private readonly _basePath; private readonly _routerOptions?; private readonly _routes; private readonly _router; constructor(_basePath: string, routes: ExpressRoute[], _routerOptions?: express.RouterOptions | undefined); get basePath(): string; get router(): express.Router; get routerOptions(): express.RouterOptions | undefined; } export {};