This module contains generated types for the routes in your app.

Available since 2.26

```js // @noErrors import type { RouteId, PageRouteId, EndpointRouteId, RouteParams, LayoutParams } from '$app/types'; ``` ## AssetPath A union of all the filenames of assets contained in your `static` directory, relative to the `base` path.
```dts type AssetPath = 'favicon.png' | 'robots.txt' | (string & {}); ```
## RouteId A union of all the route IDs in your app — the union of `PageRouteId` and `EndpointRouteId`. Used for `page.route.id` and `event.route.id`.
```dts type RouteId = '/' | '/my-route' | '/my-other-route/[param]' | '/my-endpoint'; ```
## PageRouteId A union of the route IDs in your app that have a `+page`. A route ID can be in both `PageRouteId` and `EndpointRouteId`, if its directory contains both a `+page` and a `+server`. In the example below, `/my-route` has both.
```dts type PageRouteId = '/' | '/my-route' | '/my-other-route/[param]'; ```
## EndpointRouteId A union of the route IDs in your app that have a `+server`. A route ID can be in both `PageRouteId` and `EndpointRouteId`, if its directory contains both a `+page` and a `+server`. In the example below, `/my-route` has both.
```dts type EndpointRouteId = '/my-route' | '/my-endpoint'; ```
## Path A union of all valid paths in your app, relative to the `base` path.
```dts type Path = '' | 'my-route' | `my-other-route/${string}` & {}; ```
## ResolvedPathname Similar to `Path`, but prefixed with a [base path](configuration#paths). Used for `page.url.pathname`.
```dts type ResolvedPathname = `${'' | `/${string}`}/` | `${'' | `/${string}`}/my-route` | `${'' | `/${string}`}/my-other-route/${string}` | {}; ```
## RouteParams A utility for getting the parameters associated with a given route. ```ts // @errors: 2552 type BlogParams = RouteParams<'/blog/[slug]'>; // { slug: string } ```
```dts type RouteParams = { /* generated */ } | Record; ```
## LayoutParams A utility for getting the parameters associated with a given layout, which is similar to `RouteParams` but also includes optional parameters for any child route. It accepts the route ID of any directory containing a layout, including layout-only directories that are not part of `RouteId`.
```dts type LayoutParams = { /* generated */ }; ```