Beignet API reference
    Preparing search index...

    Type Alias HandlerRouteDef<Ctx, CLike, Hooks>

    Route registration that connects a contract to the handler implementing it.

    Most apps keep route definitions in features/<feature>/routes.ts and compose them with defineRoutes(...).

    type HandlerRouteDef<
        Ctx,
        CLike extends ContractLike = ContractLike,
        Hooks extends
            readonly RouteHook<Ctx, object>[] = readonly RouteHook<Ctx, object>[],
    > = {
        contract: CLike;
        handle: Handler<Ctx & AddedCtxFromHooks<Hooks>, ResolveContract<CLike>>;
        hooks?: Hooks;
        input?: never;
        status?: never;
        useCase?: never;
    }

    Type Parameters

    Index
    contract: CLike

    Contract builder or plain contract config for this route.

    Handler that implements the contract.

    hooks?: Hooks

    Route-scoped hooks that run after group hooks and before the handler.

    input?: never
    status?: never
    useCase?: never