Skip to content

lit-ui-router / 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 defines it. Structurally identical to @lit/context's Context, so keys cross between the two without a cast.

Type Declaration

NameTypeDescriptionDefined in
__context__ValueTypePhantom brand: the type of the value this key references.packages/lit-ui-router/src/context.ts:20

Type Parameters

Type Parameter
KeyType
ValueType