lit-ui-router / TransitionCallback
Type Alias: TransitionCallback
ts
type TransitionCallback = (transition, reason) => unknown;Defined in: packages/lit-ui-router/src/transition-controller.ts:57
A callback invoked by TransitionController whenever the host is synchronized with the router.
For 'onBefore' and 'onStart' reasons, the returned value is passed back to UI-Router as a HookResult, so the callback may cancel or redirect the pending transition.
Parameters
| Parameter | Type | Description |
|---|---|---|
transition | | Transition | undefined | The [[Transition]] which triggered the callback. For the 'hostConnected' reason this is the most recent successful transition, or undefined when no transition has succeeded yet. |
reason | TransitionCallbackReason | Why the callback was invoked (see [[TransitionCallbackReason]]). |
Returns
unknown