Plumile JS API
    Preparing search index...

    Type Alias Route<TContext, TPrepared, TVariables, TQueryShape, S, TChildren>

    Configuration for a single route in the router.

    type Route<
        TContext,
        TPrepared extends PrepareResult,
        TVariables extends ParamData = ParamData,
        TQueryShape extends UnknownQueryShape = UnknownQueryShape,
        S extends Schema | undefined = Schema | undefined,
        TChildren extends
            readonly (RouteNode | Redirect)[] | undefined =
            | readonly (RouteNode | Redirect)[]
            | undefined,
    > = {
        children?: TChildren;
        path?: string;
        prepare?: RoutePrepare<TContext, TPrepared, TVariables, TQueryShape>;
        querySchema?: S;
        render?: RouteRender<TContext, TPrepared, TVariables, TQueryShape>;
        resourcePage?: ResourcePage | null;
    }

    Type Parameters

    Index

    Properties

    children?: TChildren

    Nested child routes or redirects.

    IMPORTANT: This used to be typed as (Route<any, PrepareResult> | Redirect)[] which widened (erased) the generic parameter types (notably the TVariables of each child). That caused TypeScript to treat every child route's prepare callback as accepting the default ParamData shape (effectively Partial<Record<string,string|string[]>>). When user code specified a more specific parameter object (e.g. { slug: string }) for a path like :slug, the function type became non‑assignable because its parameter was stricter than the widened version. By switching to AnyRoute we retain any in the erased position instead of a concrete ParamData, which allows stricter child variables shapes without conflict.

    Using AnyRoute purposely preserves independence of each route's generic parameters while still keeping runtime representation identical.

    path?: string

    URL path pattern for this route

    Function to prepare data before rendering

    querySchema?: S

    Unified schema (filter / query)

    Custom render function for this route

    resourcePage?: ResourcePage | null

    Resource page for lazy-loaded components