Beignet API reference
    Preparing search index...

    Type Alias RouteGroup<Ctx, Routes>

    Named collection of related route registrations.

    Route groups colocate feature routes and can apply scoped route hooks to every route in the group. defineRoutes(...) flattens them before server registration while preserving those hooks.

    type RouteGroup<
        Ctx,
        Routes extends readonly AnyRouteDef[] = readonly AnyRouteDef[],
    > = {
        hooks?: readonly RouteHook<Ctx, object>[];
        kind: typeof ROUTE_GROUP_KIND;
        name: string;
        routes: Routes;
    }

    Type Parameters

    • Ctx
    • Routes extends readonly AnyRouteDef[] = readonly AnyRouteDef[]
    Index
    hooks?: readonly RouteHook<Ctx, object>[]

    Hooks applied to every route in this group.

    kind: typeof ROUTE_GROUP_KIND

    Internal marker used by defineRoutes(...).

    name: string

    Human-readable group name.

    routes: Routes

    Route definitions in this group.