Route
ts
type Route<TKey, TPath, TQuery>: object;
Represents the structure of a route within the application. Return value of createRoute
Type parameters
Type parameter | Value | Description |
---|---|---|
TKey extends string | undefined | string | Represents the unique key identifying the route, typically a string. |
TPath extends string | Path | Path | The type or structure of the route's path. |
TQuery extends string | Query | undefined | Query | The type or structure of the query parameters associated with the route. |
Type declaration
depth
ts
depth: number;
key
ts
key: TKey;
Unique identifier for the route, generated by joining route name
by period. Key is used for routing and for matching.
matched
ts
matched: CreateRouteOptions;
The specific route properties that were matched in the current route. CreateRouteOptions
matches
ts
matches: CreateRouteOptions[];
The specific route properties that were matched in the current route, including any ancestors. Order of routes will be from greatest ancestor to narrowest matched. CreateRouteOptions
path
ts
path: ToPath<TPath>;
Represents the structured path of the route, including path params.
query
ts
query: ToQuery<TQuery>;
Represents the structured query of the route, including query params.