Function: defineRoute()
Function: defineRoute()
Utility function to define a route.
Param
The EventHandler module.
Param
Route definition options.
Param
Indicates that the handler is a factory function.
Param
Indicates that the handler is a class.
Param
The action name for the event handler.
Call Signature
function defineRoute<U>(module, options): RouterBlueprint<StoneIncomingEvent>;
Utility function to define a route with function-based handler.
Type Parameters
U
U
extends IIncomingEvent
= IIncomingEvent
Parameters
module
The EventHandler module.
options
RouteDefinition
<U
, unknown
> & object
Optional route definition options.
Returns
RouterBlueprint
<StoneIncomingEvent
>
The RouterBlueprint.
Param
The EventHandler module.
Param
Route definition options.
Param
Indicates that the handler is a factory function.
Param
Indicates that the handler is a class.
Param
The action name for the event handler.
Call Signature
function defineRoute<U>(module, options): RouterBlueprint<StoneIncomingEvent>;
Utility function to define a route with factory-based handler.
Type Parameters
U
U
extends IIncomingEvent
= IIncomingEvent
Parameters
module
The EventHandler module.
options
RouteDefinition
<U
, unknown
> & object
Route definition options with isFactory set to true.
Returns
RouterBlueprint
<StoneIncomingEvent
>
The RouterBlueprint.
Param
The EventHandler module.
Param
Route definition options.
Param
Indicates that the handler is a factory function.
Param
Indicates that the handler is a class.
Param
The action name for the event handler.
Call Signature
function defineRoute<U>(module, options): RouterBlueprint<StoneIncomingEvent>;
Utility function to define a route with class-based handler.
Type Parameters
U
U
extends IIncomingEvent
= IIncomingEvent
Parameters
module
The EventHandler module.
options
RouteDefinition
<U
, unknown
> & object
Route definition options with isClass and action.
Returns
RouterBlueprint
<StoneIncomingEvent
>
The RouterBlueprint.
Param
The EventHandler module.
Param
Route definition options.
Param
Indicates that the handler is a factory function.
Param
Indicates that the handler is a class.
Param
The action name for the event handler.