import { Middleware } from "./types/express.cjs"; import { Middleware as Middleware$1 } from "./types/h3.cjs"; import { RouteGroupCondition, RouteGroupOptions, RouteGroupSource } from "./types/basic.cjs"; //#region src/RouteGroup.d.ts /** * @class clear-router RouteGroup * @description A route group describes a collection of routes on clear-router * @author 3m1n3nc3 * @repository https://github.com/arkstack-hq/clear-router */ declare class RouteGroup implements PromiseLike { private readonly options; private readonly checks; private readonly conditions; private readonly registration; private readonly routes; private readonly unfilteredSources; constructor(options: RouteGroupOptions); /** * Returning a falsy value will stop route group registration * * @param condition * @returns */ when(condition: RouteGroupCondition): this; /** * Register one or more middleware that will be executed before every route in the group. * * @param middlewares * @returns */ middleware(middlewares: M[] | M): this; /** * Attaches callbacks for the resolution and/or rejection of the RouteGroup. * * @param onfulfilled * @param onrejected * @returns */ then(onfulfilled?: ((value: void) => TResult1 | PromiseLike) | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | null): PromiseLike; /** * Register the routes */ private register; /** * Rollback the route registration */ private rollback; /** * Check whether a callback or path should be registered. * * @param source * @returns */ private accepts; /** * Resolve files from the group path * * @param source * @returns */ private resolveFiles; /** * Read all the files in the configured directory * * @param directory * @returns */ private readDirectory; } //#endregion export { RouteGroup };