---
url: >-
  https://lit-ui-router.dev/api/ui-router-server/fetch/type-aliases/DelegateContext.md
---
[ui-router-server](../../index.md) / [fetch](../index.md) / DelegateContext

# Type Alias: DelegateContext\<K, Decls>

```ts
type DelegateContext<K, Decls> = { [N in DelegateState<K, Decls>]: { delegate: K; mount: string; params: Readonly<DelegateParams<N>>; state: N; subpath: string } }[DelegateState<K, Decls>];
```

Defined in: [fetch.ts:116](https://github.com/simshanith/lit-ui-router/blob/3ab90929a8d23dda96e259d7396a274c5b05398e/packages/ui-router-server/src/fetch.ts#L116)

The route a delegated request matched, read with [delegateContext](../functions/delegateContext.md).
A union over the states that name `K`, so checking `state` narrows `params`
for a typed router; untyped it is one object type.

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
|  `K` *extends* `string` | `string` |
|  `Decls` *extends* [`RouteDeclaration`](../../redirects/interfaces/RouteDeclaration.md) | [`RouteDeclaration`](../../redirects/interfaces/RouteDeclaration.md) |
