defineRouteData
Generic types: | T U |
Type helper that helps creating valid
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
function defineRouteData (
def: RouteDataDefinition <T, U>,
): RouteDataDefinition <T, U>;
Returns
RouteDataDefinition <T, U>
Parameters
Name | Type | Description |
---|---|---|
def |
|
Example usage
export const NAV_STATUS = new RouteDataToken <NavStatus>("NAV_STATUS");
defineRouteData ({
token: NAV_STATUS,
value: NavStatus.Expanded,
});