sveltekit-service-manager
    Preparing search index...

    Type Alias MiddlewareFunction<Params, RouteId, Context>

    MiddlewareFunction: (
        event: MiddlewareInput<Params, RouteId>,
    ) => MaybePromise<Context | void | undefined>

    A middleware function can compute/return an object ("guard") merged into the final handler context.

    Returning undefined is allowed (no changes).

    Type Parameters

    • Params extends AppLayoutParams<"/"> = AppLayoutParams<"/">
    • RouteId extends AppRouteId | string | null = AppRouteId | string | null
    • Context = any

    Type Declaration