tezx
Version:
TezX is a high-performance, lightweight JavaScript framework designed for speed, scalability, and flexibility. It enables efficient routing, middleware management, and static file serving with minimal configuration. Fully compatible with Node.js, Deno, an
18 lines (17 loc) • 717 B
TypeScript
import { CommonHandler } from "./common.js";
import { Middleware } from "./router.js";
export type DuplicateMiddlewares = Middleware<any>[];
export type UniqueMiddlewares = Set<Middleware<any>>;
export declare class TriMiddleware {
children: Map<string, TriMiddleware>;
middlewares: DuplicateMiddlewares | UniqueMiddlewares;
isOptional: boolean;
pathname: string;
constructor(pathname?: string);
}
export default class MiddlewareConfigure<T extends Record<string, any> = {}> extends CommonHandler {
protected triMiddlewares: TriMiddleware;
protected basePath: string;
constructor(basePath?: string);
protected addMiddleware(pathname: string, middlewares: Middleware<T>[]): void;
}