Skip to content

lit-ui-router / TransitionCallback

Type Alias: TransitionCallback ​

ts
type TransitionCallback = (transition, reason) => unknown;

Defined in: packages/lit-ui-router/src/transition-controller.ts:60

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 ​

ParameterTypeDescription
transition| Transition | undefinedThe Transition which triggered the callback. For the 'hostConnected' reason this is the most recent successful transition, or undefined when no transition has succeeded yet.
reasonTransitionCallbackReasonWhy the callback was invoked (see TransitionCallbackReason).

Returns ​

unknown