---
url: https://lit-ui-router.dev/v1/reference/lit-ui-router/types/Context.md
---
[lit-ui-router](../index.md) / Context

# Type Alias: Context\<KeyType, ValueType>

```ts
type Context<KeyType, ValueType> = KeyType & {
  __context__: ValueType;
};
```

Defined in: packages/lit-ui-router/src/context.ts:18

A context key branded with the type of the value it references, as the
[community context protocol](https://github.com/webcomponents-cg/community-protocols/blob/main/proposals/context.md)
defines it. Structurally identical to `@lit/context`'s `Context`, so keys
cross between the two without a cast.

## Type Parameters

| Type Parameter |
| ------ |
|  `KeyType` |
|  `ValueType` |

## Type Declaration

| Name | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| `__context__` | `ValueType` | Phantom brand: the type of the value this key references. | packages/lit-ui-router/src/context.ts:20 |
