Skip to content

CreateRouteOptions

ts
type CreateRouteOptions<TRoutes>: RouteHookSuccessResponse | RouteHookPushResponse<TRoutes> | RouteHookRejectResponse | RouteHookAbortResponse;

CreateRouteOptions is the basic building block of a route. This type describes the object passed into createRoute and createExternalRoute.

Type parameters

Type parameterDescription
TParent extends Route | undefinedThe parent route for this route.
TName extends string | undefinedOptional name, will be used for routing and matching.
TPath extends Path | string | undefinedThe optional path part of your route.
TQuery extends Query | string | undefinedThe optional query part of your route.
THost extends Host | string | undefinedThe optional host part of your route.