router / Function

defineRouteData

Generic types:T U

Type helper that helps creating valid RouteDataDefinition objects utilizing type-inference.

Notes

The type of the value is guaranteed to be compatible with the declared type in the token.

See Also

Presentation

Returns

Parameters

NameTypeDescription
def
RouteDataDefinition<T, U>

Example usage

export const NAV_STATUS = new RouteDataToken<NavStatus>("NAV_STATUS");
defineRouteData({
  token: NAV_STATUS,
  value: NavStatus.Expanded,
});