---
url: >-
  https://lit-ui-router.dev/reference/ui-router-server/redirects/interfaces/RouteDeclaration.md
---
[ui-router-server](../../index.md) / [redirects](../index.md) / RouteDeclaration

# Interface: RouteDeclaration

Defined in: [redirects.ts:39](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/redirects.ts#L39)

A state's contribution to the url-addressable route set.

## Properties

| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
|  `delegate?` | `string` | Names the host handler that answers this state's url, for any method and any Accept: the verdict is `delegate` instead of `shell`. The state tree stays isomorphic because it carries only the key; the adapter's `delegates` option maps the key to a handler. A delegating state needs a url and no `redirectTo`, and no redirect may target it. Child states don't inherit it. | [redirects.ts:78](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/redirects.ts#L78) |
|  `name` | `string` | The state name; dotted names nest under their parent, as in ui-router. | [redirects.ts:41](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/redirects.ts#L41) |
|  `params?` | `Record`<`string`, `unknown`> | Param declarations for this state's own placeholders (shorthand defaults or [ParamDeclaration](../../matcher/interfaces/ParamDeclaration.md)s). | [redirects.ts:52](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/redirects.ts#L52) |
|  `parent?` | `string` | The parent state's name, as core's `StateDeclaration.parent`: the state nests under it instead of under its dotted prefix. A dotted name with a `parent` is rejected at compile, as core rejects it at registration. | [redirects.ts:47](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/redirects.ts#L47) |
|  `redirectStatusCode?` | [`RedirectStatusCode`](../type-aliases/RedirectStatusCode.md) | The status this state's `redirectTo` answers with, data or function, when a url lands on it: in the verdict for a data `redirectTo`, and in [\`redirectedTo\`](../../ssr/functions/redirectedTo.md) after `settle`. Defaults to `302`, since a permanent redirect is cached by browsers with no expiry; a redirect that never changes declares `308`. A pattern rule's redirect stays `302`. | [redirects.ts:69](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/redirects.ts#L69) |
|  `redirectTo?` | `string` | [`RedirectTarget`](RedirectTarget.md) | Data redirect, mirroring ui-router's redirectTo subset: a url landing on this state goes to the target state instead. A string target keeps the matched params; a [RedirectTarget](RedirectTarget.md) with `params` replaces them (core's `result.params \|\| trans.params()`). Chains are followed; cycles are rejected at compile. | [redirects.ts:60](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/redirects.ts#L60) |
|  `response?` | `true` | Marks a response state: its url answers with the `Response` a handler bound to the state's name builds from its resolves (a redirect, JSON, a badge) instead of a page, and the verdict is `response` instead of `shell`. The tree carries only the marker, so client bundles never import the handler. A response state needs a url and no `redirectTo`, and can't also delegate. Child states don't inherit it. | [redirects.ts:87](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/redirects.ts#L87) |
|  `url?` | `string` | Url segment appended to the ancestors' segments; a url-less state is structural only (never matched, never a redirect target). | [redirects.ts:49](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/redirects.ts#L49) |
