lit-ui-router / isContextRequest
Variable: isContextRequest
ts
const isContextRequest: <T>(event, key) => event is Event & ContextRequest<T>;Defined in: packages/lit-ui-router/src/context.ts:182
Whether an event is a context-request for key — the guard a provider runs before answering. The key is matched by identity, as the protocol specifies.
Type Parameters
| Type Parameter | Description |
|---|---|
T extends UnknownContext | the context key's type, branded with the value it references |
Parameters
| Parameter | Type | Description |
|---|---|---|
event | Event | any event a provider's listener received |
key | T | the context key this provider answers for |
Returns
event is Event & ContextRequest<T>