Function: defineCommand()
Function: defineCommand()
Utility function to define a command handler for the Node Console Adapter.
Param
The CommandHandler module.
Param
The metadata options for the handler.
Call Signature
function defineCommand<U, V>(module, options): Partial<NodeConsoleAdapterBlueprint>;
Utility function to define a function-based command handler for the Node Console Adapter.
Type Parameters
U
U extends IncomingEvent = IncomingEvent
V
V = unknown
Parameters
module
FunctionalCommandHandler<U, V>
The CommandHandler module.
options
The metadata options for the handler.
Returns
Partial<NodeConsoleAdapterBlueprint>
The NodeConsoleAdapterBlueprint.
Param
The CommandHandler module.
Param
The metadata options for the handler.
Call Signature
function defineCommand<U, V>(module, options): Partial<NodeConsoleAdapterBlueprint>;
Utility function to define a factory-based command handler for the Node Console Adapter.
Type Parameters
U
U extends IncomingEvent = IncomingEvent
V
V = unknown
Parameters
module
FactoryCommandHandler<U, V>
The CommandHandler module.
options
CommandOptions & object
The metadata options for the handler.
Returns
Partial<NodeConsoleAdapterBlueprint>
The NodeConsoleAdapterBlueprint.
Param
The CommandHandler module.
Param
The metadata options for the handler.
Call Signature
function defineCommand<U, V>(module, options): Partial<NodeConsoleAdapterBlueprint>;
Utility function to define a class-based command handler for the Node Console Adapter.
Type Parameters
U
U extends IncomingEvent = IncomingEvent
V
V = unknown
Parameters
module
CommandHandlerClass<U, V>
The CommandHandler module.
options
CommandOptions & object
The metadata options for the handler.
Returns
Partial<NodeConsoleAdapterBlueprint>
The NodeConsoleAdapterBlueprint.
Param
The CommandHandler module.
Param
The metadata options for the handler.
