Temit

Temit

  • Getting Started
  • API
  • Github
  • npm
  • Discord

temit > TemitClient > listener

TemitClient.listener() method

Creates a listener that can be used to receive data from emitters.

Signature:

listener<Arg = unknown>(event: string, group: string, handler: ListenerHandler<Arg>): Listener<Arg>;

Parameters

ParameterTypeDescription
eventstringThe event name to listen to.
groupstringIdeally, the name of the action this listener is performing, similar to a function name. Listeners with the same service name and group will be grouped together and have requests round-robin'd between them.
handlerListenerHandler<Arg>The function to run in response to incoming data.

Returns:

Listener<Arg>

  • TemitClient.listener() method
  • Parameters
Temit
Docs
Getting StartedRecipesAPI Reference
Community
DiscordGitHubStar
Copyright © 2021 Temit